View Single Post
Old 06-14-2009, 09:39 AM   #36
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: 80,061
Karma: 147983159
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 Ankh View Post
The "true" (font within epub file, not on device) embedding is also easy.

You have to use OpenType fonts, for example: Gentium.

1. If you haven't done so yet, check ePub Format Construction Guide

2.Add something like this to *.opf:


3. create "fonts" directory and copy your fonts there

4. And an entry like this into css/*.css file will make it a default font:


5. Create the epub file:


And you have a slightly larger epub file that does not depend on fonts installed on the device.
Actually, when I embed the fonts into the ePub file itself, I don't have to change the OPF file at all. All I modify is the CSS and add the font directory at the same level as the CSS. It works fine. So no need to go messing with the .opf file at all to embed fonts. That just complicates matters.
JSWolf is offline   Reply With Quote