![]() |
#91 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
<Patch> patch_name = `Custom reading footer style` patch_enable = `yes` # Multi-version patch: 3.15.0 - 3.18.0+ # # 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. # # When editing the replacement values below, BE CAREFUL NOT TO CHANGE THE LENGTH # OF THE REPLACEMENT STRING! If a replacement string is too long you will get # an error when making the patch, but if one is too short then there will be no # error, but strange things will happen to the reading footer. # find_base_address = `ReadingFooter {\n\tmin-height: 70px;` # # Replacement footer height values: Touch/Mini replace_string = 0011, `min-height: 70px;`, `min-height: 32px;` replace_string = 0024, `max-height: 70px;`, `max-height: 32px;` # Replacement footer height values: Glo/Aura replace_string = 0085, `min-height: 82px;`, `min-height: 40px;` replace_string = 0098, `max-height: 82px;`, `max-height: 40px;` # Replacement footer height values: AuraHD/H2O/GloHD replace_string = 00DA, `min-height: 120px;`, `min-height: 030px;` replace_string = 00EE, `max-height: 120px;`, `max-height: 030px;` # # find_base_address = `#caption {\n\tfont-size: 16px;` Replace_string = 0000, `#caption {\n\tfont-size: 16px;\n}\n\n#caption[qApp_deviceIsPhoenix="true"] {\n\tfont-size: 20px;\n}\n\n#caption[qApp_deviceIsDragon="true"] {\n\tfont-size: 26px;\n}\n\n#caption[qApp_deviceIsAlyssum="true"] {\n\tfont-size: 30px;\n}\n\n#caption[qApp_localeName="ja_JP"] {\n\tfont-family: Sans-SerifJP;\n}`, `#caption {font-size: 16px;margin-top: 00px;}\n#caption[qApp_deviceIsPhoenix="true"] {font-size: 20px;}\n#caption[qApp_deviceIsDragon="true"] {font-size: 26px;}\n#caption[qApp_deviceIsAlyssum="true"] {font-size: 30px;}\n#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}` # # Replacement caption font size value for Touch/Mini: replace_string = 000A, `font-size: 16px;`, `font-size: 16px;` # Replacement caption font size value for Glo/Aura: replace_string = 0054, `font-size: 20px;`, `font-size: 20px;` # Replacement caption font size value for AuraHD/H2O: replace_string = 008C, `font-size: 26px;`, `font-size: 26px;` # Replacement caption font size value for GloHD: replace_string = 00C5, `font-size: 30px;`, `font-size: 30px;` # # 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.) replace_string = 001A, `margin-top: 00px;`, `margin-top:-10px;` # # Uncomment to use a fixed replacement caption font family, for all devices: # (You can change Avenir to another font name of your choice, but Avenir or # Georgia are recommended because other fonts may 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.) #replace_string = 00D7, `#caption[qApp_localeName="ja_JP"] {font-family: Sans-SerifJP;}`, `#caption {font-family: Avenir;} </Patch> <Patch> patch_name = `Custom footer` patch_enable = `yes` # Multi-version patch: 2.8.1 - 3.18.0+ # # Changes the footer text with something shorter # (not sure how it affects translations) # find_base_address = `Page %1 <i>of</i> %2` replace_string = 0000, `Page %1 <i>of</i> %2`, `%1 / %2` </Patch> Last edited by JSWolf; 10-30-2015 at 02:39 PM. |
|
![]() |
![]() |
![]() |
#92 |
Connoisseur
![]() Posts: 50
Karma: 10
Join Date: Oct 2015
Device: none
|
@JSWolf
![]() However, I inserted even lower values in max-height: instead of 030px;`I wrote 026px In `margin-top:-10px;`I put -08px Someone from another forum suggested these figures. And it really minimized the footnote very well - probably more than you did. I hope, one day someone (from Kobo) will resolve the issue with the unnecessary header. Is it possible to change the values after applying the patch? P.S. I admire your ability to enjoy reading with such a tiny font ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#93 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
You would have to reapply the patch with updated values; there is no means to override it on the device itself.
|
![]() |
![]() |
![]() |
#94 | |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
Even with the same values, I don't come as near as you with the glo hd.. strange.. there is always almost 8 mm between the last line of text and the page xx of xx with my Glo-HD,it must be the higher resolution... (no there is no page margin or bottom margin present in the ebooks..) Last edited by Nick_1964; 10-30-2015 at 06:52 PM. |
|
![]() |
![]() |
![]() |
#95 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
If you want to see how close the text can get to the page number, load this Margin test ePub, on the first page it will draw a rectangle as big as possible on the screen, which will let you see how much space the reading footer is using. If your text is not getting as close to the page number as this rectangle does, then it is because of your choice of font and other settings, or something in the books. See the screenshots at the bottom of this post for more info. Last edited by GeoffR; 10-30-2015 at 07:39 PM. Reason: See the screenshots ... |
|
![]() |
![]() |
Advert | |
|
![]() |
#96 | |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
From my config file: readingFontFamily=Malabar readingFontSize=20 readingLeftMargin=0 readingLineHeight=0.85 readingMenuState= readingRightMargin=0 showPageHeader=false Well 8 mm is over reacted.. 4 or 5.. Test screen Book. |
|
![]() |
![]() |
![]() |
#97 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#98 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
You either need to make the footer 6 pixels (Edit actually 10px, see below) smaller (which means reducing the font size used in the footer), or change the font size and line spacing settings of the text (which might mean more or fewer lines on the page), or add a few pixels to the @page top margin, which will shift all the text down the page by a few pixels. (Edit: e.g. if you made the @page top margin 11px then the gap at the top of the page would increase from 15px to 26px, and the gap at the bottom would reduce from 38px to 27px.) Edit: Here is a way of thinking about it that might be simpler, as you don't need to measure anything from screenshots: Your total screen height is 1448px. There is a built-in top margin of 15px that we can do nothing about (except switch to full-screen mode), and you have set your footer to a height of 35px, which leaves a usable screen height of 1448-15-35 = 1398px. Your choice of font, font size and line spacing results in a total line height of 44px, so you can fit 1398\44 = 31 lines on the screen leaving a gap of 1398-31*44 = 34px. (I measured 38px from the screenshot, but some fonts include white space at top or bottom so it is hard to tell where to measure from, this method should be more accurate.) So to get another line of text at your currentsettings you would need to reduce your footer height by 10px to 25px. (or 24px, to allow for possible rounding in how the margins are calculated.) Or, you could increase either line spacing or font size so that your line height was 45px, and that would still give you 31 lines of text, but with a much smaller gap at the bottom: 1398-31*45 = 3px. (You will need to apply the `Custom font sizes` patch to allow a 1px adjustment at that size.) If you keep the footer height at 35px and adjust your font size and/or line spacing to change the line height (currently 44), then this table shows the number of lines of text that will fit on a page, and the size of the bottom gap (in pixels.): Code:
Line height 40 41 42 43 44 45 46 47 48 -------------------------------------------------------- Lines/page 34 34 33 32 31 31 30 29 29 Bottom gap 38 04 12 22 34 03 18 35 06 Last edited by GeoffR; 11-01-2015 at 01:58 AM. Reason: Here is a way of thinking about it |
|
![]() |
![]() |
![]() |
#99 |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Wow.. that is just a hell of a text you wrote,but it makes all perfectly clear (maybe you have to shift it to your metazoa patches topic)
But, my reader is set for "night modus",when I am tired, so I take a bit of a larger font for comfort. And the effect of adding something to top margin only shift everything more to the bottom so I am only doing cosmetics but fool myself,yes it shift to the bottom,but it doesn't put more lines on it. I now understand why with a lot of books at the beginning of the chapter,the txt is almost shifted to the footer, it is just because they put in a margin at top. When I changes the values of the footer patch from 35 to 25 it cuts off the top of the page xx of xx txt a bit.. because i made that txt a little bit bigger.. So i think that in balance of reading comfort,font,the footer txt i can't squeeze more out of it without offering something of that comfort. I do bookmark everything you say ( I have a favorite part called geoffr in my list with your tips) . Stumbled into another problem. I use the extra .css option with the following rules ( i like it to have a few mm from left and right bezel..) I have enabled your "ePub fixed/adjustable top/bottom margins" patch. Set the values to zero. 3.17.3 Spoiler:
in the extra .css the following rules: Code:
body, body.calibre { margin-left:0.1em!important; margin-right:0.1em!important; padding-left:0!important; padding-right:0!important; widows:1; orphans:1; } @page { margin: 0.00em 0.00em 0.00em 0.00em!important; } body,div,p { hyphens: none !important; adobe-hyphenate: none !important; -webkit-hyphens: none !important; } Tried and tried... nothing works.. Later I found out that there is also an page-template.xpgt So I guess everything patched in the reader, every extra rule with !important added to css will be overruled by the settings in misc: page-template.xpgt ?? So at the end the publishers force me to still edit the book. Can u confirm that this page-template.xpgt overrides the ePub fixed/adjustable top/bottom margins patch, and the !important stuff in the normal .css ?? |
![]() |
![]() |
![]() |
#100 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You can use the Modify ePub plugin to get rid of page-template.xpgt without having to edit the ePub. However, using the eBook editor is also very simple to use to get rid of files you don't want.
|
![]() |
![]() |
![]() |
#101 | |
Bookworm
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
|
Quote:
(the only way to do it now is use the OTG cable on my tablet, open total commander for android,rename the epub as zip,unzip it,edit the css, zip it again,rename it to epub and put it back on the reader,but then the reader sees it as a new book,totally forgot where i was on which page..) I try to "automate" as many tasks as I can do. For the books I can edit it is good to know,like I asked, does a page-template.xpgt always override any settings.. ? There are now so many points I have to look for while editing.. it would be nice if the normal or extended driver has an option to remove the xpgt files while transferring,because I do forgot it... that is still not possible while in the hospital... (flat liner,reanimated,total kidney failure so every 2 days for 8 hours of dialysis in hospital.. I read one book every 3 hours so I always have about 20 fresh ones..but still must edit them..) |
|
![]() |
![]() |
![]() |
#102 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,792
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There is one suggestion, get a Windows based tablet. Then you can run Calibre to do all you need with your eBooks.
|
![]() |
![]() |
![]() |
#103 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
From what I gather, the page-template.xpgt will override anything in the CSS stylesheet.
I don't know much about the page-template.xpgt, my early experience was that it never made the book look better and sometimes made it look a lot worse, so I always strip it using the Modify ePub plugin at the same time I strip all the other useless crap like DRM tags, iTunes files, Javascript, etc. It might be possible to make a patch so that the styles in the page-template.xpgt are ignored, but I would have to learn more about it first. |
![]() |
![]() |
![]() |
#104 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,535
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Probably by just patching the page-template.xpgt string in nickel or one of the libraries one could ignore all entries in the page-template file.
|
![]() |
![]() |
![]() |
#105 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
It is referenced from the html in the same way as a CSS stylesheet: Code:
<link rel="stylesheet" type="text/css" href="stylesheet.css"/> <link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt"/> |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Instructions for patching firmware 3.15.0 | GeoffR | Kobo Developer's Corner | 146 | 05-24-2016 06:10 AM |
Instructions for patching firmware 3.17.3 | GeoffR | Kobo Developer's Corner | 60 | 09-17-2015 05:35 PM |
Instructions for patching firmware 3.17.0 | GeoffR | Kobo Developer's Corner | 49 | 08-16-2015 05:20 AM |
Instructions for patching firmware 3.16.10 | GeoffR | Kobo Developer's Corner | 12 | 08-14-2015 03:40 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 |