View Single Post
Old 06-30-2020, 11:09 PM   #58
mirage
Zealot
mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.mirage ought to be getting tired of karma fortunes by now.
 
Posts: 141
Karma: 2382428
Join Date: Feb 2013
Location: California
Device: OnePlus 6 phone, Kobo Clara HD, Libra H2O
Quote:
Originally Posted by DNSB View Post
Is it complaining that the font family is invalid or is it complaining about their listing in the content.opf file. As an example, you see the font listed with "application/x-font-ttf" while an epub3 wants "font/ttf" See RFC-8081 for a list of the font top level type and subtypes.

Another example would be:

Code:
<item id="seraphine-regular-otf" href="Fonts/Seraphine-Regular.otf" media-type="application/vnd.ms-opentype"/>

<item id="seraphine-regular-otf" href="Fonts/Seraphine-Regular.otf" media-type="font/otf"/>
I can't definitively answer the question because I don't know enough about the specifics of the epub specs to say, though I've done my share of tweaking of them and have done plenty of html/css work. In other words, the innards of an epub file are familiar to me, but I'm not fully versed in knowing what to make of everything I see there. I'm not looking for any help on this, FWIW. I was just providing the code for the page @JSWolf provided above because I've seen it so many times in the Epub editor in calibre and figured it might be of interest here. That said...

There is a red icon with an exclamation point within it to the left of the offending font name in the Fonts section of the file browser in calibre. Hovering over the icon or font name invokes a tool tip that reads "Not a valid font." This is for Shift-BoldItalic.otf and Shift-Light.otf. I'm pretty sure that the only place this font is used is in the code for the page that @JSWolf provided a screen shot for. That's how it's been when I've searched for it in books to see if deleting the font would potentially create any problems with using the publisher's choice, which I tend not to do, anyway. The @font-face descriptor is always in the <style> tag in the header of the html file for this particular page. It's not in any of the css files.

Here's what the opf file contains for an invalid example of this:

Code:
<item href="fonts/Shift-BoldItalic.otf" id="Shift-BoldItalic.otf" media-type="application/vnd.ms-opentype"/>
<item href="fonts/Shift-Light.otf" id="Shift-Light.otf" media-type="application/vnd.ms-opentype"/>
mirage is offline   Reply With Quote