View Single Post
Old 03-03-2012, 03:32 AM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by grumbles View Post
I am having exactly this problem with a an epub I'm putting together. I have put the publication together in Sigil. I've added the font and it appears just fine in Sigil and Calibre's viewer. However it fails to display in ADE and on my Sony 650.

Note that in the epub the opf is in the OEBPS directory and the Font directory is a subdirectory in that. In my particular case the line in the opf file is:

<item href="Fonts/Math2%20Regular.ttf" id="Math2Regular.ttf" media-type="application/x-font-ttf" />

This is correct since Fonts is a subdirectory of OEBPS. "../Fonts/Math2%20Regular.ttf" would place the Fonts directory off the root directory of the epub.

I've had this happen on a few occasions and I am at a loss as to understanding why. The CSS seems to be correct and all the rest of the formatting in CSS works. If it would be helpful I could post the entire CSS file.
No. Your other URL would be correct: src:url("../Math2%20Regular.ttf) format("truetype"); (or whatever for the font).

For this purpose (and this program); it's OEBPS/Fonts, which is what you get by using ../, if you follow me. The ".." means: "parent directory." It's relative to the HTML, not the content.opf. If you continue to try to use "Fonts/Math2%20Regular.ttf" , you'll have this problem consistently. Stick with the ../ and you'll be good to go, assuming you're using viable fonts.

HTH,
Hitch
Hitch is offline   Reply With Quote