View Single Post
Old 05-26-2014, 09:57 PM   #118
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,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
I have found a bug in the stock lowest margin setting (slider all the way to the left) that also is present in these custom margin settings. Being that the custom margin setting allows for more options to the width I was wondering how I could edit this code to start with the second setting (replace_int = FE6740, 04, 02) but still allow eight settings. What would the new eighth line of code be? Basically I would like to hide the lowest margin setting from the sytem (as it cuts off text) and start with what is the second smallest custom margin setting and then have seven more values that move up from that.
The margins slider actually has nine values, zero plus the eight that are set in the patch. I haven't tested this but you could try extending the patch to replace the zero margin too (note the added replace_int line at the beginning):
Firmware 3.3.0:
Code:
<Patch>
patch_name = `Custom left & right margins`
patch_enable = `yes`
# Values for replace
replace_int = FE6738, 00, 01
replace_int = FE673C, 02, 02
replace_int = FE6740, 04, 03
replace_int = FE6744, 06, 04
replace_int = FE6748, 08, 05
replace_int = FE674C, 10, 06
replace_int = FE6750, 12, 07
replace_int = FE6754, 14, 08
replace_int = FE6758, 16, 09
</Patch>


Quote:
I also have a second question regarding the "Custom reading footer style". When "Decrease footer example for Glo/Aura" is selected the fonts left behind when using the "Remove system fonts in Reader list" such as "Document Default" and "Gothic" place the footer half way below the screen, cutting off text. There is no problem with the footer when using custom fonts. What I was wondering is if there was a way to do the opposite of what the "Remove system fonts in Reader list" does and have only custom fonts show in the list while hiding all of the fonts such as "Document Default" that have the footer cut off problem. This I feel would result in a much cleaner system font menu that would only show fonts that work correctly with the "Decrease footer example for Glo/Aura".
Gothic and one or two other fonts sit unusually low on the line, I think it is a fault with the font metrics. Unfortunately Gothic seems to be the default font used for the footer, so it is a bit of a problem, I think all you can do is increase the height of the footer, removing the font from the selection list won't prevent it being used as a default.

On my Glo the example footer is just high enough (40px) to avoid cutting off the footer text when Gothic font is used, so there must be somehing different about the Aura.

Below is a version of the footer patch which makes editing the different values a bit easier, just make sure to keep the replacement strings the same length. Edit the replacement strings and change the "min-height: 40px;" and "max-height: 40px;" to a larger value.

firmware 3.3.0:
Spoiler:
Code:
<Patch>
patch_name = `Custom reading footer style`
patch_enable = `yes`
replace_string = DAAC44, `ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 40;\n}\n\nReadingFooter[qApp_deviceCodeName="kraken"], \nReadingFooter[qApp_deviceCodeName="phoenix"] {\n\tmin-height: 82px;\n\tmax-height: 82px;\n\tqproperty-footerMargin: 15;\n}\n\nReadingFooter[qApp_deviceCodeName="dragon"] {\n\tmin-height: 120px;\n\tmax-height: 120px;\n\tqproperty-footerMargin: 20;\n}\n\n* {\n\tfont-size: 16px;\n}\n\n[qApp_deviceCodeName="kraken"], \n[qApp_deviceCodeName="phoenix"] {\n\tfont-size: 20px;\n}\n\n[qApp_deviceCodeName="dragon"] {\n\tfont-size: 26px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`, `ReadingFooter {\n\tmin-height: 70px;\n\tmax-height: 70px;\n\tqproperty-footerMargin: 40;\n}\n\n* {\n\tfont-size: 16px;\n\tpadding-bottom: 0px;\n\tmargin-top:  0px;\n}\n\n[qApp_localeName="ja_JP"] {\n\tfont-family: A-OTF Gothic MB101 Pr6N;\n}`
#
# Uncomment the replace_string lines of one of the examples below, comment out
# the rest. If you choose to make further changes to the examples, BE CAREFUL
# NOT TO ALTER THE LENGTH OF THE REPLACEMENT STRINGS! (Add or remove spaces if
# necessary to keep the total length the same.)
#
# Example for Touch/Mini:
#replace_string = DAAC55, `min-height: 70px;`, `min-height: 32px;`
#replace_string = DAAC68, `max-height: 70px;`, `max-height: 32px;`
#replace_string = DAAC85, `footerMargin: 40;`, `footerMargin: 40;`
#replace_string = DAAC9F, `font-size: 16px;`, `font-size: 16px;`
#replace_string = DAACB1, `padding-bottom: 0px;`, `padding-bottom: 4px;`
#
# Example for Glo/Aura:
replace_string = DAAC55, `min-height: 70px;`, `min-height: 40px;`
replace_string = DAAC68, `max-height: 70px;`, `max-height: 40px;`
replace_string = DAAC85, `footerMargin: 40;`, `footerMargin: 15;`
replace_string = DAAC9F, `font-size: 16px;`, `font-size: 20px;`
replace_string = DAACB1, `padding-bottom: 0px;`, `padding-bottom: 5px;`
#
# Example for Aura HD:
#replace_string = DAAC55, `min-height: 70px;`, `min-height: 50px;`
#replace_string = DAAC68, `max-height: 70px;`, `max-height: 50px;`
#replace_string = DAAC85, `footerMargin: 40;`, `footerMargin: 20;`
#replace_string = DAAC9F, `font-size: 16px;`, `font-size: 26px;`
#replace_string = DAACB1, `padding-bottom: 0px;`, `padding-bottom: 8px;`
</Patch>

Last edited by GeoffR; 05-26-2014 at 10:15 PM. Reason: simplify
GeoffR is offline   Reply With Quote