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 03-24-2021, 10:50 AM   #1
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Missing font face/styles

Converting DOCX to epub.
I'm losing bold on Droid Sans and Italic on Georgia. If I select Georgia on the Kobo Libra the italic style appears.

Not sure if it's "Subset fonts"
OR
If I run Check in the Editor it complains the font names are not properly something... Though that's not caused an issue on my Nook, Apps, Kobos or Sony, or on upload to KDP.
I selected "automatically correct" and then it seem to rename them.

Anyway, since doing both of those it's broken as described on the Kobo Libra, but previously it was OK.

Non-bold and non-italic of all the fonts are OK.

Last edited by Quoth; 03-24-2021 at 11:50 AM.
Quoth is offline   Reply With Quote
Old 03-24-2021, 11:13 AM   #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: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your fonts are working everywhere except the Kobo??
kovidgoyal is offline   Reply With Quote
Advert
Old 03-24-2021, 11:45 AM   #3
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
I've only tested in the Calibre viewer (OK) and the Kobo Libra (Broken) right now.

I repeated this in stages and each time removed and re-sent the epub to the Kobo Libra:

I did a conversion without fixing the spaces in the font file names. That worked OK on the Kobo and viewer.

Then I did the "try to fix errors" on
Quote:
Warning [6 / 7]
fonts/Georgia - Italic.ttf
The filename fonts/Georgia - Italic.ttf contains unsafe characters, that must be escaped, like this fonts/Georgia%20-%20Italic.ttf. This can cause problems with some e-book readers. To be absolutely safe, use only the English alphabet [a-z], the numbers [0-9], underscores and hyphens in your file names. While many other characters are allowed, they may cause problems with some software.
This renamed the actual files and the references in the CSS to have underlines instead of spaces.

Except this time it works on the kobo libra as well as viewer!

I've seen this problem before occasionally and re-exporting the DOCX using SAVE AS (after going to properties and Include Fonts), then re-converting DOCX to epub2 has been OK.

So obviously it's intermittent. Perhaps in "Check" in the epub edit in Calibre I've asked to automatically fix, which renames the font files, but then somehow not saved the changed CSS file? That though would lose other fonts. But perhaps affect on bold and italic fallback is worse?
Quoth is offline   Reply With Quote
Old 03-24-2021, 07:11 PM   #4
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
That sounds like the general restriction in Kobo ereaders that the font file name must match the internal name of the font. Renaming it to not use spaces, breaks that. How the device should handle this, I don't know, but, it is probably a feature or bug in the Adobe RMSDK.
davidfor is offline   Reply With Quote
Old 03-25-2021, 08:21 AM   #5
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
I'll investigate further. The Book Check thing in Editor does seem to rename the CSS as well as the file. I'd expect those to have to match. So I may be doing something subtly wrong on the occasions it doesn't work.

Edit:
Right now I don't seem to be able to recreate the issue.
I see that if you try to quit the Editor without saving there is a warning about saving changed files. But the fonts are ALREADY renamed. So if you forget the editor is open and send the epub to the Kobo, then the CSS is original. Hence quite reasonably there is some brokenness.

So I will click on Save always straight after letting the Check tool rename the fonts. Hopefully I won't see this problem ever again. Though I'm only guessing that it's what I've done wrong occasionally.

Last edited by Quoth; 03-25-2021 at 08:31 AM.
Quoth is offline   Reply With Quote
Advert
Old 03-25-2021, 11:16 AM   #6
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: 73,931
Karma: 128903250
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 davidfor View Post
That sounds like the general restriction in Kobo ereaders that the font file name must match the internal name of the font. Renaming it to not use spaces, breaks that. How the device should handle this, I don't know, but, it is probably a feature or bug in the Adobe RMSDK.
But that should not matter for embedded fonts in an eBook.
JSWolf is offline   Reply With Quote
Old 03-25-2021, 03:51 PM   #7
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by JSWolf View Post
But that should not matter for embedded fonts in an eBook.
Embedded font names certainly need to match between the CSS and the actual file. The epub is a zip archive really. So the host ereader has to be able to parse the filenames used for the included fonts and looks for what's referenced in the CSS.
Quoth is offline   Reply With Quote
Old 03-25-2021, 04:05 PM   #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: 73,931
Karma: 128903250
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 Quoth View Post
Embedded font names certainly need to match between the CSS and the actual file. The epub is a zip archive really. So the host ereader has to be able to parse the filenames used for the included fonts and looks for what's referenced in the CSS.
You can embed Courier and in the CSS call it script. The ePub won't mind.

font-family: script;
JSWolf is offline   Reply With Quote
Old 03-25-2021, 08:11 PM   #9
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
You can embed Courier and in the CSS call it script. The ePub won't mind.

font-family: script;
Which is not what I said. "file name" and "internal name" is what I said. Just like when sideloading fonts. I am sure I have seen issues with this, but, I haven't tried it recently so, I might be wrong.
davidfor is offline   Reply With Quote
Old 03-26-2021, 12:14 PM   #10
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by JSWolf View Post
You can embed Courier and in the CSS call it script. The ePub won't mind.

font-family: script;
I'm not going to do that sort of guessing and testing. It's best if all the names everywhere for the same thing match.

Only conversions from Gutenberg are for my own amusement. Conversions from DOCX to epub are entirely for distribution to unknown devices via Amazon, Google, Smashwords and Partners. Amazon does their own epub to everything else conversion. So the epub needs to be correct.

But I test on real ereaders and apps too, because you can pass epubcheck and it can look fine on the Calibre viewer but have "wrong" image formatting, locked line height, missing faces etc.

Last edited by Quoth; 03-26-2021 at 12:19 PM.
Quoth is offline   Reply With Quote
Old 03-29-2021, 06:46 AM   #11
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Still intermittently missing Georgia Italic and sometimes Droid Sans Bold on the Kobo Libra in Publisher mode. The italics are OK if I select built-in Georgia.

If I go to Edit in Calibre, delete the font files of "missing" styles, use Embed Fonts and then Subset Fonts to add them back, then Check to rename the files it works.

Linux Mint 20.1, Mate Desktop, Calibre 5.14, epub2 conversion from a docx saved from LibreOffice Writer with Embed fonts ticked in Properties.

It's strange that it's only some ebook conversions from docx. Others with apparently the same fonts and styles are OK.

I tried NOT embedding ANY fonts at the conversion GUI and then adding them in the Editor. That didn't work either.

I suspect it's something to do with "Book Check" (the ladybird bug icon) in the editor when it renames the files and edits the CSS to match. If I don't run that the ebook is OK because the Kobo doesn't mind font files inside the epub with spaces in the name. Yet "Check" does seem to be also renaming the URL references as well as the fonts, basically replacing "space" with "_" in both.

The renamed URLs and font files SEEM to be the same. Check does object if you manually edit those to not match.
Quoth is offline   Reply With Quote
Old 03-30-2021, 05:42 PM   #12
GranitStateColin
Member
GranitStateColin began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2017
Device: none
The filename issue (though maybe not the font not appearing on the Kobo device) is the same issue that I'm wrestling with -- when using Calibre to convert a Word DOCX to EPUB with embedded fonts, the resulting fonts will always have spaces in them (regardless of the names of the font used in Word). I'm not sure if this is Word or Calibre adding them, but it does create problems for at least many EPUB submission sites. To be fair, that doesn't mean it will necessarily create a problem when trying to send the EPUB directly to a device like the Kobo Clara or Libra.

Still, a lot of these hassles would go away if Calibre, like Word's PDF exporter, would just strip out the spaces in the embedded font file name. GhostScript, the open source PostScript converter (commonly used by third party PDF creators) also avoids adding spaces when it embeds the font. So far, Calibre is the only program I see that always adds spaces, but I can't rule out definitively that Word is doing it and then Calibre is just passing that problem through to the final EPUB, but I can say that all the other programs I've tested don't do this.

Note that if you're not embedding the font the Libra will use the closest matching font on the device. It's only if you embed the font that the filenames have a problem. Could this explain what appears to be an intermittent problem?
GranitStateColin is offline   Reply With Quote
Old 03-30-2021, 05:51 PM   #13
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
It's stranger than that. The Ladybug Check program/tool offers to fix and puts underlines instead of spaces in the font names and CSS. For some reason that only works on SOME of the fonts!

I will for now simply manually edit out the spaces in the font filename and the CSS as that works.
Quoth is offline   Reply With Quote
Old 03-31-2021, 12:18 PM   #14
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,145
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Editing out the spaces manually doesn't work.

This works:
Delete all the embedded font files.
Delete the URLs in page.csss
Use Embed Fonts in Editor, which imports them with no spaces in the file names, unlike the GUI option on Look & Feel.
Subset them
A fonts.css is now added, so go to page.css and delete the now duplicated font entries. The html files will now automatically have fonts.css

Works on Kobo Libra.

Calibre is finding the required fonts when using Embed Fonts in the Editor apparently based on name in the CSS classes using them and sourcing them both in the normal system wide font directory and my local extra fonts in ~/.fonts (where ~ means home directory). Obviously the GUI option to Embed fonts is doing something odd as many of the font file names have spaces, they don't when added in the Editor.

Last edited by Quoth; 03-31-2021 at 12:28 PM. Reason: Source
Quoth is offline   Reply With Quote
Old 03-31-2021, 01:46 PM   #15
GranitStateColin
Member
GranitStateColin began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2017
Device: none
Quote:
Originally Posted by Quoth View Post
Editing out the spaces manually doesn't work.
@Quoth, curious: does the editor's auto-fix work for this problem, or does it also fail? By auto-fix, I mean Run Check in the upper right pane of the editor, which will flag all the cases of fonts with spaces in the names as warnings, then in that same pane, hit "Try to correct all fixable errors automatically" or, if you only want to do one font at a time, "Rename all the file fonts/<<your font name>> to <<your_font_name>>"?

Does that fix the problem, still fail in the same way, or fail in some new, different way?

Thanks,
Colin
GranitStateColin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Modify @font-face on Conversion? JonnieCache Conversion 5 04-21-2019 09:46 PM
Suppressing font-face declarations roger64 Editor 2 09-26-2017 05:46 AM
@font-face is not embedded iliakan Conversion 2 01-12-2015 02:29 AM
Am I using @font-face correctly? phossler Sigil 12 11-30-2012 04:38 PM
Indents not working + CSS styles missing virtual_ink ePub 1 07-04-2011 07:41 AM


All times are GMT -4. The time now is 02:32 AM.


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