Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-12-2023, 08:11 AM   #1
VelvetElvis
Addict
VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.
 
VelvetElvis's Avatar
 
Posts: 259
Karma: 20028
Join Date: Jan 2011
Location: Canada
Device: Fire HD8, Asus, Sony (T1, PRS-300), Kobo (Glo, Touch, Wireless)
Font-family error help needed

I make a point of using the Edit Book function on every book I add to Calibre. In the last few months, I’ve been seeing a warning I’ve never seen before:

“Unexpected missing generic font family (font-family-no-missing-generic-family-keyword)”

I’ve tried using the help link to figure out how to deal with this, as well as searching the Forum, but I’m just not understanding this. The 2 examples shown *look* OK to me, but something isn’t right. Any guidance would be greatly appreciated.
Attached Thumbnails
Click image for larger version

Name:	Calibre.jpg
Views:	209
Size:	53.3 KB
ID:	203145  
VelvetElvis is offline   Reply With Quote
Old 08-12-2023, 08:25 AM   #2
SomeSteve
Addict
SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.SomeSteve ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 5655330
Join Date: Sep 2012
Device: Sony PRS-T2, Kindle
Quote:
Originally Posted by VelvetElvis View Post
I make a point of using the Edit Book function on every book I add to Calibre. In the last few months, I’ve been seeing a warning I’ve never seen before:

“Unexpected missing generic font family (font-family-no-missing-generic-family-keyword)”
Until someone more knowledgeable chimes in, try removing the quotation marks around "serif" and "sans serif" (or "sans-serif": not sure if it should be hyphenated).
SomeSteve is offline   Reply With Quote
Old 08-12-2023, 08:40 AM   #3
Quoth
Still reading
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: 14,669
Karma: 109269703
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
There are five Generic fall back font-family names:
  1. serif
  2. sans-serif
  3. monospace
  4. cursive
  5. fantasy
Mobi format only supports the first three (and has no separate CSS anyway).
Each also can be normal, italic, bold or italic bold.
Oblique is a special decoration, not needing an italic font. Cursive is also unrelated to italic. Note that some letters in an italic font are a different style, depending on font. Oblique simply slants the selected font.

There is a hyphen and no quotes.
Quotes are only used on other fonts that have a space in the name.

Examples
https://www.w3schools.com/Css/css_font_fallbacks.asp
CSS
Code:
body {
  font-family: "Courier New", Courier, monospace;
}

Last edited by Quoth; 08-12-2023 at 08:50 AM.
Quoth is offline   Reply With Quote
Old 08-12-2023, 09:48 AM   #4
VelvetElvis
Addict
VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.
 
VelvetElvis's Avatar
 
Posts: 259
Karma: 20028
Join Date: Jan 2011
Location: Canada
Device: Fire HD8, Asus, Sony (T1, PRS-300), Kobo (Glo, Touch, Wireless)
Quote:
Originally Posted by SomeSteve View Post
Until someone more knowledgeable chimes in, try removing the quotation marks around "serif" and "sans serif" (or "sans-serif": not sure if it should be hyphenated).
Well colour me dumb.
I did try to remove the quotes previously, to no avail, but your tip about hyphenation did the trick.
Thank you!
VelvetElvis is offline   Reply With Quote
Old 08-12-2023, 09:50 AM   #5
VelvetElvis
Addict
VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.
 
VelvetElvis's Avatar
 
Posts: 259
Karma: 20028
Join Date: Jan 2011
Location: Canada
Device: Fire HD8, Asus, Sony (T1, PRS-300), Kobo (Glo, Touch, Wireless)
Quote:
Originally Posted by Quoth View Post
There are five Generic fall back font-family names:
  1. serif
  2. sans-serif
  3. monospace
  4. cursive
  5. fantasy
Mobi format only supports the first three (and has no separate CSS anyway).
Each also can be normal, italic, bold or italic bold.
Oblique is a special decoration, not needing an italic font. Cursive is also unrelated to italic. Note that some letters in an italic font are a different style, depending on font. Oblique simply slants the selected font.

There is a hyphen and no quotes.
Quotes are only used on other fonts that have a space in the name.

Examples
https://www.w3schools.com/Css/css_font_fallbacks.asp
CSS
Code:
body {
  font-family: "Courier New", Courier, monospace;
}
Thank you!
Not sure how I missed the hyphenation, but that did the trick.
VelvetElvis is offline   Reply With Quote
Old 08-12-2023, 10:10 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,176
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by SomeSteve View Post
Until someone more knowledgeable chimes in, try removing the quotation marks around "serif" and "sans serif" (or "sans-serif": not sure if it should be hyphenated).
That is the correct fix.
These are keywords and do not get quoted like a font name would.
@quoth has listed these (keyword) names.
Rumor has it that Kobo does NOT include monospace on the device. You must embed
theducks is offline   Reply With Quote
Old 08-12-2023, 11:55 AM   #7
VelvetElvis
Addict
VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.VelvetElvis can self-interpret dreams as they happen.
 
VelvetElvis's Avatar
 
Posts: 259
Karma: 20028
Join Date: Jan 2011
Location: Canada
Device: Fire HD8, Asus, Sony (T1, PRS-300), Kobo (Glo, Touch, Wireless)
Quote:
Originally Posted by theducks View Post
That is the correct fix.
These are keywords and do not get quoted like a font name would.
@quoth has listed these (keyword) names.
Rumor has it that Kobo does NOT include monospace on the device. You must embed
Thank you. Problem solved.
VelvetElvis is offline   Reply With Quote
Old 08-13-2023, 10:38 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,295
Karma: 148951763
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
That is the correct fix.
These are keywords and do not get quoted like a font name would.
@quoth has listed these (keyword) names.
Rumor has it that Kobo does NOT include monospace on the device. You must embed
On a Kobo, you have to embed for KePub. But as long as you have a monospace font family internally names as Courier (I'm not 100% sure, but you may just have to have the internal name start as Courier). You can display monospace fonts from ePub without having to embed. But you do need code in CSS to reference the font on the Kobo.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font selection by font family EricTyson KOReader 2 02-25-2023 08:16 AM
Troubleshooting Embedding font breaks font-family? Calan Amazon Kindle 1 06-13-2020 11:48 AM
Is there really a need to specify a font-family? spamis ePub 11 03-01-2017 06:38 AM
Changing Font Family thymaster Sony Reader 6 09-19-2010 01:10 AM
Font Family should help Contrast jbruce Sony Reader 31 04-17-2009 12:43 AM


All times are GMT -4. The time now is 02:54 PM.


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