View Single Post
Old 10-29-2026, 11:54 AM   #4
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,354
Karma: 16800000
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by JSWolf View Post
I know you can access fonts that are in the fonts directory using CSS code in an ePub. But can you do the same thing in CSS for KePub?
Unfortunately it hasn't been possible to do this with kepubs since Kobo changed their font handling to using a font sqlite database. Somewhere around fw v4.32, I think.

On a more optimistic note, the new Kobalt reading app does handle this sort of thing well with very little effort from the user, e.g. if I have an epub
with HTML:
Code:
<h2 class="fancy">Chapter 1</h2>
and with CSS:
Code:
.fancy {font-family:"My Fancy Font", serif; ... etc...}
As long as you've already got MyFancyFont.ttf as a custom font in the standard /fonts dir the Kobalt epub will find it and display it as long as you select 'Publisher default' in the Kobalt [Aa Text] menu. There's no need to add any @font-face to the epub's CSS nor embed any fonts.
jackie_w is offline   Reply With Quote