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 09-17-2011, 12:10 PM   #1
Giordano Galli
Junior Member
Giordano Galli began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2011
Location: Italy
Device: none
The ePub 2.0.1 specifications and font embedding

Hello

I'm having trouble finding where in the ePub specifications they discuss the nuts and bolts of font embedding. I only found a vague treatment of this matter in relation to encryption.

At the very least I need to know:
1) whether all I have to do to embed an unencrypted font is include its file in the package (I'm using the "Add file" command in "oXygen XML Author 13"), reference it in the manifest and use "@font-face" in my stylesheet
2) whether OpenType fonts are supported
3) which value for the "media-type" attribute should be used for OpenType fonts.

I've been happily using OpenType fonts labeled as "application/vnd.ms-opentype" for my tests in Adobe Digital Editions but I have now to ask questions 2) and 3) because a publisher is complaining about my files being rejected by epubcheck 1.2 with a "hyperlink to non-standard resource" error.

I'd be grateful for any links and comments. Thank you very much!


Giordano
Giordano Galli is offline   Reply With Quote
Advert
Old 09-17-2011, 12:22 PM   #2
LaoTseu
Member
LaoTseu began at the beginning.
 
Posts: 20
Karma: 12
Join Date: Sep 2011
Device: Kindke
Here's a link that will help you: http://blog.threepress.org/2009/09/1...in-epub-files/

1- See the link above

2- OpenType is definitely supported, all the EPub standard doc always refer to OpenType font

3- media-type="font/opentype"/

Hope that helps.
LaoTseu is offline   Reply With Quote
Old 09-17-2011, 01:31 PM   #3
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,303
Karma: 115718815
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Remember that font embedding seems to be a hit-and-miss for readers. Some readers do honor the specs and use it. Others just plainly ignore it.
Toxaris is offline   Reply With Quote
Old 09-18-2011, 03:43 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,062
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
1. You have to include the font in the package, add a @font-face definition to the CSS and include the reference in the OPF manifest.

2. Actually, OpenType is the only format supported, at least it's the only format suggested by the spec.

3. "application/vnd.ms-opentype", according to the spec.

The message "hyperlink to non-standard resource" probably means that somewhere you have a link to something that is not an XHTML file, it could be a link to an image or something like that. That's not allowed.
Jellby is offline   Reply With Quote
Old 09-18-2011, 09:33 AM   #5
LaoTseu
Member
LaoTseu began at the beginning.
 
Posts: 20
Karma: 12
Join Date: Sep 2011
Device: Kindke
Quote:
Originally Posted by Jellby View Post
3. "application/vnd.ms-opentype", according to the spec.
You are quite right, my bad. I wonder where Threepress took media-type="font/opentype" from.
LaoTseu is offline   Reply With Quote
Advert
Old 09-18-2011, 07:28 PM   #6
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
It seems that most readers and browsers don't really check the media type. Which is good, because as far as I can find out, only one obsolete font ever got a assigned media type.
Still, for future compatibility, one needs something, and the most common recommendation seems to be media-type=application/x-font-otf (or ttf, depending on the file type). x is for extension, as there is no assigned type for fonts. While vnd.ms-opentype probably is correct, both otf and ttf are recognized standard types, so I don't think we need to use the vendor specific designation, as long as we use x-font-something.
But font/anything is incorrect, as IANA doesn't have a font mime-type directory.

At least, that's what I'm going to do from now on.
pholy is offline   Reply With Quote
Old 09-18-2011, 10:11 PM   #7
LaoTseu
Member
LaoTseu began at the beginning.
 
Posts: 20
Karma: 12
Join Date: Sep 2011
Device: Kindke
Thanks pholy, it clarify things. Sigil is using application/x-font-ttf for the TrueType fonts. If I understand what you said, it's as good and anything else for now so I won't mess with it.
LaoTseu is offline   Reply With Quote
Old 09-19-2011, 04:23 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,062
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by pholy View Post
While vnd.ms-opentype probably is correct, both otf and ttf are recognized standard types, so I don't think we need to use the vendor specific designation, as long as we use x-font-something.
However, the current spec explicitly calls for "application/vnd.ms-opentype", so using something else for opentype is against it.
Jellby is offline   Reply With Quote
Old 09-24-2011, 10:28 AM   #9
Giordano Galli
Junior Member
Giordano Galli began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2011
Location: Italy
Device: none
Quote:
Originally Posted by Jellby View Post
1. The message "hyperlink to non-standard resource" probably means that somewhere you have a link to something that is not an XHTML file, it could be a link to an image or something like that. That's not allowed.
I don't know, I wasn't able to reproduce any error or warning not even when I downloaded the latest version of the command line tool (ePubChecker apparently sticks to ePubCheck version 1.0.5).

Anyway, I'm delighted at the quality of this discussion, it has significantly added to my understanding of the matter and will be of great help in the future.

Thanks to everybody for your interest!
Giordano Galli 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
Problem embedding font into an ePub mvo ePub 16 01-03-2012 07:10 PM
Do I need a font license if all I'm doing is referring to the font (not embedding)? Stodder Workshop 21 04-21-2011 04:19 AM
Embedding .symbol font? Kivgaen Sigil 23 06-24-2010 09:13 PM
Another font embedding problem b.tarde EPUBReader 12 03-11-2010 01:40 PM
Automatic font embedding - or something else? pepak Calibre 4 06-01-2009 03:38 PM


All times are GMT -4. The time now is 11:21 AM.


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