Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 02-08-2023, 05:48 AM   #1
paperback
Connoisseur
paperback began at the beginning.
 
Posts: 61
Karma: 10
Join Date: Feb 2022
Device: None
Unexpected missing generic font family

Using the "Check book" function throws up the following error: "Unexpected missing generic font family (font-family-no-missing-generic-family-keyword)."

For the following CSS declaration: span.font {font-family: "KaiTi";}

But the font is showing as available in the "Fonts" list; and "Manage fonts" also shows that the font is available and embedded.

This is happening regularly with embedded fonts in downloaded ebooks. What is causing the error and how to resolve it?
paperback is offline   Reply With Quote
Old 02-08-2023, 06:13 AM   #2
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,564
Karma: 87456643
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Generic means something like:
span.font {font-family: "KaiTi", serif;}

It's a stricter check for a fall-back font. It can be ignored if font is embedded and ereader or app uses embedded font.
Some ereaders or apps won't use embedded fonts, or user doesn't select Publisher.

However it's a very Western-centric idea (Latin-Roman families). Putting the wrong one, or having it at all only matters if your specific font isn't embedded and the reading renderer can't display it or user disables publisher setting. Old mobi, Kindle Apps on iOS and some Android apps for epubs never use embedded fonts.

Common generic names:

Quote:
Generic Font Families

In CSS there are five generic font families:

Serif fonts have a small stroke at the edges of each letter. They create a sense of formality and elegance.
Sans-serif fonts have clean lines (no small strokes attached). They create a modern and minimalistic look.
Monospace fonts - here all the letters have the same fixed width. They create a mechanical look.
Cursive fonts imitate human handwriting.
Fantasy fonts are decorative/playful fonts.

All the different font names belong to one of the generic font families.
https://www.w3schools.com/CSS//css_font.asp

If you don't what it will be read on, find the generic family the font KaiTi belongs to.


This "error" baffled me the first time I saw it.

Warning, while www.w3schools.com is your friend on CSS and HTML, not all of it applies to ebooks, which is more like "Print" CSS on a webpage.

Keep it simple:

Last edited by Quoth; 02-08-2023 at 06:16 AM.
Quoth is offline   Reply With Quote
Advert
Old 02-08-2023, 01:45 PM   #3
paperback
Connoisseur
paperback began at the beginning.
 
Posts: 61
Karma: 10
Join Date: Feb 2022
Device: None
Quote:
Generic means something like:
span.font {font-family: "KaiTi", serif;}
That did the trick. Thanks.
paperback is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Embedding font breaks font-family? Calan Amazon Kindle 1 06-13-2020 11:48 AM
Modification of the footer font family is missing in latest patches... price Kobo Developer's Corner 4 03-01-2019 10:05 PM
Is there really a need to specify a font-family? spamis ePub 11 03-01-2017 06:38 AM
Mobigen Sans-serif generic family in mobigen generated .mobi files Symmetria Kindle Formats 7 12-10-2013 03:47 PM


All times are GMT -4. The time now is 11:55 PM.


MobileRead.com is a privately owned, operated and funded community.