07-24-2011, 09:55 PM | #1 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
How to Embed a font after the ePub is created.
Hi Guys,
This it the first time I need to embed a font. I having some issues as to what elements I need and where. I have an ePub already made and lost its macrons and turned them into ? marks. So the solution is to embed a Free font which contains those characters. I've chosen GentiumPlus-I.ttf and GentiumPlus-R.ttf. I unziped the epub. I made a "Fonts" Folder and copied in the fonts.: I then inserted the Itemref code into the manifest section like so : I then added this to the META-INF folder: But when I validate it, its give this error: Does anyone know 1. what I'm missing? 2. where it goes? 3. what's the extact line of code I need? Thanks Adjust |
07-25-2011, 02:54 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Try in the first line: <item href ="META-INF/...
You must also include the fonts in the OPF file. Then make the correct reference to it in the stylesheet. |
07-25-2011, 07:20 PM | #3 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
How do I declare fonts in the OPF file?
Also I took the / out of the <item href ="META-INF/... It didn't make a difference. I'm getting this error now: Is someone able to list the exact code I need to get this working please Last edited by Adjust; 07-25-2011 at 07:23 PM. |
07-25-2011, 07:55 PM | #4 |
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
|
I'm not sure, but I don't think that your display-options.xml file needs to be included in the manifest within the opf file because it is part of the META-INF directory. Remember, the directory the opf file is in is considered the 'root' of the manifest's file system.
And it looks like (in the manifest section of the opf) the item hrefs for the fonts have left out the Fonts in the path. That would clear up both the other two errors. they should look like <item href="Fonts/GentiumPlus..." ...can't remember how to declare font files here /> Hope this helps a little. |
07-25-2011, 07:58 PM | #5 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Even if you get it working, it won't validate as the way to get embedded fonts to display with iBooks is non-standard.
|
07-25-2011, 08:03 PM | #6 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
So what's the solution to getting Macron Characters to display:
http://www.fileformat.info/info/unic.../14d/index.htm All the other accents display fine except the macrons (any character with a straight line above it) |
07-25-2011, 08:05 PM | #7 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Have you actually tried loading the ePub into iBooks and using any of the fonts iBooks gives you access to?
It won't validate in ePubCheck, but done correctly, it's valid for iBooks. |
07-25-2011, 08:11 PM | #8 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
|
07-25-2011, 08:12 PM | #9 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
07-25-2011, 08:21 PM | #10 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
It needs to be viewed over multiple devices
|
07-25-2011, 09:53 PM | #11 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
07-25-2011, 10:09 PM | #12 |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
"surely you can't be serious"
So ePubCheck, no matter what, simply doesn't validate embedded fonts? Yet the ereading devices can access them fine? Does Kindle recognise embedded fonts? because this will be converted to .mobi as well? TBH I keep banging my head against my desk in disbelieving that although the IDPF is supposed to be the "industry standard" which all the major players are members of, and I'm assuming all sit around in their ivory tower... Yet they ignore everything and do what they want and we're stuck here picking up the pieces... |
07-25-2011, 10:20 PM | #13 |
Resident Curmudgeon
Posts: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Yes, ePubCheck validates embedded fonts. but it does not fully validate embedded fonts done the iBooks way. It validates them the standard way.
|
07-25-2011, 10:29 PM | #14 | |
Addict
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
Quote:
So lets go back a bit...how do I get my epub to validate? What's the exact lines of codes I need in the manifest |
|
07-26-2011, 12:41 AM | #15 | |||
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
|
Well, here are some font refs that validate:
Quote:
And here is a font declaration in the stylesheet: Quote:
And here is a class reference for the font: Quote:
I hope this helps. |
|||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Embed EPUB in a webpage | silviolorusso | ePub | 9 | 07-29-2014 03:21 PM |
How to embed animation in epub | q5485 | ePub | 17 | 05-01-2012 11:41 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 |