Thread: Troubleshooting Bug in KF8 firmware for eInk Kindles?
View Single Post
Old 01-13-2013, 04:51 AM   #5
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,524
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by JSWolf View Post
I may have found a bug in the KF8 firmware on eInk Kindles. The only Kindle I have access to test is the Kindle Touch with the new 5.3.2 firmware.

The bug is that if I use serif as the name in the font-family definition, the Kindle does not display the embedded font. But, if I use a name such as "Charis SIL", then it works fine. Is this a bug or is serif a reserved name and should not be used?
serif is certainly a keyword value. From here and more specifically:

Quote:
To avoid mistakes in escaping, it is recommended to quote font family names that contain white space, digits, or punctuation characters other than hyphens:

Code:
body { font-family: "New Century Schoolbook", serif }

<BODY STYLE="font-family: '21st Century', fantasy">
Font family names that happen to be the same as a keyword value ('inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', and 'cursive') must be quoted to prevent confusion with the keywords with the same names. The keywords 'initial' and 'default' are reserved for future use and must also be quoted when used as font names. UAs must not consider these keywords as matching the '<family-name>' type.
So if you have defined a font family with the name of serif, when you use it in some CSS you must specify it as 'serif' not serif, as otherwise it will refer to the default serif font, not the font called serif that you have defined.

It is not possible to redefine what font is used for the serif keyword inside a book. That is solely under the control of the rendering engine.

It's possible that a rendering engine might use your font called serif for the default serif font, but that's a rendering-engine specific choice.

In short: No, it's not a bug.
pdurrant is offline   Reply With Quote