Edit-book: Incorrect reporting and fixing mismatched font-family name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Consider following code:
@font-face {
font-family: Liberation Serif Sans;
font-style: normal;
font-weight: normal;
src: url(../
According CSS standard the definition of font family is perfectly valid. Check this article: https:/
Actually edit-book reports completely false warning:
Warning [6 / 11]
OEBPS/Styles/
The font family name specified in the CSS @font-face rule: "Liberation" does not match the font name inside the actual font file: "Liberation Serif". This can cause problems in some viewers. You should change the CSS font name to match the actual font name.
Change the font name Liberation to Liberation Serif everywhere
If you click proposed action: "Change the font name Liberation to Liberation Serif everywhere" you will get following completely faulty result:
@font-face {
font-family: "Liberation Serif" Serif Sans;
font-style: normal;
font-weight: normal;
src: url(../
Technically, sure. But, using font family names like that will break in
lots of places, because lots of places require spaces to be quoted
(including various CSS validators). So just dont do that.
In any case the bug is in the cssutils package, not in calibre. /bitbucket. org/cthedot/ cssutils/ issues/ 66/incorrect- handling- of-spaces- in-font
https:/
I will look into adding a workaround for the cssutils bug to calibre, when I have
some time.