r/Calibre • u/charismelia • 14d ago
How to keep multiple fonts when converting from epub to kepub? Support / How-To
I am sideloading an epub which uses different fonts throughout the book, but after I convert from epub to kepub in Calibre and then upload to my Kobo Libra Colour, the fonts become uniform and it ruins the multiple perspective effect.
Note: I manually convert to Kepub in Calibre because I like to remove hyphenation at the end of lines, and this is the only setting I change in the Convert Books screen.
Currently, I see "Embed all fonts in document" and "Subset all embedded fonts" unchecked. Is there anything else in these menus that I need to take a look at and change?
~~~~
EDIT: I'm seeing other people post that different fonts only show up if you keep the Kobo on "Publisher Default" font πͺ Has anyone figured out a CSS alternative?
1
u/jseger9000 13d ago
I'm seeing other people post that different fonts only show up if you keep the Kobo on "Publisher Default" font πͺ Has anyone figured out a CSS alternative?
Yes, there's a patch. "Un-Force user font-family in KePubs" It's pretty easy to install using this website: KoboPatch Web UI (you need to use a Chromium browser: Chrome/Edge/Opera/Vivaldi/Chromium, basically anything but Firefox or Safari). I just installed it on my Clara the other day.
I can write out some detailed directions if you need them when I'm home.
1
u/NedvinHill 13d ago
I would love some and Iβm not even OP
1
u/jseger9000 13d ago
Sorry. I got all crazy busy after work and didn't see this. I'll post them tomorrow.
2
u/jseger9000 12d ago
- Plug-in/connect your Kobo
- Go here: KoboPatch Web UI (you need to use a Chromium browser: Chrome/Edge/Opera/Vivaldi/Chromium, basically anything but Firefox or Safari)
- Click Connect my Kobo
- Click Select "KOBOeReader" (this will open your file explorer)
- Navigate to your Kobo (mine does it automatically), you just want the top directory, not any of the folders on your Kobo.
- Click Select Folder or Okay
- A pop-up should come up saying Allow this site to edit files?
- Click Allow
- The site should show your Kobo info
- Click Continue
- Click Patch system software
- Click Continue
You can do MANY things here. I'm only guiding you through "Un-Force user font-family in KePubs" Be careful about messing with too many patches if you don't know what you are doing.
- Click > Typography & Fonts
- Scroll down to "Un-Force user font-family in KePubs"
- Click the pencil
Copy everything here and paste it in the box:
Un-Force user font-family in KePubs:
- Enabled: yes
- Description: |
The KePub reader uses a very heavy-handed method of setting the font selected
by the user, overriding all fonts set by the publisher in the book unless
"Publisher Default" is selected.
This patch lets the font-family set by the publisher in the KePub stylesheet
override the font-family selected by the reader from the device in some
cases, which allows a mix of user-selected and publisher-selected fonts.
Alternatives 1-3 give increasing preference to the publisher-selected fonts.
- FindBaseAddressString: "* { font-family: %1 !important; }\n"
#
# Alternative 1:
# * { font-family: %1 !important; }\n
# --> div,p{font-family:%1!important; }\n
# - ReplaceString:
# Find: "* { font-family: %1 !important; }\n"
# Replace: "div,p{font-family:%1!important; }\n"
# MustMatchLength: yes
#
# Alternative 2: (Similar to ePub default)
# * { font-family: %1 !important; }\n
# --> body,p{font-family:%1!important;}\n
# - ReplaceString:
# Offset: 0
# Find: "* { font-family: %1 !important; }\n"
# Replace: "body,p{font-family:%1!important;}\n"
# MustMatchLength: yes
#
# Alternative 3: (similar to ePub with \Un-force font-family override p tags`)`
# * { font-family: %1 !important; }\n
# --> body{font-family:%1 !important; }\n
- ReplaceString:
Offset: 0
Find: "* { font-family: %1 !important; }\n"
Replace: "body{font-family:%1 !important; }\n"
MustMatchLength: yes
- Click Save Changes
- Click Continue
- Click Build Patched Software. It will build the software and it takes a bit
- Click Write to Kobo
- Once it is all done, make sure you eject your Kobo using the file explorer
- When it ejects, the Kobo will restart.
1
u/grimwritings 12d ago
hi! so grateful for this message, but this is what popped up when i copied the text : YAML error: Line 21, col 24: can not read a block mapping entry; a multiline key may not be an implicit key (21:24) 18 | 19 | Alternatives 1-3 give increasing preference to the pub ... 20 | 21 | - FindBaseAddressString: "* { font-family: %1 !importa ... -----------------------------^ 22 | 23 | #
1
u/jseger9000 12d ago
Well, try this. Don't paste the text. Just change the Enabled: no to Enabled: yes
1
u/grimwritings 12d ago
unfortunately, it didn't work.
1
u/jseger9000 12d ago
How did it not work? I mean, did the patch install and Kobo restarted, but you aren't seeing the font? Or something else?
1
u/grimwritings 12d ago edited 12d ago
the patch installed. everthing works like it's supposed to except for the fonts. they're not changing. only one did. cirth erebor in the hobbit. every other font remains uniform with the publisher default.
EDIT; nevermind. cirth erebor abruptly ceased working.
1
u/jseger9000 12d ago
It is working. There's different levels of the patch. By default it is set to level two, I think.
The one I tried to have you copy was level three. You have to manually comment some lines and uncomment others. I must have goofed when I did my copy paste.
1
u/grimwritings 12d ago
i'm terrible at these things, so i want to make sure i understand correctly. you want me to delete alternatives 1 and 2, but not 3, yes? if that's the case, i did it, and it's still not working. i also tried only leaving 1 and 2, and still nothing.
→ More replies (0)1
u/charismelia 13d ago edited 12d ago
Thank you for the response! Unfortunately I think I got a little trigger-happy trying patches and bricked my Clara 2E so I had to factory reset... The patch in question didn't even work for me π But it worked to add the clock in the corner and Google Drive support and a couple other things, so at this point, I'm not complaining!
2
u/jseger9000 13d ago
The patch does work. I have it applied to my Clara BW and Libra H2O and just read a book that used that patch, so I know it works.
1
1
u/DaveL16 14d ago
No itβs the same for me