Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2018, 09:34 AM   #46
helour
Enthusiast
helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.helour got an A in P-Chem.
 
Posts: 48
Karma: 6435
Join Date: Dec 2014
Location: Slovakia
Device: Onyx M96, Kobo Glo HD
The characters "" and "" in the Keyboard template are still replaceable

Hi,

I've just found that the characters "" and "" in the Keyboard template are still replaceable.

Kobo added new string "goKey" + 3x0b00 in keyboard layout in the libnickel.so file.

Some changes must be made in the libnickel patch:

: -48 -> -56 (FFFFFFD0 -> FFFFFFC8)
ReplaceString: {Offset: -56, Find: "\0", Replace: ""}

: -44 -> -52 (FFFFFFD4 -> FFFFFFCC)
ReplaceString: {Offset: -52, Find: "\0", Replace: ""}

I tried it on my Kobo GloHD and it works well.
Spoiler:

Code:
Keyboard template (GloHD/ClaraHD/AuraOne/H2O2):
  - Enabled: no
  - PatchGroup: Keyboard alternatives
    ## Replaces keys on the Extended Latin keypad with custom alternatives.

    ##
    ## Note that after the device boots, the keypad might just show blank squares
    ## until after the first book has been opened.
    ## Also note that long-pressing keys on the base keypad will no longer show
    ## the appropriate list of Extended Latin keys.
    #
    # Enable uppercase for `` (sharp s) key
  - ReplaceBytes: {Offset: 0x8F4B88, FindH: 00 24, ReplaceH: 01 24}
    # Replace layout sign
  - FindBaseAddressString: ""
  - ReplaceString: {Offset: 0, Find: "", Replace: ""}
  # Change keyboard layout
  - FindBaseAddressString: "\0\0\0\0\0\0\0\0"
    # Top row, left to right (10 keys):
  - ReplaceString: {Offset: 0x00, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x04, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x08, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x0C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x10, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x14, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x18, Find: "\0", Replace: ""}
  - ReplaceString: {Offset:  -56, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x1C, Find: "ij\0", Replace: "ij"}
  - ReplaceString: {Offset: 0x20, Find: "ŀ\0", Replace: "ŀ"}
    # Second row, left to right (10 keys):
  - ReplaceString: {Offset: 0x30, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x34, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x38, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x3C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x40, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x44, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x48, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x4C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x50, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x54, Find: "\0", Replace: ""}
    # Third row, left to right (10 keys):
  - ReplaceString: {Offset: 0x5C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x68, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x70, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x74, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x78, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x7C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x58, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x64, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x80, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x84, Find: "\0", Replace: ""}
    # Fourth row, left to right (8 keys):
  - ReplaceString: {Offset: 0x60, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x6C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x88, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x8C, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x90, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x94, Find: "\0", Replace: ""}
  - ReplaceString: {Offset: 0x98, Find: "đ\0", Replace: "đ"}
  - ReplaceString: {Offset: 0x9C, Find: "ł\0", Replace: "ł"}
Attached Thumbnails
Click image for larger version

Name:	Old.png
Views:	70
Size:	95.2 KB
ID:	168395   Click image for larger version

Name:	New.png
Views:	67
Size:	94.7 KB
ID:	168396  

Last edited by helour; 12-18-2018 at 06:57 AM. Reason: Added example
helour is offline   Reply With Quote
Old 12-16-2018, 09:36 AM   #47
jackie_w
Wizard
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: 4,739
Karma: 11360477
Join Date: Sep 2009
Location: UK
Device: PRS-350, Kobo: Aura6", H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by Martina Schein View Post
Thank you very much for your help @jackie_w. Exactly that was my mistake.
You're welcome - we got there in the end
jackie_w is offline   Reply With Quote
Advert
Old 12-16-2018, 11:40 AM   #48
mathil
Addict
mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.mathil can do the Funky Gibbon.
 
