![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony
|
Font choice for Status bar and Alt status bar?
Before changing to KOReader again I used CoolReader on my devices.
One thing I miss in KOReader is using my reading font also for Status bar and Alt status bar. I would really appreciate and love if this could be developed also for KOReader ![]() Last edited by Sonnenfee; 05-15-2022 at 07:42 AM. |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Mar 2015
Device: Kobo Aura H2o
|
If you don't mind changing the source code whenever you update koreader,
for the alt status bar you can change the value of header_font in frontend/document/credocument.lua For the regular status bar, there are fonts in frontend/ui/font.lua you can change. (I change a few fonts, so I don't know exactly which ones affect what, but you probably want header font "hfont" and the various title fonts). Jay |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony
|
Thank you for answering.
We are talking about two different things. You mean the font size and I the font/type. I'm reading my books with the font/type "Keep calm" and it would be cool if there were a possibility to chose this font/type also for the Alt Status Bar and Status Bar. Then all have the same look, the letters in the book and the letters in Alt Status bar and Status Bar. Now this is different and there is no option, to chose any other font/type. That's the font I'm using: https://www.dafont.com/de/search.php?q=keep+calm and would be nice to have it also for the Alt Status Bar and Status Bar. Last edited by Sonnenfee; 05-22-2022 at 05:37 PM. |
![]() |
![]() |
![]() |
#4 | |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,390
Karma: 2200169
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
He pointed you to both family and size of fonts used across the entire UI (including the statusbar) He stated that the top/alternative status bar is a special snowflake handled elsewhere, which is also right. And most importantly: he suggested that the only way to change fonts right now is to change stuff in the source code (Stuff that you will need to change again after each update) |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Isn't there a settings/data/cr3.ini you can edit for the alt statusbar that won't be overwritten by updates? Or is that no longer a thing.
![]() Specifically, that file would take settings like these: Code:
crengine.page.header.font.color=0xFF000000 crengine.page.header.font.face=Noto Sans crengine.page.header.font.size=10 |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony
|
Thanks for the clarification and explanation, @pazos.
I will take a look when I getting time for it. KOReader is always evolving and becomes new functionality ![]() Maybe someday will be the possibility to select and change the font for the Alt status bar and Status bar directly in the KOReader menu ![]() Thanks to jberd for giving me the right way and Frenzie for answering. |
![]() |
![]() |
![]() |
#7 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
|
Quote:
For the statusbar.. Code:
local Font = require("ui/font") for k, v in pairs(Font.fontmap) do if k == "ffont" then Font.fontmap[k] = "yourfont-regular.ttf" elseif k == "smallffont" then Font.fontmap[k] = "yourfont-regular.ttf" elseif k == "largeffont" then Font.fontmap[k] = "yourfont-regular.ttf" end end Code:
local Screen = require("device").screen local Event = require("ui/event") local ReaderFont = require("apps/reader/modules/readerfont") ReaderFont.onReadSettings = function(self) self.font_face = "yourfont" -- your reading font (text body) self.ui.document:setFontFace(self.font_face) self.header_font_face = "yourfont" -- your alt-statusbar font self.ui.document:setHeaderFont(self.header_font_face) self.ui.document:setFontSize(Screen:scaleBySize(self.configurable.font_size)) self.ui.document:setFontBaseWeight(self.configurable.font_base_weight) self.ui.document:setFontHinting(self.configurable.font_hinting) self.ui.document:setFontKerning(self.configurable.font_kerning) self.ui.document:setWordSpacing(self.configurable.word_spacing) self.ui.document:setWordExpansion(self.configurable.word_expansion) self.ui.document:setCJKWidthScaling(self.configurable.cjk_width_scaling) self.ui.document:setInterlineSpacePercent(self.configurable.line_spacing) self.ui.document:setGammaIndex(self.configurable.font_gamma) table.insert(self.ui.postInitCallback, function() self.ui:handleEvent(Event:new("UpdatePos")) end) end You can find my dotfiles here, i am not sure if there are any negative side effects -- other parts of KOReader that may be impacted by these overrides -- but they work for me. Last edited by sdothum; 02-16-2024 at 07:23 AM. Reason: Correction to 'header_font" |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,154
Karma: 3592855
Join Date: Sep 2014
Location: Ukraine
Device: Kindle PW2, PW3, PW4, Voyage
|
Since 02.2024 release it will be enough to set "header_font" in settings.reader.lua to change the font face in alt status bar.
|
![]() |
![]() |
![]() |
#9 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
|
Quote:
Code:
local CreDocument = require("document/credocument") CreDocument.header_font = "yourfont" Long story short, i replaced the hacky user patch with the above and it is working now. Again. Have no idea what i did in the interim to have the NotoSans font reappear in the alt-statusbar. PLEASE correct my above user patch if it is not properly referencing the "header_font" in "settings.reader.lua". (i had come across a G_reader_settings reference to it but could not decipher its construction and relationship to luasettings). Last edited by sdothum; 02-17-2024 at 09:08 AM. Reason: Expand remark |
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
settings.reader.lua is a file in your koreader directory that contains all of your settings.
|
![]() |
![]() |
![]() |
#11 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 119
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony
|
Quote:
![]() ![]() ![]() ![]() Last edited by Sonnenfee; 02-18-2024 at 11:18 AM. |
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Probably @hius07. It may well have been a few years since I touched any of that particular code.
![]() |
![]() |
![]() |
![]() |
#13 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
|
Quote:
Not sure what the cause or reason (something recorded in the .sdr?). The fix for this is to go into top menu.. Code:
document -> document settings -> reset document settings to default |
|
![]() |
![]() |
![]() |
#14 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 36
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
|
Quote:
Checking my Kobo settings.reader.lua, no "header_font" field existed. There were several other "cre_header_..." elements. The patch i used on the "credocument.lua" appears to work. (i'm uncertain what the lua syntax would be for a user patch to append "cre_header_font" to settings.reader). |
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I show top bar (status bar) on the Nova Pro with the new firmware (2.2.1)? | SeanMcNally | Onyx Boox | 9 | 12-30-2019 09:16 AM |
status bar | danielr | KOReader | 11 | 07-21-2018 11:52 AM |
status bar | cramoisi | KOReader | 4 | 07-22-2017 05:10 PM |
902 Status bar removal. | Lester Burnham | PocketBook | 7 | 10-08-2011 06:46 AM |
time in the status bar??? | Harry001 | Sony Reader | 2 | 01-09-2009 10:19 AM |