![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
|
Embedded fonts not showing up in ADE
Hello,
I'm currently creating some epubs that use embedded fonts. My problem is that, while some fonts do show up in Adobe Digital Editions, others do not. I'm using the same code each time, just changing it for the appropriate font. The fonts themselves come from Google's Webfonts collection. This is an example of my CSS: Code:
@font-face { font-family : 'FanwoodItalic'; src: url(../fonts/Fanwood/Fanwood-Italic-webfont.ttf); font-style: normal; } h2 { font-family: 'FanwoodItalic'; } What am I doing wrong??? Thanks, |
![]() |
![]() |
![]() |
#2 |
Booklegger
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
|
As I recall, the name in the font-family line must be the same as the name specified in the font file - FontForge reports the name as 'Fanwood-Italic'
Try 'Fanwood-Italic' in the font-family lines and let us know if it works. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Does the font's filename/path in the css and content.opf files match (i.e. capitalization, punctuation, spaces)?
Last edited by Keroberos; 02-09-2012 at 09:21 AM. Reason: Punctuation |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
|
Updated: sample epub attached
Hello,
Thank you both for your responses. I've tried again with the font name provided as Fanwood-Italic. It doesn't seem to make a difference. In all cases, however, the font is displayed correctly in ADE 1.8 Preview. It's only in ADE 1.7 (the current version) that the font is ignored. This happens however I name the font. In any case, here's the relevant section of my updated CSS. This CSS file is in the styles/ directory: Code:
@font-face { font-family: 'Fanwood-Italic'; src: url(../fonts/Fanwood/Fanwood-Italic-webfont.ttf); font-style: normal; } h2 { page-break-before: always; font-family: 'Fanwood-Italic'; font-size: 1.4em; text-align: center; margin-top: 0em; margin-bottom: 1em; } Code:
<manifest> <item id="coverPage" href="CoverPage.html" media-type="application/xhtml+xml" /> <item id="coverImage" href="images/img_1329158139801.jpg" media-type="image/jpeg" /> <item id="ncx" href="book.ncx" media-type="application/x-dtbncx+xml" /> <item id="h1_font" href="fonts/Fanwood/Fanwood-Italic-webfont.ttf" media-type="application/x-font-ttf" /> <item id="css_css1" href="styles/styles.css" media-type="text/css" /> <item id="chapter1" href="Section1.html" media-type="application/xhtml+xml" /> <item id="chapter2" href="Section2.html" media-type="application/xhtml+xml" /> <item id="chapter3" href="Section3.html" media-type="application/xhtml+xml" /> </manifest> Last edited by mateo999; 02-13-2012 at 02:08 PM. Reason: Attached ebook for testing |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
|
Update: it seems that, irrespective of how I name the fonts, ADE 1.7.2 will display some fonts, but not others.
Droid Serif Regular displays correctly. Whereas Fanwood Italic and Fanwood Regular (for example - they're not the only ones) are ignored. Could it be that ADE 1.7.2 simply doesn't like some fonts? As mentioned in the previous post, ADE 1.8 preview appears to display all fonts correctly. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,551
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
My guess is that if you try to validate the fonts with something like FontForge, you'll find that the fonts that ADE doesn't like do not pass all tests with flying colors. Perhaps ADE 1.8 has decided to be a little less picky about 100% compliant font-files. |
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2012
Device: none
|
Thanks for the suggestion. I'll try that.
|
![]() |
![]() |
![]() |
#8 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
Yeah, I've seen ADE 1.7.2 choke on fonts that have errors in them.
Also, your sample ePUB does not have any fonts embedded in it. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
embedded fonts | Wally S | Workshop | 15 | 01-21-2012 03:57 PM |
Embedded fonts | dicknskip | Sigil | 27 | 12-01-2011 09:24 AM |
Embedded fonts? | Greenmantle | Kobo Reader | 66 | 07-27-2011 08:20 PM |
Embedded fonts, Calibre, and choice of fonts | AlexBell | ePub | 8 | 05-30-2010 06:00 AM |
iPad Embedded Fonts | JSWolf | Apple Devices | 24 | 04-26-2010 02:41 PM |