02-05-2012, 05:54 PM | #1 |
Grand Sorcerer
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
|
Font embed: works on computer, not on device
I'm using Sigil to make an epub with embedded fonts (embedded font, really, except there's a regular & bold version & I'm using both of those), and it shows up fine on my computer, both in Sigil and in ePubreader-for-Firefox. But when I load it on a portable device, I get the default serif font only.
This happens on three different devices (two e-ink and one tablet), so it's not any particular device settings. It doesn't show up on ADE on a different computer, so I think my copy is checking my Windows fonts rather than the ones in the ePub. What am I doing wrong with the font embedding? CSS snippet-- Code:
p.body { font-family: WellrockSlab, serif; src:url("../Fonts/WellrockSlab.ttf"); text-indent: 2em; text-align: justified; margin: 0em .5em 0em; } |
02-05-2012, 06:20 PM | #2 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
AFAIK, @font-face is required for the definition of embedded fonts. For example:
Code:
@font-face { font-family: 'DejaVu Sans'; src: url(../Fonts/DejaVuSans.ttf); } body { font-family: 'DejaVu Sans', serif; } See this post for more information. Last edited by Doitsu; 02-05-2012 at 06:27 PM. |
Advert | |
|
02-05-2012, 07:31 PM | #3 | |
Grand Sorcerer
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
|
Quote:
Without that, it displays fine in Sigil and on my computer in ePubreader, but doesn't work on my Sony or PEZ. (Shows up as default serif on ADE on a different computer.) If I put single quotes around the font name, the font doesn't show up. I'm not sure if the font name with quotes should be one word or two, nor how I'd figure that out. |
|
02-06-2012, 04:23 AM | #4 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
The syntax definitely works and epubs containing fonts embedded with this syntax display fine with ADE 1.72 (but not always with Sigil).
AFAIK, there are font embedding issues with some Sony ereaders. For more information on font embedding in general, see Threepress Consulting's very detailed article How to embed fonts in ePub files. |
02-06-2012, 12:22 PM | #5 |
Grand Sorcerer
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
|
Thanks! I'll go over it more carefully. Looks like the quotes aren't actually part of the code; they're just used to indicate "name of your font goes here."
I've got two readers of my own (Sony & Astak) and a friend with a Galaxy tablet, plus Sigil, epubreader-in-Firefox, and ADE to test on. If I can get it working on just some of them I'll be happy. I don't have any special characters or precision formatting to worry about; I'd just like fonts I think look nicer on ereaders than Times New Roman. (Embedded fonts for specialized formatting can happen later. Maybe a lot later. After I'm more comfortable with the CSS.) |
Advert | |
|
02-06-2012, 01:32 PM | #6 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If you haven't already done so, you also may want to validate your ePub in Sigil by clicking the green check mark symbol. Also, just to be on the safe side, download the free MS Font properties extension. This will allow you to right-click your font to find out whether it can be legally embedded and whether it supports the Unicode range(s) that you need. You can test whether your reader supports ePubs with embedded fonts with my simple Turkish test file from this thread. (Since ADE won't display all Turkish characters without embedded fonts, this is good test case.) If all goes well, you should see a Turkish pangram with a couple of accented Turkish characters: Pijamalı hasta yağız şoföre çabucak güvendi. If some of them are displayed as question marks, the reader cannot handle embedded fonts: Pijamalı hasta ya?ız ?oföre çabucak güvendi. In that case, you might have to install additional fonts on your reader. See also the How to embed fonts in ePub after Calibre thread for additional information. Last edited by Doitsu; 02-06-2012 at 02:11 PM. |
|
02-06-2012, 02:41 PM | #7 | |||||
Grand Sorcerer
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
02-06-2012, 03:08 PM | #8 | ||
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
BTW, I did a quick test with the WellrockSlab font and it seems that ADE doesn't like it, even though the embedded font displays correctly in Sigil. And since most epub reader manufacturers have licensed ADE, chances are your readers won't support it either. You'll most likely have to choose a similar font or don't embed a font at all. Last edited by Doitsu; 02-06-2012 at 03:27 PM. |
||
02-07-2012, 12:52 AM | #9 | |
Grand Sorcerer
Posts: 5,185
Karma: 25133758
Join Date: Nov 2008
Location: SF Bay Area, California, USA
Device: Pocketbook Touch HD3 (Past: Kobo Mini, PEZ, PRS-505, Clié)
|
Quote:
Maybe Museo Slab would work better. For now, though, we may be content with default serifs for ADE-based ereaders. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Embed a font after the ePub is created. | Adjust | ePub | 26 | 08-03-2011 01:09 AM |
Classic Font and epub, what works on sony, now works on Nook too! | ctos | Barnes & Noble NOOK | 26 | 07-25-2011 09:24 AM |
embed font is too narrow - need help | NASCARaddicted | ePub | 15 | 06-06-2011 10:00 PM |
Embed a font in a PDF without making it huge | Kosst Amojan | 4 | 11-21-2009 11:34 AM | |
how to embed unicode font | atu1303 | LRF | 8 | 08-21-2009 10:06 PM |