View Single Post
Old 09-18-2023, 12:34 PM   #13
nabsltd
Fanatic
nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.nabsltd ought to be getting tired of karma fortunes by now.
 
Posts: 528
Karma: 9529956
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
Quote:
Originally Posted by WV-Mike View Post
I still don't get why the font names (Fontin-SmallCaps.otf/Fontin SmallCaps) don't have to match. I will have to cogitate on that.
"Fontin-SmallCaps.otf" is a filename, not a font name. The fact that the file contains font data is not important. You can rename the file to whatever you want, and it will still contain font data.

"Fontin SmallCaps" is a name of the font in the font data inside the file. It does not have to match the filename, or anything else. There is more than one font name inside the font file, because of historical reasons (Apple had their own way of naming fonts, so one of the extra names is there for compatibility with older MacOS versions). It is rare for all the font names in the font file to match each other, and your EPUB checker is only talking about one of them, so it's wrong from the start.

There is also a font name that you specify in the @font-face declaration:
Code:
font-family: "Fontin SmallCaps";
What you put in this declaration is what you use in a later CSS declaration block to refer to it:
Code:
.myclass {
font-family: "Fontin SmallCaps";
}
Despite the warning you got with the checking application, the only thing that matters is that the value of the font-family property in both the @font-face declaration and in later declarations match.

The @font-face declaration is used to tell the renderer about the characteristics of the font in the file. That declaration is the final arbiter, and does not have to reflect what is actually in the font file. The renderer will believe whatever you put in the declaration. So, if you declare the font to be "Fontin-SmallCaps" and always refer to it that way, it will work, regardless of what is in the font file.
nabsltd is offline   Reply With Quote