Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-24-2011, 09:55 PM   #1
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
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
Adjust is offline   Reply With Quote
Old 07-25-2011, 02:54 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Advert
Old 07-25-2011, 07:20 PM   #3
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
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.
Adjust is offline   Reply With Quote
Old 07-25-2011, 07:55 PM   #4
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
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.
pholy is offline   Reply With Quote
Old 07-25-2011, 07:58 PM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
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.
JSWolf is offline   Reply With Quote
Advert
Old 07-25-2011, 08:03 PM   #6
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
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)
Adjust is offline   Reply With Quote
Old 07-25-2011, 08:05 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
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.
JSWolf is offline   Reply With Quote
Old 07-25-2011, 08:11 PM   #8
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Quote:
Originally Posted by JSWolf View Post
It won't validate in ePubCheck
It needs to validate ePubCheck

I haven't checked whether it view in iBook, But it becomes a ? in ADE...
Adjust is offline   Reply With Quote
Old 07-25-2011, 08:12 PM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Adjust View Post
It needs to validate ePubCheck

I haven't checked whether it view in iBook, But it becomes a ? in ADE...
iBooks is not ADE. iBooks uses a different font. So maybe it will work as is without the need to embed any fonts.
JSWolf is offline   Reply With Quote
Old 07-25-2011, 08:21 PM   #10
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
It needs to be viewed over multiple devices
Adjust is offline   Reply With Quote
Old 07-25-2011, 09:53 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Adjust View Post
It needs to be viewed over multiple devices
You'll then have to do it for iBooks and a separate one for ADE.
JSWolf is offline   Reply With Quote
Old 07-25-2011, 10:09 PM   #12
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
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...
Adjust is offline   Reply With Quote
Old 07-25-2011, 10:20 PM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,645
Karma: 127838196
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.
JSWolf is offline   Reply With Quote
Old 07-25-2011, 10:29 PM   #14
Adjust
Addict
Adjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel isAdjust really knows where his or her towel is
 
Adjust's Avatar
 
Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
Quote:
Originally Posted by JSWolf View Post
Yes, ePubCheck validates embedded fonts. but it does not fully validate embedded fonts done the iBooks way. It validates them the standard way.
Colour me confused...

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
Adjust is offline   Reply With Quote
Old 07-26-2011, 12:41 AM   #15
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
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:
<item id="BNKGOTHM.TTF" href="Fonts/BNKGOTHM.TTF" media-type="application/x-font-truetype"/>
<item id="BRUSHSCI.TTF" href="Fonts/BRUSHSCI.TTF" media-type="application/x-font-truetype"/>
<item id="HANSON-H.TTF" href="Fonts/HANSON-H.TTF" media-type="application/x-font-truetype"/>
<item id="SCHWRZW.TTF" href="Fonts/SCHWRZW.TTF" media-type="application/x-font-truetype"/>
<item id="TrajanPro-Bold.otf" href="Fonts/TrajanPro-Bold.otf" media-type="application/x-font-opentype"/>
<item id="TrajanPro-Regular.otf" href="Fonts/TrajanPro-Regular.otf" media-type="application/x-font-opentype"/>
<item id="Vivaldii.TTF" href="Fonts/Vivaldii.TTF" media-type="application/x-font-truetype"/>
This is with the Fonts directory and the opf file both immediately inside the OEBPS directory.

And here is a font declaration in the stylesheet:
Quote:
@font-face {
font-family: "Vivaldi";
font-style: normal;
font-weight: normal;
src:url(../Fonts/Vivaldii.TTF) format(truetype);;
}
Note that the stylesheet is inside a directory within the OEBPS directory, so the url is relative to the current directory. I think that is correct, but I'll do more checking soon.

And here is a class reference for the font:
Quote:
{
font-family: "Vivaldi", cursive
}
Note the fallback to cursive if Vivaldi is unavailable.

I hope this helps.
pholy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 PDF 4 11-21-2009 11:34 AM
how to embed unicode font atu1303 LRF 8 08-21-2009 10:06 PM


All times are GMT -4. The time now is 08:36 AM.


MobileRead.com is a privately owned, operated and funded community.