Topic: FA Icon empty with font forced to Roboto (or other font)

rob.dataccess premium asked 5 years ago


Hi,

I'm using MDB with ASP.NET page, I have a table that I populate "code behind" which contains a simple HyperLink control. When the table is populated the font of the HyperLink control is not the "Roboto" but, probably, Arial. I would like that the text were drawn using the MDB standard font but if I "force" the FontFamily to "Roboto", the fontawesome icon disappear and I can just see an empty square. This is the definition of the table in the aspx page:

 <asp:Table runat="server" id="tblShort" class="table table-borderless table-sm mb-0" width="100%" cellspacing="1"> </asp:Table>

The code behind where I populate the table at runtime is the following:

TableRow newRow = new TableRow();

        TableCell cellNew = new TableCell();
        HyperLink lblNew = new HyperLink();
        lblNew.NavigateUrl = "userPage.aspx";
        lblNew.Text = "  Testo";            
        lblNew.CssClass = "fa fa-file-invoice-dollar fa-lg";            
        lblNew.Attributes.Add("text-decoration", "none");

        cellNew.BorderStyle = BorderStyle.None;
        cellNew.BorderWidth = 1;
        cellNew.BorderColor = System.Drawing.Color.LightGray;
        cellNew.HorizontalAlign = HorizontalAlign.Left;

        cellNew.Controls.Add(lblNew);
        newRow.Cells.Add(cellNew);

        tblShort.Controls.Add(newRow);

If I set the font with "lblNew.Font.Name="Roboto" the fontawesome icon appears empty. Where is the mistake? Thank you, regards.

Roberto


Bartłomiej Malanowski staff commented 5 years ago

Currently, we don't support ASP.NET. However, I'll leave this question open so maybe someone will know the answer



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.7.4
  • Device: PC
  • Browser: Firefox
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags