View Single Post
Old 11-14-2016, 04:00 PM   #34
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
See my previous post. You really need to read what I actually say instead of jumping up and down and repeating yourself endlessly. Quoting myself, from one day and 14 posts before:
To me, that meant you might be thinking about it, but not really putting it on the "to do" list. So thanks for the change.

I jumped hard because it's one of those very much not intuitive UI things that the programmer thinks is really easy to use, but other users don't. And, it could be made much, much easier if the user could just click a font file in the "not quite matching" list and say "OK, that's the one I meant...embed that, and make sure the @font-face definition that gets created matches the selector you found, thanks". This would also make it do what users seem to expect it will do.

Quote:
Font selection, operates on four keys, name (of which there are actually half a dozen varieties in font files), weight, style and stretch. Read the CSS spec on fonts sometimes.
But, most of that doesn't matter as far as real-world users who are trying to embed fonts. For example, if they have a selector like:
Code:
.something {
font-family: "Adobe Garamond Pro";
font-weight: bold;
}
A user that has this expects the font from the selector to be exactly the same one that shows up when they use a word processor, pick the "Adobe Garamond Pro" font, and choose "bold". The fact that the actual font is marked as "semibold" weight (600) shouldn't matter as far as matching for embedding. Maybe it won't embed automatically, but a user should be able to tell Calibre, "yes, that's really the right file, even though something doesn't match perfectly".

For weight, this makes perfect sense, because even the CSS spec says that font-weight can never fail to match, as long as there is a font with a name match that has the appropriate glyphs (and I never expect Calibre to check this) and otherwise matches (italic, etc.).

So, yeah, I read the spec...and Calibre's editor (which is acting as a UA at that point) doesn't follow it when embedding.
nabsltd is offline   Reply With Quote