Quote:
Originally Posted by kovidgoyal
And how is calibre supposed to give you more information about a font that has not been embedded, since the only information it has is the information already visible to you in the CSS rules?
|
In the editor, when you double-click on a font in the "Manage Fonts" dialog, you get something like the first attachment, which shows four font files and information about the fonts in those files. This information has been retrieved from the font files, not my CSS, which has only:
Code:
.text-monospace {
font-family: "Consolas", "Courier New", "Courier Std", "Courier", "DejaVu Sans Mono", monospace;
font-size: 0.80em;
}
On the other hand, if you go to Preferences->Conversion->Common Options->Choose Font Family, clicking on a font there gives you more information about it. Not for Consolas, which is a relatively simple font, but something that has a font-stretch that isn't "normal", is one thing extra that does show up.
So, what I was asking was for you to show that same info in the dialog that pops up from the editor.
As for the rest, stop caring about what is in the CSS and just let us embed a font by choosing a file. Put the font file in the right place in the ebook, add a perfectly-matching @font-face rule for that font file, and then let us worry about writing selectors that match the @font-face rule. That would end the issue about trying to "match" the CSS selector to the font files on disk, which is what causes all the questions here in the first place. It would also allow people to embed fonts that they know they need, but may not have a specific selector that matches yet.
For example, I might want to make sure I embed all 4 versions of a font, even though there isn't an exact match in the ebook CSS selectors for the "Bold Italic" version, because there might be a user stylesheet or renderer stylesheet that makes something render that way (e.g., by adding bold when a word is selected for defining).
Even without that, we also need to be able to just embed less than "All fonts". For example, my selector above is a somewhat generic one for monospace, and covers pretty much all the fonts in the order I would like that selector to display. Because of that, I don't want to embed
any of those fonts in the book, but in order to get the really special font embedded, I have to put all those in the book, too, then remove them.
Quote:
There is no such thing as font-weight: medium
|
Doh! I was looking at "font-weight" and clicked "font-size" at that same reference.