Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2019, 03:20 AM   #1
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
How do I manually specify the fallback fonts for sans-serif, serif, monospace, etc.?

Based on hobnail's suggestion to test generic font families in DomesticExtremis's EPUB Feature Peeker thread, for fun, I modified the epub to add a section that outputted text solely using the generic font families of serif, sans-serif, monospace, cursive and fantasy (ex. { font-family: sans-serif } ) to see how KOReader would handle it.

Now, I know that the algorithm is for KOReader to use any fonts explicitly defined if it exists in the font folder or if it's embedded in the epub, and fallback to a single font if all of that fails. But I was wondering if it was possible to set the fallback fonts for the other generic font families explicitly?

For example, it looks like monospace is set properly and it is pulling a monospace font from somewhere (either Droid Sans Mono or Nimbus Mono; I can't tell), but it doesn't do it for the other generic font families (so if I have Charis SIL set as my default font (which is serif), it'll also use it for text set to use generic sans-serif if no other specific font is specified).

Having no explicit fallback font for Fantasy and Cursive I can understand, but as KOReader ships with a variety of serif and sans-serif fonts by default, at the very least, it should be safe to define specific fonts to fallback on for those generic families. Is there a place that I can specify that where it won't get over-written when KOReader gets updated, and if so, where? I'm assuming it'd be a CSS thing unless there's a specific KOReader application option somewhere that I'm missing?

Last edited by rtiangha; 12-17-2019 at 03:28 AM.
rtiangha is offline   Reply With Quote
Old 12-17-2019, 10:35 AM   #2
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,294
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
AFAIK there's only one fallback font defined by the user and is used to render glyphs that can't be rendered by your default font.

Feel free to open a question on github, where these kind of questions are more than welcome.
pazos is offline   Reply With Quote
Advert
Old 12-17-2019, 12:22 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,484
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
IIRC, we've covered the subject somewhat in a few possibly-completely-unrelated PRs in CRe ^^. Look for stuff from @poire-z and me, at least.

The gist of it being: because reasons. (I think? ).
NiLuJe is offline   Reply With Quote
Old 12-17-2019, 01:33 PM   #4
rtiangha
Evangelist
rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.rtiangha ought to be getting tired of karma fortunes by now.
 
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
Quote:
Originally Posted by NiLuJe View Post
IIRC, we've covered the subject somewhat in a few possibly-completely-unrelated PRs in CRe ^^. Look for stuff from @poire-z and me, at least.

The gist of it being: because reasons. (I think? ).
Good technical reasons rather than purely philosophical I hope, lol? :P

I was rather surprised that on my Kobo device, it'd pull its default of Georgia/Avenir Next for generic serif/sans serif when set to Publisher's Default, but couldn't pull a monospace one for kepubs (of course, the whole monospace thing being a known point of contention on Kobo at the moment, lol). I was hoping KOReader could do all three, at least.

I just figured that if the monospace font was set somewhere, there's no reason why any of the other generic font families couldn't be set either, (certainly for serif and sans-serif since some already ship in the stock distribution, although I'm sure there are some nice Open SIL fonts out there that could serve as generic fallbacks for cursive and fantasy too; Calibre on my Windows machine seems to pull Comic Sans and Impact for those respectively, which I found funny). I do understand the need for a single fallback font for when absolutely all else fails, though (one of the Notos being a good choice).

Last edited by rtiangha; 12-17-2019 at 01:38 PM.
rtiangha is offline   Reply With Quote
Old 12-19-2019, 05:54 AM   #5
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,636
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by rtiangha View Post
Good technical reasons rather than purely philosophical I hope, lol? :P
I wouldn't be inclined to call them good (it almost feels like a temporary hack to me in the way it works), but these things basically come down to the fact that CREngine implemented something a certain way and that's just the way it is unless someone puts in some (possibly quite serious) effort.
Frenzie is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serif, and sans-serif fonts SamL ePub 5 07-21-2011 06:00 PM
Which typeface should use for ebook, Serif or Sans-serif droople Workshop 8 06-13-2010 07:20 AM
Serif and Sans-Serif fonts in Libprs500 benong Calibre 1 02-06-2008 04:43 AM
Switching fonts from Sans to Serif TOucan iRex 4 07-16-2007 11:27 AM
Do you prefer the Reader's serif or its sans serif font? (poll) Alexander Turcic Sony Reader 9 11-25-2006 12:15 PM


All times are GMT -4. The time now is 10:01 PM.


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