|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
Hello, I use the library EO.pdf in my asp.net project but I have one problem when I am trying to create pdf from html page and use my custom font I got generated any pdf file without my font. Have you any ideas?
Regards, Dimitry.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Make sure your custom font is a TrueType font. We get the font data from Windows and Windows will only give us TrueType font. Windows can handle other types of fonts but it won't give those font data to us. As a result, whenever you use a non TrueType custom font, the font will be substituted with a "default" true type font (which usually is Microsoft Sans Serif).
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
Thanks very much for your quick response. I use a JamesFajardo.ttf font it is TrueType font. I did installed it in my Windows. But it isn't working.
Regards, Dimitry.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
In that case please create a small test project that demonstrates the problem, and send the test project along with the font file to us in zip format (we will PM you as to where to send them). Once we have that, we will run it here and see what we can find. As long as we can reproduce the problem, we should be able to tell you what's wrong.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, We looked into your test project. You cannot use custom font that way. The font must be installed with windows (because we get font data from Windows, not from your font file). So the steps to use custom font are: 1. Install the font with windows. You can do this by directly pasting "JamesFajardo.ttf" into Windows "Font" folder; 2. Use "James Fajardo" directly in your CSS. For example:
Code: CSS
body
{
background: #b6b7bc;
font-size: 40px;
font-family: 'James Fajardo';
margin: 0px;
padding: 0px;
color: #ffffff;
}
Note the font-family name is 'James Fajardo', not 'JamesFajardo'. Hope this helps. Please let us know if you have any more questions. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
But I had installed this font with my Windows and it doesn't work... Many Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 10/22/2011 Posts: 9
|
eo_support wrote:Hi, 2. Use "James Fajardo" directly in your CSS. For example:
Code: CSS
body
{
background: #b6b7bc;
font-size: 40px;
font-family: 'James Fajardo';
margin: 0px;
padding: 0px;
color: #ffffff;
}
Note the font-family name is 'James Fajardo', not 'JamesFajardo'. I did declare this name in a rule
Code:
@font-face { font-family: JamesFajardo; src: url('JamesFajardo.eot'); src: local('JamesFajardo'), url('JamesFajardo.ttf') format('TrueType'); }
It is working in my html.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
We tested it here and it does work. It doesn't work for you because you used "JamesFajardo" in your Style.css. It should be "James Fajardo".
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Please do the following:
1. Remove your @font-face block. 2. Use the correct font name (there is a space in the two words).
Thanks
|
|