View Single Post
Old 10-18-2010, 04:24 AM   #19
Junior Member
kadooshka began at the beginning.
Posts: 2
Karma: 10
Join Date: Oct 2010
Device: Kobo
@font-face in Kobo

Originally Posted by farrioth View Post
Edit: It is possible to display embedded fonts in EPUBs. I'll have a trawl through the CSS and see what code is needed (most of the how-tos I've read don't seem to work unless I'm doing something wrong).
Yeah, it took me forever to work out from people's explanations of how to make it work, but I've been able to use @font-face tags and font files in the EPUB to make my books bearable to read. It is completely counter-intuitive (and surely non-compliant with EPUB standards...): You have to refer to the font files in the content.opf as if they were in the root of the ZIP file, e.g.

<item id="FontFile" href="FontFile.otf" media-type="application/x-font-opentype"/>
Instead of:

<item id="FontFile" href="Fonts/FontFile.otf" media-type="application/x-font-opentype"/>
Even if the font files are located in Fonts/. As long as they are correctly referred to in the CSS (something like url(../Fonts/FontFile.otf) ). But they must be incorrectly referred to in the OPF. I guess you could just save the font files in the root and they'd be properly referred in the OPF, but not many precompiled EPUBs seem to come with fonts in the root.

I've had this work successfully on all but a very few font files (which may have embedding restrictions, haven't got to the bottom of this yet.)

Is there a Kobo lurker out there who can explain this howler?

kadooshka is offline   Reply With Quote