05-30-2019, 05:05 PM | #1 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
ePub / KePub font sizes experiments
As per a PM conversation here are two patches which can be used to experiment with some settings relating to fonts sizes used in the ePub and KePub readers. I've posted them here in case others want to experiment and share results.
The patches won't do anything until you edit them and change the replacement values. Firmware 4.15.12920, for libnickel.so.1.0.0.yaml: Spoiler:
Edit: As an alternative to the second patch above, this one sets the ePub units per inch to a constant value of 300 instead of a multiple of the font scale factor. Spoiler:
Last edited by GeoffR; 05-30-2019 at 05:42 PM. |
05-30-2019, 08:22 PM | #2 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I only have a Glo myself, and I fond the font size is usually the same in ePubs as in KePubs, but some have said that the font size is normally 50% larger in ePubs than in KePubs on some other devices.
The X value in the Set Adobe units per inch patch above is originally 144.0 for some devices and 96.0 for others, and 144 is 50% larger than 96, so that might account for it. If that is the case then maybe Setting the X value to 96.0 for all devices would fix it? I.e. change the patch to: Code:
Set Adobe units per inch:
- Enabled: yes
- Description: |
This patch sets the value passed to AdobeStyling::setUnitsPerInch(int)
which only affects the ePub reader.
# original value is calculated as (scale factor) * X where:
# scale factor is as in the previous patch
# X = 144.0 for Dragon class devices, X = 96.0 for other devices
# Other devices (Touch, Glo, etc.):
- ReplaceBytes: {Offset: 0x4A70C0, FindH: 00 00 C0 42, ReplaceH: 00 00 C0 42}
# Dragon class devices (AuraHD, H2O, etc.):
- ReplaceBytes: {Offset: 0x4A70C4, FindH: 00 00 10 43, ReplaceH: 00 00 C0 42}
Last edited by GeoffR; 05-30-2019 at 11:20 PM. |
Advert | |
|
05-31-2019, 05:30 PM | #3 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Hi Geoff,
Thank you for another good idea! I've done some testing. I have to confess that post #1 bamboozled me so I put my effort into the patch in post #2. Background: My aim has only ever been to equalise font-sizes in epub/kepub. Up to now I have been doing this via a kepub font scale-up in kobo_extra.css. Code:
body>div#book-columns>div#book-inner {font-size:1.5em}
Test results: I successfully used the post #2 patch on all of the above except the GloHD (it's off-limits because my husband is using it). I'd be amazed if its results were different from the ClaraHD. Practicalities: Nothing to do with the patch itself, but anyone who was using the kobo_extra.css trick and now wants to switch to this new patch is going to need to:
Other info:
|
06-02-2019, 07:15 PM | #4 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
ePub uniform font scale patch
Thanks for the extensive testing jackie_w! (I can't figure out why the original Aura uses the larger font scale though.)
I'll add this patch, with a new name, to the current firmware patches. As noted it should work for versions 4.6.10075 and later: ePub uniform font scale (paste into libnickel.so.1.0.0.yaml) Spoiler:
The same method of increasing the font scale by 50% for some devices seems to be used in all firmware versions at least as far back as 2.8.1, but the way the data is stored is slightly different for different versions, and it might well change again in future versions. This is a version of the patch for firmware versions 2.8.1 - 3.19.5761: `ePub uniform font scale: (paste into libnickel.so.1.0.0.patch) Spoiler:
If anyone wants this patch for a firmware version from 4.0 to 4.5 just let me know. |
06-08-2019, 05:46 AM | #5 |
Evangelist
Posts: 439
Karma: 287725
Join Date: Sep 2014
Location: Europe
Device: Kobo Aura H2O/Glo HD/Libra 2, Kindle PW3/PW5
|
I used the font scale patch on my Glo HD and I'm very pleased with it! I read kepub exclusively, and use only one font (Literata Book). This might sound weird, but my problem stems from the fact that I like reading at a very specific font size, that I wasn't able to find in all of my books (I assume that is because different publishers set different base font-sizes in the CSS files of their books, and the slider works from there). I tried changing the scale to 8 and that, in combination with the 'Custom font sizes' patch (that I was already using) seems to have done the trick. I am absolutely ignorant in the matter and this was probably a stroke of luck, but it seems to be working so far, so thanks GeoffR!
|
Advert | |
|
06-20-2019, 12:06 PM | #6 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
I don't think it will be very useful to most people, but if someone want's it for an earlier firmware version then let me know. |
|
08-28-2022, 07:01 AM | #7 | |
Enthusiast
Posts: 38
Karma: 10
Join Date: Aug 2022
Device: Kobo Libra 2, Pocketbook Basic Lux 3
|
Quote:
Is it possible to get this patch for last firmware 4.33.19759? Unfortunately I get the problem of font size converting from epub to kepub and making a search for solve it, I found this thread. I'm using a Kobo Libra 2 received some day ago, still haven't patched it because I wanna be sure that it works fine and it's not needed to return to the vendor. Thank you in advance. I hope my english is clear. |
|
08-28-2022, 08:11 AM | #8 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Kobo font sizing has changed a lot since GeoffR last posted. This is the kobopatch thread for firmware 4.33.19759. All the instructions to get you started are in post #1.
The patch you're talking about is now called Unify font sizes and can be found in libnickel.so.1.0.0.yaml |
08-28-2022, 12:22 PM | #9 | |
Enthusiast
Posts: 38
Karma: 10
Join Date: Aug 2022
Device: Kobo Libra 2, Pocketbook Basic Lux 3
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Font size difference between ePub & kepub | JSWolf | Kobo Reader | 12 | 09-08-2020 11:03 AM |
EPUB to AZW3: font sizes changed -- AGAIN! | Phssthpok | Conversion | 17 | 12-24-2018 12:53 PM |
EPUB to AZW3: font sizes changed | Phssthpok | Conversion | 3 | 11-29-2018 11:42 AM |
Smaller font size for kepub compared to epub on Kobo Aura HD | yevgeny.bezman | Kobo Reader | 2 | 07-14-2015 12:16 PM |
Aura HD Diferent font size in epub and kepub | ersott | Kobo Reader | 24 | 04-15-2014 07:03 AM |