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 01-19-2019, 01:11 AM   #1
price
Member
price began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Dec 2016
Device: Kobo Aura One
Modification of the footer font family is missing in latest patches...

Hi, I want to modify the footer font family, but the code relating to this is missing in patches released recently.
Why this happens? Is it possible to modify the font family in the new-redeased firmwares?
This is the code from nickle.yaml (4.12.12111):
Code:
Custom reading footer style:
  - Enabled: yes
  - PatchGroup: Reading footer alternatives
  - Description: |
      This patch customises the following properties of the reading footer:
      * Footer height (the amount of the screen reserved for the footer.)
      * Caption font size (Caption = page number or other progress indicator)
      * Caption top margin, which changes its vertical position within the footer.
      * Caption font family.
    # When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH
    # OF THE REPLACEMENT STRING!
  - FindBaseAddressString: "ReadingFooter {\n  qproperty-footerMargin: 105;\n}\n"
  - ReplaceString:
      Offset: 0
      Find:    "ReadingFooter {\n  qproperty-footerMargin: 105;\n}\nReadingFooter[qApp_deviceIsDragon=true] {\n  qproperty-footerMargin: 170;\n}\nReadingFooter[qApp_deviceIsDaylight=true] {\n  qproperty-footerMargin: 221;\n}\n#caption[qApp_deviceIsTrilogy=true] {\n  font-size: 19px;\n}\n#caption[qApp_deviceIsPhoenix=true] {\n  font-size: 23px;\n}\n#caption[qApp_deviceIsDragon=true] {\n  font-size: 29px;\n}\n#caption[qApp_deviceIsAlyssum=true] {\n  font-size: 32px;\n}\n#caption[qApp_deviceIsNova=true] {\n  font-size: 32px;\n}\n#caption[qApp_deviceIsDaylight=true] {\n  font-size: 37px;\n}\n#caption[qApp_localeName=\"ja_JP\"] {\n  font-family: Sans-SerifJP, sans-serif;\n  font-style: normal;\n}\n"
      Replace: "ReadingFooter {qproperty-footerMargin:105;min-height:70px;max-height:70px}\nReadingFooter[qApp_deviceIsDragon=true] {min-height:80px;max-height:80px}\nReadingFooter[qApp_deviceIsDaylight=true] {min-height:90px;max-height:90px}\n#caption {font-size:19px;margin-top:+00px}\n#caption[qApp_deviceIsPhoenix=true] {font-size:23px}\n#caption[qApp_deviceIsDragon=true] {font-size:29px}\n#caption[qApp_deviceIsAlyssum=true], #caption[qApp_deviceIsNova=true] {font-size:32px}\n#caption[qApp_deviceIsDaylight=true] {font-size:37px}\n#caption[qApp_localeName=\"ja_JP\"] {font-family:Sans-SerifJP,sans-serif;font-style:normal}\n\0"
    # Replacement footer height values: Touch/Mini/Glo/Aura/Aura2E
  - ReplaceString: {Offset: 42, Find: "min-height:70px", Replace: "min-height:40px", MustMatchLength: yes}
  - ReplaceString: {Offset: 58, Find: "max-height:70px", Replace: "max-height:40px", MustMatchLength: yes}
    # Replacement footer height values: AuraHD/H2O/GloHD/ClaraHD
  - ReplaceString: {Offset: 116, Find: "min-height:80px", Replace: "min-height:52px", MustMatchLength: yes}
  - ReplaceString: {Offset: 132, Find: "max-height:80px", Replace: "max-height:52px", MustMatchLength: yes}
    # Replacement footer height values: AuraOne
  - ReplaceString: {Offset: 192, Find: "min-height:90px", Replace: "min-height:60px", MustMatchLength: yes}
  - ReplaceString: {Offset: 208, Find: "max-height:90px", Replace: "max-height:60px", MustMatchLength: yes}
    #
  - ReplaceString: {Offset: 235, Find: "font-size:19px", Replace: "font-size:16px", MustMatchLength: yes} # Replacement caption font size value for Touch/Mini:
  - ReplaceString: {Offset: 305, Find: "font-size:23px", Replace: "font-size:20px", MustMatchLength: yes} # Replacement caption font size value for Glo/Aura/Aura2E:
  - ReplaceString: {Offset: 357, Find: "font-size:29px", Replace: "font-size:26px", MustMatchLength: yes} # Replacement caption font size value for AuraHD/H2O:
  - ReplaceString: {Offset: 444, Find: "font-size:32px", Replace: "font-size:30px", MustMatchLength: yes} # Replacement caption font size value for GloHD/ClaraHD:
  - ReplaceString: {Offset: 498, Find: "font-size:37px", Replace: "font-size:34px", MustMatchLength: yes} # Replacement caption font size value for AuraOne:
    #
    # Optional Replacement caption top margin value for all devices:
    # (A negative top margin moves the caption text upwards,
    # further from the bezel and closer to the page content.)
    #
    #ReplaceString: {Offset: 250, Find: "margin-top:+00px", Replace: "margin-top:-30px"}
  - ReplaceString: {Offset: 250, Find: "margin-top:+00px", Replace: "margin-top:-30px", MustMatchLength: yes}
