View Single Post
Old 04-23-2022, 06:54 PM   #43
codychan
Groupie
codychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud ofcodychan has much to be proud of
 
codychan's Avatar
 
Posts: 159
Karma: 27950
Join Date: Nov 2018
Device: Kobo Aura One, Kobo Forma
Quote:
Originally Posted by jackie_w View Post
Firstly, in fw 4.32.19501 patch Un-Force user font-family in KePubs, with the option 3 you've selected, is working the same as it always has done. I know this because I use it myself.

I believe the font problems you are seeing in your screenshots are due to the major changes Kobo have made to font handling. This has particularly affected certain kepubs where some convenient undocumented "font tricks", which used to work pre-4.32, no longer do. I know this because ~50% of the kepubs loaded on my own Kobos are affected by this change.

If you understand HTML/CSS the following info may be of interest.

-------------------------------------------

Some general background pre-4.32 ...
The official standard way to make your book display fonts referenced by name (e.g. font-family: "My Special Fontname") in the epub/kepub's internal CSS is to embed all those named fonts into the book and include matching @font-face statements in the CSS to link the font to the relevant embedded .ttf or .otf file. As long as you've done it correctly it will work in Kobo epubs and kepubs with a caveat for kepubs:
  • on an unpatched Kobo you must also select "Publisher Default" from the [Aa] font menu.
  • if you apply kobopatch Un-Force user font-family in KePubs you can select any font you like from the [Aa] font menu.
Publishers don't have a choice, they have to follow the standards. But for your own books ... no-one really wants to spend time embedding fonts if there's an easier way.

Fortunately, for kepub users, there *was* an easier way pre-4.32. I've never seen it documented as a supported feature, so maybe it was just a "happy accident". You didn't need to embed any font files or add any @font-face statements to CSS. If the kepub internal CSS contained any style
Code:
font-family: "My Special Fontname";
then the kepub reading app could "find" the font to display if it was present in your Kobo's sideloaded /fonts directory with the correct "My Special Fontname" internal name and external filename(s).

Fw 4.32 onwards ...
Unfortunately this kepub undocumented feature no longer works. I have no idea whether it is due to collateral damage from all the font-related changes in fw 4.32 or a deliberate removal of some old code.

Selecting a sideloaded font from the [Aa] font menu should still work in the same way it always has done for the main body text in kepubs.

-------------------------------------------

What can you do about it? I don't think there is a painless answer unless Kobo see the current situation as a bug (unlikely, but you never know) and "fix" it in a future fw. Special named fonts (e.g. for fancy headings, dropcaps, monospace, true small-caps, ...) will need to be embedded to be visible in kepubs.
I'm using Un-Force user font-family in KePubs patch, and I enable Alternative 3 instead of Alternative 1 to make the multiple-font work. It has been working for a long time, I can confirm that it doesn't work for current firmware/patch v4.32.19501. It doesn't work, I mean, I use a font specific for some parts in my book's css, but Kobo won't use it, it fallbacks to the default font instead, I can change the font in Kobo's Aa for those parts in my book that I haven't set font, so technically the multiple-font feature can still be working but I cannot choose the font I need in css's file.

Last edited by codychan; 04-24-2022 at 05:22 PM.
codychan is offline   Reply With Quote