Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2021, 10:11 PM   #16
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
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.
geek1011 is offline   Reply With Quote
Old 11-03-2021, 12:51 AM   #17
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
Quote:
Originally Posted by sherman View Post
Feel free to play with the scale factor and multiplier if you like. For example instead of 1.0 and 6.5, you could try 2.0 and 12.5 for a similar result.
I tried option:
Spoiler:
Code:
      FindH:    F3 EE 09 0A # vmov.f32 s1, #25.0
      ReplaceH: F0 EE 00 0A # vmov.f32 s1, #2.0
  # Replace QScreen::logicalDotsPerInchX() with our own multiplier
  - ReplaceBytes:
      Offset:      26
      FindInstBLX: {SymPLT: "QScreen::logicalDotsPerInchX() const"}
      ReplaceH:    B2 EE 09 0B # vmov.f64 d0, #12.5

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 12:57 AM.
Semwize is offline   Reply With Quote
Advert
Old 11-03-2021, 01:07 AM   #18
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 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.
sherman is offline   Reply With Quote
Old 11-03-2021, 01:22 AM   #19
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
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.
Semwize is offline   Reply With Quote
Old 11-03-2021, 03:28 AM   #20
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Semwize View Post
In any case, this is much better than the values we get without this patch.
But I might be able to do even better.

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
Eyeballing it, it seems very very close on my Glo.
sherman is offline   Reply With Quote
Advert
Old 11-03-2021, 03:58 AM   #21
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
@sherman

Excellent.
I have no problems with this multiplier.
Semwize is offline   Reply With Quote
Old 11-03-2021, 04:14 AM   #22
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Semwize View Post
@sherman

Excellent.
I have no problems with this multiplier.
Yay! That's two devices now...

Unfortunately, I can't (easily) use 15 and 96, but the numbers I've used are the next best thing, and they seem to match up, so it doesn't really matter does it?
sherman is offline   Reply With Quote
Old 11-03-2021, 10:10 AM   #23
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
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.
jackie_w is offline   Reply With Quote
Old 11-03-2021, 04:02 PM   #24
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
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.
DNSB is offline   Reply With Quote
Old 11-03-2021, 04:41 PM   #25
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 856
Karma: 2676800
Join Date: Aug 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.
sherman is offline   Reply With Quote
Old 11-03-2021, 10:27 PM   #26
marshap
Enthusiast
marshap began at the beginning.
 
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.
marshap is offline   Reply With Quote
Old 11-04-2021, 04:25 PM   #27
the_Pan
Connoisseur
the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.
 
Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
Quote:
Originally Posted by Anghirrim View Post
Hi, thanks for the super fast update!

Unfortunately, InvertScreen still does not work.

I updated my Kobo Forma to 4.30, then downloaded and updated my favorite patches, applied the KoboRoot.gz file and rebooted.

All of the applied patches are working just fine, except from the InvertScreen.

Same as on 4.28, in flashes once, then get back to white background, black text (even after reboot as suggested in the .yalm file, reload of the reader app, etc...).

Any idea, replacing InvertScreen by DarkMode? For now, back to 4.26.16704.

Thanks,
Thank you for testing!
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?
the_Pan is offline   Reply With Quote
Old 11-04-2021, 04:41 PM   #28
Semwize
Guru
Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.Semwize ought to be getting tired of karma fortunes by now.
 
Posts: 873
Karma: 252902
Join Date: Jun 2016
Device: Kobo
Quote:
Originally Posted by Anghirrim View Post
Same as on 4.28, in flashes once, then get back to white background, black text (even after reboot as suggested in the .yalm file, reload of the reader app, etc...).
uh... And when enabled in the developer options, everything works (after a reboot).
Semwize is offline   Reply With Quote
Old 11-04-2021, 09:58 PM   #29
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,736
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by the_Pan View Post
Thank you for testing!
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?
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.
geek1011 is offline   Reply With Quote
Old 11-05-2021, 02:17 AM   #30
the_Pan
Connoisseur
the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.
 
Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
Quote:
Originally Posted by geek1011 View Post
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.
That's great to hear, thank you!
And take your time, the real life comes first of course.
the_Pan is offline   Reply With Quote
Reply

Tags
kobopatch, patch, patch32lsb, patches, patching


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.16.10 GeoffR Kobo Developer's Corner 12 08-14-2015 03:40 AM
Instructions for patching firmware 3.12.1 GeoffR Kobo Developer's Corner 56 03-20-2015 05:14 AM
Instructions for patching firmware 3.12.0 GeoffR Kobo Developer's Corner 165 02-07-2015 09:22 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM


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


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