Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2021, 09:23 AM   #1
boredhominid
Junior Member
boredhominid began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2021
Device: kobo libra h2o
Does changing default UI fonts through settings.reader.lua works?

I added a fontmap portion to my settings.reader.lua but it doesn't work instead a default settings.reader.lua is created and loaded. Does this work? If so what am I missing?
Code:
["fontmap"] = {
        ["cfont"] = "IBMPlexSans-Regular.ttf",
        ["tfont"] = "IBMPlexSans-Bold.ttf",
        ["smalltfont"] = "IBMPlexSans-Bold.ttf",
        ["x_smalltfont"] = "IBMPlexSans-Bold.ttf",
        ["ffont"] = "IBMPlexSans-Regular.ttf",
        ["smallffont"] = "IBMPlexSans-Regular.ttf",
        ["largeffont"] = "IBMPlexSans-Regular.ttf",
        ["rifont"] = "IBMPlexSans-Regular.ttf",
        ["pgfont"] = "IBMPlexSans-Regular.ttf",
        ["scfont"] = "IBMPlexMono.ttf",
        ["hpkfont"] = "IBMPlexMono.ttf",
        ["hfont"] = "IBMPlexSans-Regular.ttf",
        ["infont"] = "IBMPlexMono.ttf",
        ["smallinfont"] = "IBMPlexMono.ttf",
        ["infofont"] = "IBMPlexSans-Regular.ttf",
        ["smallinfofont"] = "IBMPlexSans-Regular.ttf",
        ["smallinfofontbold"] = "IBMPlexSans-Bold.ttf",
        ["x_smallinfofont"] = "IBMPlexSans-Regular.ttf",
        ["xx_smallinfofont"] = "IBMPlexSans-Regular.ttf",
    },
boredhominid is offline   Reply With Quote
Old 09-14-2021, 10:34 AM   #2
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,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
It's a bit unclear what you mean by "this". If you mean that's an excerpt, I'd have to try at home. If you mean that's all you put in there, it's incomplete and should look closer to:

Code:
return {
    ["fontmap"] = {
        ["cfont"] = "IBMPlexSans-Regular.ttf",
        ["tfont"] = "IBMPlexSans-Bold.ttf",
        ["smalltfont"] = "IBMPlexSans-Bold.ttf",
        ["x_smalltfont"] = "IBMPlexSans-Bold.ttf",
        ["ffont"] = "IBMPlexSans-Regular.ttf",
        ["smallffont"] = "IBMPlexSans-Regular.ttf",
        ["largeffont"] = "IBMPlexSans-Regular.ttf",
        ["rifont"] = "IBMPlexSans-Regular.ttf",
        ["pgfont"] = "IBMPlexSans-Regular.ttf",
        ["scfont"] = "IBMPlexMono.ttf",
        ["hpkfont"] = "IBMPlexMono.ttf",
        ["hfont"] = "IBMPlexSans-Regular.ttf",
        ["infont"] = "IBMPlexMono.ttf",
        ["smallinfont"] = "IBMPlexMono.ttf",
        ["infofont"] = "IBMPlexSans-Regular.ttf",
        ["smallinfofont"] = "IBMPlexSans-Regular.ttf",
        ["smallinfofontbold"] = "IBMPlexSans-Bold.ttf",
        ["x_smallinfofont"] = "IBMPlexSans-Regular.ttf",
        ["xx_smallinfofont"] = "IBMPlexSans-Regular.ttf",
    },
}
Frenzie is offline   Reply With Quote
Advert
Old 09-14-2021, 11:39 AM   #3
boredhominid
Junior Member
boredhominid began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2021
Device: kobo libra h2o
sorry for the confusion, it is indeed an excerpt of the whole file and is indeed inside return{} with the rest of the settings.
boredhominid is offline   Reply With Quote
Old 09-14-2021, 12:56 PM   #4
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,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Well, in that case what I posted works for me — or rather doesn't work for me because I don't have those fonts, but it crashes as expected, so to speak.

Quote:
09/14/21-18:55:57 ERROR #! Font xx_smallinfofont ( IBMPlexSans-Regular.ttf ) not supported: ./ffi/freetype.lua:179: Failed to load font './fonts/IBMPlexSans-Regular.ttf', freetype error code: 1
09/14/21-18:55:57 ERROR #! Font smalltfont ( IBMPlexSans-Bold.ttf ) not supported: ./ffi/freetype.lua:179: Failed to load font './fonts/IBMPlexSans-Bold.ttf', freetype error code: 1
Frenzie is offline   Reply With Quote
Old 09-14-2021, 02:36 PM   #5
boredhominid
Junior Member
boredhominid began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2021
Device: kobo libra h2o
Thank you very much. It seems that appending fontmap after all the other settings fails but putting it in the right alphabetical order (in my case between ["folder_shortcuts"] = {}, and ["footer"] = {},) works.
boredhominid is offline   Reply With Quote
Advert
Old 09-14-2021, 03:52 PM   #6
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,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
It doesn't need to be alphabetical. If you run `lua settings.reader.lua`or `luajit settings.reader.lua` it'll tell you roughly where you made a syntax error.
Frenzie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change to M92 default settings. PDF reader customization. Is it possible? Reeduh Onyx Boox 0 12-16-2020 02:08 PM
*VERY* detailed guide on changing default Reader fonts Valloric Sony Reader Dev Corner 273 07-20-2012 05:57 PM
changing reader's default files zoran Kobo Reader 1 07-16-2010 08:02 AM
Changing fonts on ECO reader?? troykm HanLin eBook 2 12-23-2009 03:05 PM
Resetting Sony Reader to Factory Default Settings Yak Sony Reader 1 11-04-2006 11:34 AM


All times are GMT -4. The time now is 03:30 PM.


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