06-13-2014, 01:49 PM | #16 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
This patch can force the epub @page margins to zero, but that doesn't affect the left/right margins set by the slider, which are not set using CSS rules. If you used @page {margin: %1} that would result in double-sized left/right margins, as the @page margin would be added to the slider margin. |
|
06-13-2014, 03:03 PM | #17 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Ah, OK. I guess the first time I saw it I assumed there was a "body { margin: %1 }" or similar in the CSS of the first post. Now I see there isn't, so I should have guessed the side margins are not controlled by CSS (at least not by this piece).
|
06-15-2014, 02:51 PM | #18 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Do you know where this 'res:///fonts' directory is located? Can it be accessed from outside the reading app? Could possibly an external CSS file be placed there and used with an @import rule?
|
06-15-2014, 04:01 PM | #19 | |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Resources such as res:///fonts don't necessarily refer to a specific directory. I think res:///fonts refers to anywhere that the reader looks for fonts, including the fonts/ directory on the user partition, the /usr/local/Trolltech/QtEmbedded-4.6.2-arm/lib/fonts/ directory on the system partition, and perhaps other places too. I have tried adding rules such as @import `mystyle.css`; to the beginning of the built-in epub stylesheet, but either it is ignored or I haven't found the correct place to put mystyle.css. In short, there may be a way to add a user stylesheet for epubs, but I don't think anyone has found out how to do it yet. (Other than modifying the internal stylesheet, as this patch does). |
|
06-15-2014, 05:30 PM | #20 | |
Grand Sorcerer
Posts: 6,171
Karma: 16228536
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
For instance, Kobos don't have a built-in monospace font and I actively avoid embedding fonts, so I've used this method when I want to reference a sideloaded monospace font for selected css classes only (e.g. code snippets). The same method works when a true small-caps font is desirable. It may not be relevant for your purposes, but just in case, here's a sample bit of css: Spoiler:
FWIW, I also tried very hard to find a way to reference an on-device custom css file using an @import. No joy, I'm afraid. I'm not sure why it doesn't work because it works fine on other 'Adobe-style' readers like the Sony and even the Mantano android reading app. The nearest I could get to a custom css file stored on the Kobo was this option in the calibre Kobo driver. ETA: I have been using the Kobo driver method, for many months, to force custom @page margins as GeoffR's new patch wasn't available when I transferred all my books. If/when I next need a factory reset, this patch seems like the better option. Last edited by jackie_w; 06-15-2014 at 05:42 PM. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Margin bottom, top problem on tablet | zs55 | Reading and Management | 7 | 05-23-2013 06:20 AM |
ODT to EPUB: margin-top and -bottom in tables | beedaddy | Conversion | 0 | 05-25-2012 05:05 AM |
margin top, bottom, additive or not ? | cybmole | Conversion | 5 | 02-16-2011 12:33 PM |
anyway to change Kindle top/bottom margin? | cdpango | Kindle Developer's Corner | 2 | 11-28-2010 08:20 PM |
calibre ignore margin-top and margin-bottom | bender | Calibre | 2 | 12-11-2009 06:58 AM |