Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2022, 07:36 AM   #1
Sonnenfee
Zealot
Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.
 
Sonnenfee's Avatar
 
Posts: 109
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony, Woxter
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.
Sonnenfee is offline   Reply With Quote
Old 05-15-2022, 12:05 PM   #2
jberd
Enthusiast
jberd began at the beginning.
 
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
jberd is offline   Reply With Quote
Old 05-22-2022, 05:08 PM   #3
Sonnenfee
Zealot
Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.
 
Sonnenfee's Avatar
 
Posts: 109
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony, Woxter
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.
Sonnenfee is offline   Reply With Quote
Old 05-22-2022, 06:28 PM   #4
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,287
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by Sonnenfee View Post

We are talking about two different things. You mean the font size and I the font/type.
Nope, you're talking about the same thing and jberd is right:

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)
pazos is offline   Reply With Quote
Old 05-23-2022, 06:26 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,631
Karma: 724945
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
Frenzie is offline   Reply With Quote
Old 06-01-2022, 05:17 PM   #6
Sonnenfee
Zealot
Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.
 
Sonnenfee's Avatar
 
Posts: 109
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony, Woxter
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 so I'm more likely prefering new releases without doing the work of changing it manually every time.

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.
Sonnenfee is offline   Reply With Quote
Old 02-15-2024, 11:42 AM   #7
sdothum
Enthusiast
sdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it is
 
Posts: 29
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
Quote:
Originally Posted by Sonnenfee View Post
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 so I'm more likely prefering new releases without doing the work of changing it manually every time.

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.
i created a couple level 2 user patches (create patches named "2-yourpatchname.lua") that hard code my desired user font for the statusbar and alt-statusbar. Like you, i wanted my reading font to also populate the header and footer portions of the page. (You will have to edit the patches and substitute your own font choice).

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
A somewhat longer patch for the alt-statusbar required..

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
This patch is a bit hacky of the function it replaces, omitting self:updateFontFamilyFonts().

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"
sdothum is offline   Reply With Quote
Old 02-17-2024, 03:34 AM   #8
hius07
Wizard
hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.hius07 ought to be getting tired of karma fortunes by now.
 
Posts: 1,061
Karma: 3581267
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.
hius07 is offline   Reply With Quote
Old 02-17-2024, 08:57 AM   #9
sdothum
Enthusiast
sdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it is
 
Posts: 29
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
Quote:
Originally Posted by hius07 View Post
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.
Thanks for confirming this. My original post above actually had this simple user patch..

Code:
local CreDocument = require("document/credocument")
CreDocument.header_font = "yourfont"
and for some reason it stopped working (across all my devices.. Kobo, Kindle, Android). Drove me nuts, so i editted the post with my old hacky solution above.

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
sdothum is offline   Reply With Quote
Old 02-18-2024, 06:38 AM   #10
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,631
Karma: 724945
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.
Frenzie is offline   Reply With Quote
Old 02-18-2024, 10:09 AM   #11
Sonnenfee
Zealot
Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.Sonnenfee ought to be getting tired of karma fortunes by now.
 
Sonnenfee's Avatar
 
Posts: 109
Karma: 421170
Join Date: Oct 2021
Device: Kindle, Kobo, PocketBook, Sony, Woxter
Quote:
Originally Posted by hius07 View Post
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.
For me this will be a cool thing and will love it

@hius07 or @Frenzie or to the person which made it possible and did the work

Last edited by Sonnenfee; 02-18-2024 at 11:18 AM.
Sonnenfee is offline   Reply With Quote
Old 02-18-2024, 11:51 AM   #12
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,631
Karma: 724945
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.
Frenzie is offline   Reply With Quote
Old 02-18-2024, 12:04 PM   #13
sdothum
Enthusiast
sdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it is
 
Posts: 29
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
Quote:
Originally Posted by sdothum View Post
...and for some reason it stopped working (across all my devices.. Kobo, Kindle, Android).
i found a couple of books in my rotation that did not exhibit the font setting for the alt-statusbar.

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
..after which, the expected alt-statusbar font is displayed.
sdothum is offline   Reply With Quote
Old 02-18-2024, 12:24 PM   #14
sdothum
Enthusiast
sdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it issdothum knows what time it is
 
Posts: 29
Karma: 2062
Join Date: Oct 2021
Device: Kobo Libra 2
Quote:
Originally Posted by Frenzie View Post
settings.reader.lua is a file in your koreader directory that contains all of your settings.
Ah.. i missed that file working from the git source and not the device itself.

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).
sdothum is offline   Reply With Quote
Old 02-19-2024, 05:38 AM   #15
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,631
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by sdothum View Post
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).
Not a user patch, you just edit it (after saving a backup).
Frenzie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:11 AM.


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