![]() |
#1141 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jgoguen: No problem
![]() I'll be waiting for more people to test this though, because after a bit more testing, I appear to have managed to break stuff in certain circumstances (cf. latest edit of #1137) ^^. That said, I can launch the PR right now if you prefer that as a means of code review? (In the mean time, pushed on GH). Last edited by NiLuJe; 01-08-2015 at 08:15 PM. |
![]() |
![]() |
![]() |
#1142 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
I think the book's stylesheet will override the patched device stylesheet, so If the plugin adds padding to div#book-inner in the book's stylesheet then idealy it should choose either left/right padding or top/bottom padding depending on whether the writing direction is horizontal or vertical, or if that is not possible then just add padding to all four sides.
I also wonder if we should add the padding to div#book-columns instead of div#book-inner, so that people can still use the alternative firmware patch that adds padding via the body>* selector? (Some might want to do this if they have a mix of kepubs made with the old and new plugins.) Last edited by GeoffR; 01-09-2015 at 12:39 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#1143 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I don't think the css should hard-codes the plugin. Reading it from a configurable file is the most flexible. Or leave it completely alone. Once the divs are in the book, then the patch should work. Or use the "Modify CSS" and the kobo_extra.css file to add them during the send should work.
If it is hard-coded, it should be identical to what Kobo is using. Adding the other two rules forces them on people who might not want them. And is that padding correct for all devices? Or just the H2O and HD? |
![]() |
![]() |
![]() |
#1144 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Quote:
0.2em is just what seems to work from the testing that has been done so far, it seems to be enough to prevent any cutoff of an italic f at font size 1em or a normal f at font size 2em, which should be good enough for most books, but there will probably be some situations where the cutoff still happens, such as a 2em italic f which might occur in a right-justified heading. |
||
![]() |
![]() |
![]() |
#1145 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@davidfor/@GeoffR: Speaking of, I actually appear to have vanilla kepubs *without* those specific divs (and style-hacks, except for the .koboSpan thingy) [at least according to the liberated Kobo Desktop version of the file. The one on my H2O looks the same, but with it being encrypted, who knows]. Yet the book-inner/book-columns stuff is still mentioned in the js :?.
One common trait to those books is that they *already* wrap the full body in a single div (although not book-inner and/or book-columns). And I could swear those don't suffer from the cutoff bug. Since I basically just threw myself in the deep-end of Kobo arcane stuff here, I'd be glad for some more feedback on that point ![]() Last edited by NiLuJe; 01-09-2015 at 09:19 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#1146 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
My slightly-educated opinion on the matter is to please try to emulate the current "real" KePubs as closely as possible
![]() EDIT: As for JS and CSS files, try to use the mechanism I'm using for "reference.kepub.epub" or (probably better) work with the existing code for sending a device-based CSS file. You could easily add code to do the same for JS files. Last edited by jgoguen; 01-09-2015 at 10:07 AM. |
![]() |
![]() |
![]() |
#1147 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jgoguen: The issue with this specific bit of CSS (the kobo stylehacks) is that (when present), it's inlined in each (x)html file, and not evacuated to an external CSS, so we can't (easily) use the same mechanism as for the JS ;/.
---- To illustrate my previous message, I forgot to mention that those books of course use 0 padding & margin, and yet, no cut-off... :? The code basically looks like Code:
<body> <div class="galley-rw"> ... </div> </body> Code:
.galley-rw { padding: 0; font-size: 1em; font-weight: normal; color: rgb(0, 0, 0); orphans: 1; widows: 1; letter-spacing: 0; word-spacing: 0; font-family: serif; margin: 0; line-height: 1.2em; text-align: justify; } Last edited by NiLuJe; 01-09-2015 at 10:39 AM. |
![]() |
![]() |
![]() |
#1148 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,545
Karma: 79436716
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
I think you need to look at the "age" of the kepub; I think there have been changes over the years in the conversions done, and I'm not sure they go back and reconvert all material.
|
![]() |
![]() |
![]() |
#1149 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PeterT: Valid point. That's a fairly recent book (September 2014), as are the few others I have that look like that.
|
![]() |
![]() |
![]() |
#1150 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
Yay inline CSS<!>
If you declare an external stylesheet and make sure it's the second-to-last stylesheet defined (since the user stylesheet should override this one) then you don't need to inline the CSS. There's an order of precedence for styles: external sheets (in document order), inline styles in the <head> in order, and styles on each tag. |
![]() |
![]() |
![]() |
#1151 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@jgoguen: To be clear, because I'm starting to get confused myself ;D:
It's inlined in vanilla kepubs. The patched version of the plugin puts it in an external stylesheet, defined hopefully last or next-to-last. Good point about the kobo_extra one though, I'll see where that one falls ![]() |
![]() |
![]() |
![]() |
#1152 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
@NiLuJe: To keep things easier to manage, what I'd recommend is that you start from the master branch as it was when you forked, then create a branch for each distinct change (git checkout -b branch-name), make only your distinct changes for the one branch, push it, and make a pull request for each branch. Then go back to master and make a new branch and start on the next distinct feature.
|
![]() |
![]() |
![]() |
#1153 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Also the screenshot doesn't show any f characters at the right of the screen, f is the only character I usually see cut off. Can you check to see if an f gets cut off at the right? |
|
![]() |
![]() |
![]() |
#1154 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@GeoffR: Definitely a kepub, and not the only one like that (mostly from Hachette, AFAICT)
![]() ![]() But yes, I am indeed using the nerfed kepub margins patch (default values) ![]() Good point on the f's though, I'll check ![]() Last edited by NiLuJe; 01-09-2015 at 07:00 PM. |
![]() |
![]() |
![]() |
#1155 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
error, kobo aura one |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo Device Driver Update | davidfor | Devices | 284 | 05-24-2019 05:24 PM |
[Device Plugin] Kindle 2, 3, 4, Touch Device Interface MBP Update Mod | cryzed | Plugins | 7 | 10-28-2012 04:58 PM |
[Device Interface Plugin] Update for Nook Color Driver | jmricker | Plugins | 0 | 10-22-2011 10:11 AM |
Touch Kobo Touch Extended 2 Year Warranty - Is it worth the $34.99? | EverC | Kobo Reader | 11 | 08-31-2011 11:47 PM |
Touch Kobo Touch Extended Warranty Program | SensualPoet | Kobo Reader | 1 | 07-17-2011 04:08 AM |