View Single Post
Old 06-26-2023, 09:20 AM   #71
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Device: Kobo Libra 2, firmware version 4.37.21533
----------
I don't think that the first (smallest) font size [or first position of the font size slider] is patched (correctly) for kepubs.


With the stock firmware, the difference in font size between kepub and epub files isn't that far off. IMHO, It's very close. The kepub font size is slightly smaller.
----------
----------
When appling the patch `Custom font sizes`, the difference in font-size (height) increases. Kepub font sizes are much smaller than regular epub.
Yes, that is expected or known and there is a patch for it: `Unify font sizes`. I did not/chose not to use this patch.
----------
----------
However, when I enable the patch `Default ePub serif font (Amasis)` and don't modify this patch and use "Amasis" as default serif font:
The font sizes (height) for kepub and epub remain similar (just as the stock firmware the kepub font size [height] is slightly smaller than epub).
Except for the first position of the font size slider..

First position of the font slider (the far most left position)
epub: smallest font size is correctly patched. I use this font size (height) as reference point.
kepub: first position (far left position) of the font slider: font size is very small (about the same size of the unpatched stock firmware).

However, when I increase the font size by moving the font slider 1 postion to the right, the font sizes are similar again.
In other words: position 1 of the font slider (epub) matches with the second position of the font slider when using kepub files.

That's why I think that the first position of the font slider (the smallest font size) for kepub is not correctly patched.

----------
----------
To replicate:
1. Install the stock firmware, and compare the font sizes of kepub and epub files.
2. Apply the patch `Custom font sizes` (and/or other patches to your preferences) but don't apply the `Default ePub serif font (Amasis)`and `Unify font sizes` patches. Compare the font sizes of kepub and epub files.
3. Repatch the firmware by enabling `Default ePub serif font (Amasis)` but don't enable `Unify font sizes`. Compare the font sizes of epub and kepub files. Compare Position 1 of the font slider (far left) of epub files with positon 1 and 2 of kepub files. Position 1 epub file is about the same size as position 2 of kepub files.
----------
Attached: my patch files.
Edit:
Updated: librmsdk.so.1.0.0.yaml; Default ePub serif font (Amasis) to default "Amasis". Removed custom font "KCalson" (Kings Caslon)

Update
Forget what I've written above. The jump from 23px to 39px caused the confusion.
With these settings:
Code:
    - BaseAddress: "N3FontTypeUtil::fontSizes()"
  # Initial font size:
  - ReplaceInt: {Offset:  378, Find:   8, Replace:  23} # Other devices
  - ReplaceInt: {Offset:  374, Find:  11, Replace:  23} # LibraH2O (storm)
  - ReplaceInt: {Offset:   36, Find:  10, Replace:  23} # GloHD/ClaraHD (alyssum nova)
  - ReplaceInt: {Offset:  404, Find:  14, Replace:  23} # Forma/AuraOne/Sage/Elipsa (daylight)
  # Increment:
  - ReplaceInt: {Offset:  222, Find:  21, Replace:  39} # Add font sizes in increments of 1 until this size exceeded
  - ReplaceInt: {Offset:  228, Find:  22, Replace:  41} # Continue from this font size
  - ReplaceInt: {Offset:  250, Find:  49, Replace:  69} # Add font sizes in increments of 2 until this size exceeded
  - ReplaceInt: {Offset:  256, Find:  50, Replace:  71} # Continue from this font size
Slider position 1 23 px (far left) of epub matches with slider position 3 of kepub.

I'm not sure if slider position 3 matches with font size 40px or 41px.
39px is silder postion two.
Attached Thumbnails
Click image for larger version

Name:	merged.png
Views:	228
Size:	360.3 KB
ID:	202315  
Attached Files
File Type: zip mypatches.zip (33.7 KB, 196 views)

Last edited by Anak; 06-26-2023 at 04:11 PM. Reason: screenshot from left to right: epub, kepub, overlay
Anak is offline   Reply With Quote