Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-17-2025, 04:01 PM   #1
jindroush
Connoisseur
jindroush doesn't litterjindroush doesn't litter
 
Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
Please explain fonts behavior

I encountered this puzzling behavior. I know WHEN it happens, but I'd like to know WHY it happens

So I create Word docx with 3x3 matrix of three fonts and three versions - regular, italic and bold. I tick option to embed all fonts, no subsetting.
See first screenshot.

I let Calibre convert it to AZW3. I check it in Calibre Viewer - second screenshot, looks the same (fonts are there, italic is italic, bold is bold)

I upload it to my Kindle, inspect it with Bookerly. Third screenshot, italic is italic, bold is bold.

I switch to Publisher font. Fourth screenshot, Regular and Italic is okay, bold is Regular now!

When I tick option "Do Not Embed Common System Fonts", save DOCX, convert to AZW3 and upload it to Kindle, Arial and Times are Bold, Source is not.

And, when I don't embed any font to Word file, everything is correct on Kindle side.

So we now know WHEN this happens -> when Word embeds bold font to DOCX file, Calibre uses this embedded variant and this is then for some reason ignored on Kindle. When the font is not present in DOCX (no embedding at all, or no system font embedding), Calibre uses installed font from Windows and such works great on Kindle.

My question for people who understand fonts -> what does Word font embedding do to Bold fonts that Kindle does not like? And/or is there any option hidden anywhere which would let me use only font metadata from Word and not actual font files?
Attached Thumbnails
Click image for larger version

Name:	scrn_word.jpg
Views:	75
Size:	52.9 KB
ID:	215072   Click image for larger version

Name:	scrn_azw3_cal_viewer.jpg
Views:	73
Size:	36.2 KB
ID:	215073   Click image for larger version

Name:	scrn_kindle_bookerly.jpg
Views:	79
Size:	82.1 KB
ID:	215074   Click image for larger version

Name:	scrn_kindle_publisher_font.jpg
Views:	72
Size:	75.6 KB
ID:	215075   Click image for larger version

Name:	scrn_kindle_publisher_font2.jpg
Views:	64
Size:	71.6 KB
ID:	215076   Click image for larger version

Name:	scrn_word_sett.jpg
Views:	64
Size:	20.4 KB
ID:	215077  
Attached Files
File Type: docx test - Unknown.docx (740.8 KB, 72 views)
jindroush is offline   Reply With Quote
Old 04-17-2025, 09:47 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This has nothing to do with fonts and everything to do with kindle firmware. only amazon can explain the kindle's behavior.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-18-2025, 06:01 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,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
What Kovid writes, but also:
I never embed fonts in Word / LO unless it's being sent to a different computer. It slows load.

AND

If fonts are needed to be embedded, do it in Calibre. You may need to use the Font Tools in the Editor and also add Generic fallbacks (there are 5). Always convert Docx to epub and edit that. Then epub -> azw3. Calibre can search your PC for the fonts.

AND

Make sure they are compatible kinds of fonts and not encrypted. Also if for others ensure that they are "free". Sub-setting with non-Asian fonts isn't usually an issue. Been uploading epub to Amazon and making azw3 from epub with Calibre for about 11 years.

There are three definite issues with fonts on Kindle:
1) The old mobi format only has generic serif, sans and monospace, each in normal, bold, italic and bold italic.
2) If the fonts arn't declared exactly right in the first stage epub, (azw3/KF8 or old mobi/KF7, or dual mobi which has both) then you may only get default serif.
3) If you upload an epub to Amazon (KDP or Send to Kindle) they may delete some or all of the embedded fonts. Too many fonts associated with <p> or body text causes it.

Last edited by Quoth; 04-18-2025 at 06:04 AM.
Quoth is offline   Reply With Quote
Old 04-18-2025, 11:39 AM   #4
jindroush
Connoisseur
jindroush doesn't litterjindroush doesn't litter
 
Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
This has nothing to do with fonts and everything to do with kindle firmware. only amazon can explain the kindle's behavior.
Yes and no. Now I was able to get to the root cause. It's different CSS font declaration in conversion, depending if the font comes from system or from word.

When font is NOT embedded in Word, and Calibre finds it in the system, such CSS is created by Calibre conversion process:
Code:
@font-face {
  font-family: "Source Serif 4";
  font-weight: normal;
  font-style: normal;
  font-stretch: normal;
  src: url(fonts/Source-Serif-4-Regular.ttf);
}
@font-face {
  font-family: "Source Serif 4";
  font-weight: normal;
  font-style: italic;
  font-stretch: normal;
  src: url(fonts/Source-Serif-4-Italic.ttf);
}
@font-face {
  font-family: "Source Serif 4";
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
  src: url(fonts/Source-Serif-4-Bold.ttf);
}

When font IS embedded in Word, and Calibre reads it from DOCX, only this CSS is created:
Code:
@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/Source_Serif_4_-_Regular.ttf);
}
@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/Source_Serif_4_-_Italic.ttf);
  font-style: italic;
}
@font-face {
  font-family: "Source Serif 4";
  src: url(fonts/Source_Serif_4_-_Bold.ttf);
  font-weight: bold;
}

When I add
Code:
font-weight: normal;
for non-Bold fonts, it works and Kindle is not mismatching the fonts anymore (don't ask me why)


Do you think Calibre can always create 'full' CSS @font-face for both embedded and non-embedded fonts?
jindroush is offline   Reply With Quote
Old 04-18-2025, 11:54 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,342
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...5d13b932f84f2f
kovidgoyal is offline   Reply With Quote
Advert
Old 04-18-2025, 12:21 PM   #6
jindroush
Connoisseur
jindroush doesn't litterjindroush doesn't litter
 
Posts: 94
Karma: 104
Join Date: Nov 2014
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
Thanks!
jindroush is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Could Somebody Explain This To Me? Kiwisaurus Kobo Reader 5 10-06-2018 09:10 AM
frame indent behavior and wrap spacing behavior rjwse@aol.com Conversion 0 03-10-2015 12:03 PM
Strange behavior with embedded fonts Rainer Zenz Kobo Reader 6 03-24-2013 09:51 PM
Can someone explain..... Slider1960 General Discussions 18 07-10-2010 05:38 AM


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


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