Posts: 262
Karma: 82795
Join Date: Sep 2014
Location: Europe
Device: Kobo Aura H2O/Glo HD, Kindle Paperwhite 3
I'm about to patch my Glo HD -- thank you so much to geek1011 and GeoffR for all your work!

I was wondering about one thing: in the 4.11.11980 firmware release there used to be a patch (made by user jcn363) to change the footnote's font size. Could it be updated? I read plenty of nonfiction and if I could reduce it, it would save me a lot of time while reading. Thank you in advance!!!
mathil is offline   Reply With Quote
Old 12-16-2018, 12:05 PM   #49
jackie_w
Wizard
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: 4,739
Karma: 11360477
Join Date: Sep 2009
Location: UK
Device: PRS-350, Kobo: Aura6", H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by mathil View Post
I'm about to patch my Glo HD -- thank you so much to geek1011 and GeoffR for all your work!

I was wondering about one thing: in the 4.11.11980 firmware release there used to be a patch (made by user jcn363) to change the footnote's font size. Could it be updated? I read plenty of nonfiction and if I could reduce it, it would save me a lot of time while reading. Thank you in advance!!!
If you still have the old nickel patch you were using in a previous firmware then I think it should still work in 4.12.12111.
jackie_w is offline   Reply With Quote
Old 12-17-2018, 04:37 AM   #50
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 322
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (4319'17.7"N 200'19.4"W)
Device: ka1
Progresive 4.12.12111

Basically tshering's BAD EYES revisited, which enlarged the font-size in GUI, with a simplify home screen ("Only Reading and My Books") and the addition of other patches (games, some fixes, cover increase...) and code cleaning to make more speedy. It is documented (somehow).

The file has 3 versions inside:
* P -> for A1/Forma
* PH -> for ClaraHD/H2O/GloHD/AuraHD
* Pi -> same as PH but with a smaller font size increase.
If you own a different device, you must change the values as needed.
If you find any... don't hesitate.

Warning: You never should use it if you read in Turkish or Japanese.
Use at your own risk, I can't guarantee that it does not cause any issue.

Good luck.

EDIT: Updated (thanks to GeoffR) to get rid of the header gap.
Attached Files
File Type: zip Progresive_4.12.12111.zip (187.8 KB, 70 views)

Last edited by jcn363; 12-20-2018 at 05:09 AM. Reason: Updated (thanks to GeoffR) to get rid of the header gap.
jcn363 is offline   Reply With Quote
Advert
Old 12-17-2018, 06:18 AM   #51
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 322
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (4319'17.7"N 200'19.4"W)
Device: ka1
Quote:
Originally Posted by mathil View Post
I'm about to patch my Glo HD -- thank you so much to geek1011 and GeoffR for all your work!

I was wondering about one thing: in the 4.11.11980 firmware release there used to be a patch (made by user jcn363) to change the footnote's font size. Could it be updated? I read plenty of nonfiction and if I could reduce it, it would save me a lot of time while reading. Thank you in advance!!!
Yes, you can still use `Change the font-size of footnotes pop-up and alikes` and `Change the font-family of footnotes pop-up and alikes` in this version.
Spoiler:
Code:
Change the font-size of footnotes pop-up and alikes:
  - Enabled: no
  - Description: |
      Change footnotes and alike font-size
  - FindZlib:  "QWidget[small"
# Pop-up header (footnotes and alike)
  - ReplaceZlib:
      Find:    "HeaderMediumElidedLabel,\n\
                HeaderMediumTouchLabel,\n\
                HeaderMediumLabel {\n  font-family: Georgia;\n  qproperty-alignment: 'AlignLeft|AlignVCenter';\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsTrilogy=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsTrilogy=true],\n\
                HeaderMediumLabel[qApp_deviceIsTrilogy=true] {\n  font-size: 30px;\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsPhoenix=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsPhoenix=true],\n\
                HeaderMediumLabel[qApp_deviceIsPhoenix=true] {\n  font-size: 36px;\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsDragon=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsDragon=true],\n\
                HeaderMediumLabel[qApp_deviceIsDragon=true] {\n  font-size: 46px;\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsAlyssum=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsAlyssum=true],\n\
                HeaderMediumLabel[qApp_deviceIsAlyssum=true] {\n  font-size: 50px;\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsNova=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsNova=true],\n\
                HeaderMediumLabel[qApp_deviceIsNova=true] {\n  font-size: 50px;\n}\n\
                HeaderMediumElidedLabel[qApp_deviceIsDaylight=true],\n\
                HeaderMediumTouchLabel[qApp_deviceIsDaylight=true],\n\
                HeaderMediumLabel[qApp_deviceIsDaylight=true] {\n  font-size: 60px;\n}"
      Replace: "HeaderMediumElidedLabel,HeaderMediumTouchLabel,HeaderMediumLabel{font-family:Georgia;qproperty-alignment:'AlignLeft|AlignVCenter';font-size:60px;}"
# Pop-up text (footnotes and alike)
  - ReplaceZlib:
      Find:    "RegularTouchLabel {\n  font-family: Georgia;\n  font-style: italic;\n}\n\
                RegularTouchLabel[qApp_deviceIsTrilogy=true] {\n  font-size: 19px;\n}\n\
                RegularTouchLabel[qApp_deviceIsPhoenix=true] {\n  font-size: 23px;\n}\n\
                RegularTouchLabel[qApp_deviceIsDragon=true] {\n  font-size: 29px;\n}\n\
                RegularTouchLabel[qApp_deviceIsAlyssum=true] {\n  font-size: 32px;\n}\n\
                RegularTouchLabel[qApp_deviceIsNova=true] {\n  font-size: 32px;\n}\n\
                RegularTouchLabel[qApp_deviceIsDaylight=true] {\n  font-size: 37px;\n}"
      Replace: "RegularTouchLabel{font-family:Georgia;font-style:italic;font-size:37px;}"

Change the font-family of footnotes pop-up and alikes:
  - Enabled: no
  - Description: |
      This patch allows you to change the font-family for the kepub pop-up footnotes (it
      will also affect a few other dialogs, like no wifi, marked as finished, marked as
      unread, etc).
  # In ReadingController::showFootnoteDialog(Bookmark const&), a ConfirmationDialog is created.
  # This changes the styles for ConfirmationDialog > #text
  - FindZlib: "#ConfirmationDialog"
  - ReplaceZlib: {Find: "font-family: Avenir;", Replace: "font-style:italic;}"} # with this change you'll have the same font family (for header and message) and italic for message
  - ReplaceZlib: {Find: "font-family: Sans-SerifJP, sans-serif;", Replace: "font-family: Georgia;"}

Good luck.
jcn363 is offline   Reply With Quote
Old 12-17-2018, 06:39 AM   #52
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 322
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (4319'17.7"N 200'19.4"W)
Device: ka1
Yes, I think all these patches
Code:
    Remove footer (row3) and increase cover size on new home screen
    Remove footer (row3) on new home screen
    New home screen increasing cover size
    Only Reading and My Books
    Remove Footer and Recommendations
apply to the same string:
Code:
  - FindZlib: "#row1col2"
  - ReplaceZlib:
      Find:    "[qApp_isFontScaleLarge=true] #row1col2 {\n  qproperty-visible: false;\n}"
      Replace: "all_that_you_do_not_want_appear {qproperty-visible:false;}"
and therefore, must be into the same patch-group:
Code:
   - PatchGroup: Home screen tweaks
Good luck.
jcn363 is offline   Reply With Quote
Old 12-17-2018, 09:27 AM   #53
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 16,108
Karma: 26100000
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo,Aura H2O,Glo HD,Aura ONE,Clara HD,Forma;tolino epos
Quote:
Originally Posted by jcn363 View Post
Basically tshering's BAD EYES revisited, which enlarged the font-size in GUI, with a simplify home screen ("Only Reading and My Books") and the addition of other patches (games, some fixes, cover increase...) and code cleaning to make more speedy. It is documented (somehow).
You reminded me of something...

With the Large Print Mode in the firmware, there is also a setting for the font scaling. This is the option "LargePrintFontScale" that can be added to the "ApplicationPreferences" section of the preferences. The value is a number to scale the UI font by when the Large Print Mode is on.

The Large Print Mode seems to use a scaling of about 1.5. Using 1.1 gives a little bigger font in most places without reducing the number of books displayed in the lists. If you change the scale, you need to toggle Large Print Mode or restart the device to pickup the change.
davidfor is online now   Reply With Quote
Old 12-17-2018, 10:04 AM   #54
Carmelocotonto
Junior Member
Carmelocotonto began at the beginning.
 
Carmelocotonto's Avatar
 
Posts: 7
Karma: 10
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
Quote:
Originally Posted by davidfor View Post
You reminded me of something...

With the Large Print Mode in the firmware, there is also a setting for the font scaling. This is the option "LargePrintFontScale" that can be added to the "ApplicationPreferences" section of the preferences. The value is a number to scale the UI font by when the Large Print Mode is on.

The Large Print Mode seems to use a scaling of about 1.5. Using 1.1 gives a little bigger font in most places without reducing the number of books displayed in the lists. If you change the scale, you need to toggle Large Print Mode or restart the device to pickup the change.
Please, where is Large Print Mode option? I have got ClaraHD. Or how is it activated?
Carmelocotonto is offline   Reply With Quote
Old 12-17-2018, 10:06 AM   #55
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: 1,099
Karma: 2580105
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Quote:
Originally Posted by Carmelocotonto View Post
Please, where is Large Print Mode option? I have got ClaraHD. Or how is it activated?
Settings then Beta Features. The optional scaling values davidfor mentioned are added to .kobo/Kobo/Kobo eReader.conf when your eReader is plugged in to a computer.
geek1011 is offline   Reply With Quote
Old 12-17-2018, 12:59 PM   #56
Carmelocotonto
Junior Member
Carmelocotonto began at the beginning.
 
Carmelocotonto's Avatar
 
Posts: 7
Karma: 10
Join Date: Nov 2018
Location: Salamanca
Device: kobo Clara HD, Onyxboox C67
Quote:
Originally Posted by geek1011 View Post
Settings then Beta Features. The optional scaling values davidfor mentioned are added to .kobo/Kobo/Kobo eReader.conf when your eReader is plugged in to a computer.
All perfect. I tried 1.2 but you are alright, only 1.1 and it is enough.
Carmelocotonto is offline   Reply With Quote
Old 12-17-2018, 01:00 PM   #57
jasius
Junior Member
jasius began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2018
Device: Kobo Glo HD
Sorry I'm new to this patched firmware, does it also work for a Clara HD also what features does the patching add?
jasius is offline   Reply With Quote
Old 12-17-2018, 01:25 PM   #58
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: 1,099
Karma: 2580105
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Quote:
Originally Posted by jasius View Post
Sorry I'm new to this patched firmware, does it also work for a Clara HD also what features does the patching add?
Yes. Look in the patch files for the features. Some of the main ones I use are showing the chapter name in the progress slider, increasing the number of font size and line spacing options, removing the sign-out button from the lock screen, enabling all of the beta features, adding an invert screen toggle to reading setting, increasing the power off timeout, and a whole lot of other ones. You can also use kobopatch to add translations, hyphenation dictionaries, and other files too.
geek1011 is offline   Reply With Quote
Old 12-17-2018, 07:59 PM   #59
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,729
Karma: 17472846
Join Date: Nov 2012
Location: New Ulster
Device: Kobo Glo
Now that there is plenty of space at the top and bottom of the page, I think the default settings for the ePub fixed top/bottom margins patch should be reduced to zero.

ePub fixed top/bottom margins: (libnickel.so.1.0.0.yaml)
Spoiler:
Code:
ePub fixed top/bottom margins:
  - Enabled: no
  - PatchGroup: ePub padding-bottom alternatives
  - Description:
      This patch sets the @page margin sizes in epubs to fixed custom values,
      overriding any @page margin set in the book's CSS stylesheet. (But beware
      that some books also set page margins in an XPGT stylesheet which are added
      to any CSS @page margins, and those will not be affected by this patch.
      See the "Ignore ePub book Adobe XPGT stylesheet (page-template.xpgt)" patch
      in librmsdk.so.1.0.0.yaml for a way to remove the XPGT stylesheet margins.)
  - FindReplaceString:
      Find: "\x20padding-bottom: %1em !important;\n"
      Replace: "}@page{margin:00px 00px 00px}body{"
    # *** Replacement values start here, don't change anything above ***
  - ReplaceString: {Offset: 0x0E, Find: "00px", Replace: "00px"} # TOP MARGIN
  - ReplaceString: {Offset: 0x18, Find: "00px", Replace: "00px"} # BOTTOM MARGIN
    #
    # Minimum LEFT/RIGHT MARGIN: (This margin will overlap the left/right margin
    # set with the adjustment slider, not add to it.)
  - ReplaceString: {Offset: 0x13, Find: "00px", Replace: "00px"}


Edit: Just a couple of notes for those unfamilliar with this patch:

1. It can't reduce the size of the built-in header/footer, negative values don't work, but setting the @page margins to zero with the patch at least overrides any larger @page margins that might have been set in the book's CSS stylesheet by the publisher.

2. You can change the units from px to others such as mm or pt, but % sizes don't work for @page margins, and em sizes are scaled relative to the base font size, not necessarily to the font size used for paragraphs.

Last edited by GeoffR; 12-17-2018 at 08:52 PM. Reason: Added some notes
GeoffR is offline   Reply With Quote
Old 12-17-2018, 08:06 PM   #60
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: 1,099
Karma: 2580105
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
Quote:
Originally Posted by GeoffR View Post
Now that there is plenty of space at the top and bottom of the page, I think the default settings for the ePub fixed top/bottom margins patch should be reduced to zero.

ePub fixed top/bottom margins:
Spoiler:
Code:
ePub fixed top/bottom margins:
  - Enabled: no
  - PatchGroup: ePub padding-bottom alternatives
  - Description:
      This patch sets the @page margin sizes in epubs to fixed custom values,
      overriding any @page margin set in the book's CSS stylesheet. (But beware
      that some books also set page margins in an XPGT stylesheet which are added
      to any CSS @page margins, and those will not be affected by this patch.
      See the "Ignore ePub book Adobe XPGT stylesheet (page-template.xpgt)" patch
      in librmsdk.so.1.0.0.yaml for a way to remove the XPGT stylesheet margins.)
  - FindReplaceString:
      Find: "\x20padding-bottom: %1em !important;\n"
      Replace: "}@page{margin:00px 00px 00px}body{"
    # *** Replacement values start here, don't change anything above ***
  - ReplaceString: {Offset: 0x0E, Find: "00px", Replace: "00px"} # TOP MARGIN
  - ReplaceString: {Offset: 0x18, Find: "00px", Replace: "00px"} # BOTTOM MARGIN
    #
    # Minimum LEFT/RIGHT MARGIN: (This margin will overlap the left/right margin
    # set with the adjustment slider, not add to it.)
  - ReplaceString: {Offset: 0x13, Find: "00px", Replace: "00px"}
Is this final (i.e. do you want this added to the zips)?
geek1011 is offline   Reply With Quote
Reply

Tags
kobopatch, patch, patch32lsb, patches, patching

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.13.1 GeoffR Kobo Developer's Corner 56 07-01-2016 10:59 AM
Instructions for patching firmware 3.16.10 GeoffR Kobo Developer's Corner 12 08-14-2015 04:40 AM
Instructions for patching firmware 3.16.0 GeoffR Kobo Developer's Corner 74 08-12-2015 03:12 PM
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


All times are GMT -4. The time now is 11:18 PM.


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