View Single Post
Old 11-13-2016, 10:52 PM   #25
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 kovidgoyal View Post
@nabsltd: Umm if you just want to directly embed a font file, simply use the File->New file->Import font
That doesn't embed the font...it merely imports the file. How about the CSS @font-face rule that matches it? Calibre should also add that.

Quote:
And once again, information for a font can only be shown if calibre knows what font file is involved, which it does not if it could not find a matching font file in the first place.
Right, but all that has to match is the name. That's good enough to get to the file for most people, but Calibre still won't embed the font unless we make the CSS selector an exact match, which is what the pain is all about.

Quote:
In the case of Embed referenced font, calibre has to go from a CSS font spec to a font file. When that process fails, there is no font file to get information from. I dont know how to put it any clearer than that.
No font file to get information from? Oh, really? Try the following selector:
Code:
.testing {
font-family: "Arial";
font-weight: 200;
}
It will fail miserably to embed any font. Yet, if you double-click on "Arial" in the "Manage Fonts" dialog, you get a list of every font named "Arial" installed on your system, and some information about each font. Where did Calibre get that information? From the font files, right? And, all it needed to make the match was the font name, which we always have.

All I'm asking for is that dialog show every piece of information required to make the CSS match the font file. Hell, you could show a copyable CSS selector, if you wanted.
nabsltd is offline   Reply With Quote