View Single Post
Old 02-26-2009, 09:12 PM   #1
Cygfrydd
Jackass Crazyfish
Cygfrydd began at the beginning.
 
Cygfrydd's Avatar
 
Posts: 7
Karma: 10
Join Date: Jan 2007
Location: St. Petersburg, Florida, US
Device: Sony Reader PRS-505
ePub + Embedded Fonts

Totally new to these forums, so this seems like a splended time for a first post.

I'm hand-making ePubs for my Sony Reader PRS-505 (not entirely by hand, using some custom Python scripts to help things along), and have been embedding TTF fonts to override the standard Reader fonts (as well as gaining true italics, etc.); that is to say, including them in the "zip" instead of pointing at fonts already loaded in the Data directory on the Reader. The following works just fine in both the desktop version of ADE, and on the Reader:

Code:
@font-face {
  font-family: BerlingAntiqua ;
  font-style: normal ;
  font-weight: normal ;
  src: url(fonts/base/berling.ttf) ;
}
...
p {
  font-family: BerlingAntiqua ;
  margin: 0 ;
  padding: 0 ;
  text-align: justify ;
  text-indent: 1em ;
  font-size: 120% ;
}
I got to thinking about the consequences of this. It seems to me that the font files themselves ought to be listed in the <manifest> portion of content.opf; obviously it works fine without, and epubcheck doesn't complain. But if they were listed... what media-type should I use? Googling has been no help, except to locate a few posts with proposals for media-types for fonts, but nothing concrete. Has anyone else explored this?


@yg

-=<>=-=<>=-=<>=-=<>=-=<>=-=<>=-=<>=-
Cygfrydd Llewellyn | cygfrydd@gmail.com
-=<>=-=<>=-=<>=-=<>=-=<>=-=<>=-=<>=-

Guilt was the grease in which the wheels of the authority turned.
(Terry Pratchett, Small Gods)
Cygfrydd is offline   Reply With Quote