![]() |
#1 |
Member
![]() Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
|
KOReader "Screen DPI" setting
The "Screen DPI" setting of KOReader is rather peculiar. I assume its main function is the scaling of the UI buttons/text with content having its separate setting in "Zoom (DPI)", but for some reason it also affects content font size, but specifically only fonts with no absolute size.
I tried to find out how "Screen DPI" is actually changing that font size, so I took a ruler and measured the length of a sample sentence while iterating through the DPI values. I got these values: 120 DPI 3.8 cm Custom(288) 5.1 cm 320 DPI 5.3 cm Auto 6.1 cm 480 DPI 6.4 cm 640 DPI 7.4 cm Doing a linear regression gives approx. SentenceLength = 0.007*DPI + 2.96 so the used Auto value calculates to ~ 448 DPI. Now I'm wondering: - How come changing the DPI doesn't linearly scale the content font size, double DPI, double size? - Why would 448 DPI be chosen in Auto mode when my tablet is 288 DPI. - Why isn't the used DPI value shown in the menu like "Auto DPI (448)". It just says "Auto DPI". The source in "screen_dpi_menu_table.lua" goes like Code:
text = dpi_auto and T(_("Auto DPI (%1)"), dpi_auto) or _("Auto DPI") |
![]() |
![]() |
![]() |
#2 |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,398
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Screen dpi is hardcoded in each device description. In the case of android it is obtained using the native framework and it should always match your device DPI.
UI elements are not scaled by DPI unless you override your device defaults. They're scaled by the physical resolution of your device. See https://github.com/koreader/koreader....lua#L371-L383 and https://github.com/koreader/koreader...ze.lua#L31-L80 |
![]() |
![]() |
![]() |
#3 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The "custom" entry in that menu will default to your device's actual DPI (once selected), and *will* behave differently than the actual default (Auto) [which doesn't really use DPI at all, hence it not showing any], as the links mentioned above detail. In practice, it should result in slightly tinier UI elements (only really noticeable > 300DPI).
Last edited by NiLuJe; 12-25-2020 at 06:32 PM. |
![]() |
![]() |
![]() |
#4 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Also, define "content" ^^.
The value you select in the menu in ePub documents (w/ CRe) *will* go through that scaling computation, so it'll affect the base font size, yes. CRe itself has another DPI setting that does... weird things, and that mostly everyone should keep to its defaults at 1/1 ![]() |
![]() |
![]() |
![]() |
#5 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
The intent is that, given a similar AR, settings should give consistent results across different devices (remember, KOReader was born on Kindles, which were mostly all 6" and/or using similar AR).
|
![]() |
![]() |
![]() |
#6 |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Jul 2018
Device: Kobo Aura One
|
What would be the correct resolution on a Kobo Aura One?
|
![]() |
![]() |
![]() |
#7 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,110
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,742
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#9 | |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Quote:
@Frenzie: IIRC, there's a couple style tweaks that achieve more or less the same thing without the potential extra weirdness of that setting ^^. |
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,742
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
The full width image one isn't relevant to ornaments and formulae. The effect would be significantly more disastrous.
One that says "display the image at 2x or 3x its declared size" would work… but that's basically what that DPI setting does. ![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with setting "Beautify individual files automatically when they are opened"? | Capricorn | Editor | 3 | 03-17-2020 07:40 AM |
"Koreader" and "Coolreader" Prefixes | Ken Maltby | Feedback | 3 | 05-21-2015 06:39 PM |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
Toshiba Dual Screen "netbook"/"laptop" | kennyc | News | 18 | 06-23-2010 05:19 AM |
File names with "(" and ")" can cause screen freezes | greenapple | Ectaco jetBook | 5 | 02-04-2010 08:25 PM |