Html tag font face not working Azure
-
- Posts: 29
- Joined: Thu Jul 07, 2016 2:06 pm
Html tag font face not working Azure
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.
- Attachments
-
- preview_pdf.jpg (241.58 KiB) Viewed 2805 times
-
- preview_html.jpg (261.14 KiB) Viewed 2805 times
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Html tag font face not working Azure
Hello,
We have analyzed the problem. There are some suggestions but we need report template, mdc file and PDF result for analysis.
Thank you.
We have analyzed the problem. There are some suggestions but we need report template, mdc file and PDF result for analysis.
Thank you.
-
- Posts: 29
- Joined: Thu Jul 07, 2016 2:06 pm
Re: Html tag font face not working Azure
Follow attached file as requested.
This problem only occurs when running on Azure.
See the first field when exported to PDF, we expect to show Arial Narrow.
This problem only occurs when running on Azure.
See the first field when exported to PDF, we expect to show Arial Narrow.
- Attachments
-
- FontTest.pdf
- (60.93 KiB) Downloaded 183 times
-
- FontTest.mrt
- (17.59 KiB) Downloaded 163 times
-
- Posts: 29
- Joined: Thu Jul 07, 2016 2:06 pm
Re: Html tag font face not working Azure
Hi, do you have news about this issue?
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Html tag font face not working Azure
Hello,
There is a problem with fonts on the Azure if it not installed in the system. With GDI+ it works correctly, but for GDI its fonts are not available and uses Arial Narrow. For rendering HTML tags is used GDI.
In your case, you need to install that font on the server or use another font which installed on the server.
Thank you.
There is a problem with fonts on the Azure if it not installed in the system. With GDI+ it works correctly, but for GDI its fonts are not available and uses Arial Narrow. For rendering HTML tags is used GDI.
In your case, you need to install that font on the server or use another font which installed on the server.
Thank you.
-
- Posts: 29
- Joined: Thu Jul 07, 2016 2:06 pm
Re: Html tag font face not working Azure
This is a huge problem. Do you have intentions to make an upgrade to "html tags" so it can use GDI+ to render fonts and to use standard html so we can use div, span, etc?
-
- Posts: 6245
- Joined: Tue Mar 20, 2018 5:34 am
Re: Html tag font face not working Azure
Hello,
Unfortunately, at the current moment, no, we do not have plans to implement that task in the near future. Sorry.
Thank you.
Unfortunately, at the current moment, no, we do not have plans to implement that task in the near future. Sorry.
Thank you.