price is offline   Reply With Quote
Old 01-20-2019, 04:55 PM   #2
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,805
Karma: 11493027
Join Date: Sep 2009
Location: UK
Device: PRS-350, Kobo: Aura6", H2O, GloHD, KA1, ClaraHD, Forma
Quote:
Originally Posted by price View Post
Hi, I want to modify the footer font family, but the code relating to this is missing in patches released recently.
Why this happens? Is it possible to modify the font family in the new-redeased firmwares?
I don't know why this option is no longer included. My guess is copy/paste error (rather than a deliberate removal) when the patching system moved to kobopatch

You can always add it back yourself to the end of the 'Custom reading footer style' patch in nickel.yaml. Something like the following, but change the red bit to your font of choice and be careful with the indentation:
Code:
  # Uncomment the replace_string line below to use a fixed replacement caption
  # font family, for all devices: You can change Georgia to another font name of
  # your choice, but Avenir or Georgia are recommended because other fonts might
  # not be loaded when the book is first opened and so might cause problems.
  # Unlike other strings it is OK if this replacement string is a bit longer or
  # shorter than the original.
  #
  - ReplaceString:
      Offset: 514
      Find:    "#caption[qApp_localeName=\"ja_JP\"] {font-family:Sans-SerifJP,sans-serif;font-style:normal}\n"
      Replace: "#caption {font-family:Georgia;}\n\0"
jackie_w is offline   Reply With Quote
Advert
Old 01-27-2019, 10:36 PM   #3
price
Member
price began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Dec 2016
Device: Kobo Aura One
It's very kind of you! The code works fine.
price is offline   Reply With Quote
Old 01-28-2019, 08:22 AM   #4
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,171
Karma: 3439551
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Kobo Aura Edition 2, Moto G5
I'll put it into the patch files later today.
geek1011 is offline   Reply With Quote
Old 03-01-2019, 10:05 PM   #5
price
Member
price began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Dec 2016
Device: Kobo Aura One
Quote:
Originally Posted by geek1011 View Post
I'll put it into the patch files later today.
price is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font weirdness in footer Jellby Kobo Reader 2 07-24-2014 04:03 AM
Larger font in footer? jscris Kindle Developer's Corner 0 01-08-2013 10:21 AM
How to change header/footer font? mngharry LRF 1 06-02-2009 03:01 AM
Adobe patches latest Reader security flaw Alexander Turcic Reading and Management 11 10-29-2007 04:56 PM
BookDesigner - Footer font? moneytoo Sony Reader 1 10-22-2007 11:31 AM


All times are GMT -4. The time now is 01:13 AM.


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