Html tag font face not working Azure
Posted: Thu Apr 11, 2019 6:30 pm
I am using Azure WebApp as DataCenter for may application.
I use Arial Narrow font and create Arial Narrow.fiz and load this font in Global.asax.cs, code follows as below:
FontsInfoStore.LoadFontInfoToStore("Arial Narrow", Server.MapPath("~/fonts/") + "Arial Narrow.fiz");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALN.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNB.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNBI.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNI.TTF");
This is working fine when I set Arial Narrow font direct to the text field font property. But when I set a text field with an html tag like this: <font face="Arial Narrow">some text</font>, this text field is not showing with the Arial Narrow font, but the other text fields that are not using html tags works well and shows Arial Narrow.
Please, take a look at the images attached.
One is the html preview and the other is the exported to PDF, problem occurs when I export do PDF.
I use Arial Narrow font and create Arial Narrow.fiz and load this font in Global.asax.cs, code follows as below:
FontsInfoStore.LoadFontInfoToStore("Arial Narrow", Server.MapPath("~/fonts/") + "Arial Narrow.fiz");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALN.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNB.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNBI.TTF");
StiFontCollection.AddFontFile(Server.MapPath("~/fonts/") + "ARIALNI.TTF");
This is working fine when I set Arial Narrow font direct to the text field font property. But when I set a text field with an html tag like this: <font face="Arial Narrow">some text</font>, this text field is not showing with the Arial Narrow font, but the other text fields that are not using html tags works well and shows Arial Narrow.
Please, take a look at the images attached.
One is the html preview and the other is the exported to PDF, problem occurs when I export do PDF.