![]() |
#16 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,656
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
I was in a rush last night, so the main thing I tested before merging was that the EPUB font size was at least as good as it was before the 18220 DPI change and that it looked similar to my KEPUB font size. I didn't bother checking font settings other the the minimum, maximum, and my usual, and I didn't go through all of my test books.
|
![]() |
![]() |
![]() |
#17 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
Quote:
Spoiler:
And all the same I get a different number of lines in epub and kepub. Most likely, it's about other patches me used... Last edited by Semwize; 11-03-2021 at 01:57 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 2641698
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Yeah, I didn't quite get it exact, I was getting very tired of rebooting my Kobo after making every change.
Also, the limited range of values available makes it difficult to get an exact match, so "close enough" will probably have to do. |
![]() |
![]() |
![]() |
#19 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
In any case, this is much better than the values we get without this patch.
|
![]() |
![]() |
![]() |
#20 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 2641698
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
I busted out the spreadsheet, and I noticed that the results obtained from ( font_size / 1.0 ) * 6.5 were actually very close to the results from the following formula ( font_size / 15.0 ) * 96 Which made me think, that might be the actual kepub formula, since the kepub scale_factor is 15.0, and 96 would make sense as a 'default' dpi. So, I found the equivalent formula that can be achieved using the patch ( font_size / 2.5 ) * 16.0 Here's the patch with the updated numbers: Code:
Unify font sizes: - Enabled: no - Description: | Attempt to unify the font sizes between epub and kepub. Without this patch epub font sizes can be much larger than kepub at the same size setting. # From my current understanding, the final font size for epubs is calculated # as follows: ( font_size / scale_factor ) * DPI, where 'scale_factor' = # 25.0. It seems RMSDK must be handling DPI elsewhere however, because the # DPI multiplication here seems to have a detrimental effect, and behaves # differently on different devices. This patch changes the 'scale_factor' to # 2.5, and replaces the call to get DPI with a constant multiplier (16). # The results of using these values are equivalent to ( font_size / 15.0 ) * 96 # which is what I suspect the kepub equation ends up being. # Note, that the replacement values are limited to 0.25 - 31.0 in 0.25 # increments. # # Refer to https://github.com/pgaskin/kobopatch-patches/issues/96 for more # information. # EPUB settings: - BaseAddress: Sym: "AdobeStyling::update(QString const&)" Rel: 5800 # at ReadingSettings::getReadingFontSizeScaleFactor(float, float) # Set the scale factor to 2.5 - ReplaceBytes: Offset: -20 FindH: F3 EE 09 0A # vmov.f32 s1, #25.0 ReplaceH: F0 EE 04 0A # vmov.f32 s1, #2.5 # Replace QScreen::logicalDotsPerInchX() with our own multiplier - ReplaceBytes: Offset: 26 FindInstBLX: {SymPLT: "QScreen::logicalDotsPerInchX() const"} ReplaceH: B3 EE 00 0B # vmov.f64 d0, #16.0 |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
@sherman
Excellent. I have no problems with this multiplier. |
![]() |
![]() |
![]() |
#22 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 2641698
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
|
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,137
Karma: 16059044
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
@sherman,
Your post #20 patch works fine for me on KA1, Forma, ClaraHD, H2Ov1. Thanks very much for all the time you spent on this. |
![]() |
![]() |
![]() |
#24 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,031
Karma: 135224257
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
@sherman Add a Sage to the list of devices where your Unify Font Sizes patch does a great job of making epub and kepub font sizes match. The results may not be perfect but close enough to save changing font size every second book.
|
![]() |
![]() |
![]() |
#25 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 846
Karma: 2641698
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Thanks for the feedback everyone. I've opened a PR to update the patch with the new values.
|
![]() |
![]() |
![]() |
#26 |
Enthusiast
![]() Posts: 26
Karma: 10
Join Date: Apr 2012
Device: Libra 2
|
Cannot change font size in header/footer
On my Libra 2 I enabled the custom header/footer captions patch and entered "29px" as follows:
# Part 2. Change font-size # #caption # AuraHD/AuraH2O/AuraH202/ClaraHD/Elipsa/Libra2 - Find: "[qApp_deviceIsDragon=true] {\n font-size: 25px;\n}" Replace: "[qApp_deviceIsDragon=true] {\n font-size: 29px;\n}" But the header/footer fonts do not change size in epubs. |
![]() |
![]() |
![]() |
#27 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
|
Quote:
![]() I also still read on the forma and hope for an fix of the "old" invert screen patch. The new darkmode seems to be not that good in my opinion. @geek1011 are there chances to get invert screen working again? |
|
![]() |
![]() |
![]() |
#28 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
|
|
![]() |
![]() |
![]() |
#29 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,656
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Yes, and it'll probably come in the form of a NickelHook mod and/or a NickelMenu update. I just haven't had enough time to work on it yet.
|
![]() |
![]() |
![]() |
#30 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
|
|
![]() |
![]() |
![]() |
Tags |
kobopatch, patch, patch32lsb, patches, patching |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Instructions for patching firmware 3.16.10 | GeoffR | Kobo Developer's Corner | 12 | 08-14-2015 04:40 AM |
Instructions for patching firmware 3.12.1 | GeoffR | Kobo Developer's Corner | 56 | 03-20-2015 06:14 AM |
Instructions for patching firmware 3.12.0 | GeoffR | Kobo Developer's Corner | 165 | 02-07-2015 10:22 AM |
Instructions for patching firmware 3.8.0 | GeoffR | Kobo Developer's Corner | 92 | 10-22-2014 08:22 AM |
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x | GeoffR | Kobo Developer's Corner | 285 | 08-27-2014 11:06 AM |