View Single Post
Old 05-16-2020, 12:32 PM   #11
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,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by pepak View Post
That's exactly what I am doing now.


I will probably be using ebook-convert.exe to convert my HTML files to EPUB, so in this sense I will be using Calibre, but I am perfectly willing to switch to a different command-line tool, including a self-developed one. The actual transfer will be done using regular file transfers, definitely NOT using an application.


I definitely prefer standard EPUB.


Not yet. I just got the Kobo a few days ago. Once I am comfortable with it, I will definitely be exploring available mods, but not straight away. Unless patching is the only way of getting properly functioning fonts.
----------------------------
The easiest way to do what you want for standard epubs is by using kobopatch as outlined by @DNSB above. However, as you specifically said you didn't want to do this yet there are other options.

Serif: to customise your standard body text the normal way would be to do nothing more than selecting your chosen serif font from the [Aa] menu (rather than Publisher Default). Avoid using the CSS property font-family in your body{...} and standard paragraph classes. Specifically avoid using font-family:serif everywhere as this will force use of built-in Georgia (at least it used to).

Sans-serif: Use simple font-family:sans-serif in your epub's internal CSS file. You will also need to find a way to inject the following CSS into every epub CSS file. I'm using your choice of Arial from post #1 for illustrative purposes. It can be any sideloaded sans font you like as long as you use the exact internal fontname in the red bits.
Code:
@font-face {font-family: sans-serif; font-weight: normal; font-style: normal; src: url("res:///fonts/normal/Arial")}
@font-face {font-family: sans-serif; font-weight: bold; font-style: normal; src: url("res:///fonts/bold/Arial")}
@font-face {font-family: sans-serif; font-weight: normal; font-style: italic; src: url("res:///fonts/italic/Arial")}
@font-face {font-family: sans-serif; font-weight: bold; font-style: italic; src: url("res:///fonts/bolditalic/Arial")}
If you were using calibre's send-to-device to transfer your books to the Kobo then there is an option (Modify CSS) in the calibre Kobo driver to do this automatically, but as you're not planning to do that you'll need to find your own "convenient" method.

Monospace: If your mono font of choice has a name which starts with Courier (e.g. your post #1 example Courier New), all you need to do is use simple font-family:monospace in your epub's internal CSS file. If you want to use a non-Courier font you can add 4 more @font-faces similar to the sans-serif example above. All starting @font-face {font-family: monospace; ...}.

---------------------------------
It's been a long time since I did this way myself but I'm going to assume it still works.

-------------------------------
FYI, I'll just mention another possible approach but you may not want to do this kind of experiment yet, so I won't go into detail here. It's possible to "fool" the Kobo into using your chosen sideloaded serif and sans-serif fonts both in the books you read when Publisher Default is chosen plus throughout the whole GUI. This method is particularly suited to those whose native language is not well-handled by the built-in GUI system fonts Georgia and Avenir, e.g. Cyrillic, Vietnamese.
jackie_w is offline   Reply With Quote