Welcome Guest Search | Active Topics | Sign In | Register

Custom Font and @font-face rendering issue Options
Tom
Posted: Thursday, June 27, 2013 2:19:04 AM
Rank: Newbie
Groups: Member

Joined: 6/17/2013
Posts: 3
Hi EO Support,

I'm trying to get a custom font working in my ASPX page (a simple invoice). Initially I tried using @font-face like this (without installing the font on my dev machine):

Code: HTML/ASPX
@font-face
{
font-family: gotham;
src: url(http://localhost:1600/fonts/Gotham-Book.otf) format("truetype");
}

(Note: I tried different versions of the URL and all had the same result).

The ASPX renders fine with the custom font in this fashion in IE9, FF and Chrome (I had to use a WOFF font file for IE9 to work instead of an OTF).

But when I put this through EO.Pdf (both RenderHtmlToPdf and RenderUrlToPdf) I got Null Reference Exceptions.

Reading through your forum, I wasn't sure if your library supports this usage, so I installed the font on my Dev machine as per the suggestion and rebooted.

I removed the @font-face block and reference the font directly:

Code: HTML/ASPX
html, body
    	{	
    		font-family: "Gotham Book";
    		font-size: 11pt;
    		/*position:relative;*/
    		height: 95%;
    	}


Note: I tried with and without the quotes.

Now the font still renders fine in all browsers (including IE9), but when I use either method in the EO.Pdf library it ends up with weird characters:



I hope you can help me out.

Regards,
Tom.
eo_support
Posted: Thursday, June 27, 2013 7:58:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

This might be a bug related to this specific font file. The latest build supports custom font with @font-face. Can you isolate the problem into a small test project and send it to us? We will be happy to take a look once we have that. We will PM you as to where to send the test project.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.