![]() |
#1 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jun 2013
Device: None yet
|
4.x Viewer Line Spacing?
Hi, longtime 3.x user who finally upgraded to 4.13. Lots of things are faster and smoother, so thanks Kovid!
The biggest struggle I'm having is with the new Viewer. I got the toolbar and scrollbar back, configured my bottom row for page depth, and put it into Page (not flow) mode so it basically looks like 3.x (I do miss my page flip, but que cera). But my epubs all seem really tightly line spaced in the new viewer. I tried a bunch of CSS snippets from the massive CSS thread (https://www.mobileread.com/forums/sh...ad.php?t=51500) (line-spacing, line-height) but none of them seemed to impact my test books. These are DRM free baen books, so I'm sure they have some CSS of their own, but still... So, questions: 1) With an open book in the viewer, I add body {line-height:100 !important;} to the viewer in the text box under Preferences>Styles, but I don't see any difference in the book text. I've also verified in the Inspector that these values are appearing. No linespace change. Any suggestions? I'm sure I'm doing something wrong... Perhaps some additional "selectors" or tags or something? 2) How does using the "font size" controls affect this? Will whatever spacing I create grow appropriately as I increase font size, or should I just learn to squint more? 3) Are these style edits saved per book, or is this a systemwide viewer change? Would be nice not to have to do for every book, but would also be cool to have a way to have different overrides for specific book variables (this publisher may do something bad, or this series all has odd drop caps that screw up the flow, etc.). (I know, if it's just a single problematic book, edit the CSS manually in the editor, but I'm not that good yet!) So, thanks for any suggestions! Michael |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,904
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
1 is very tight.
The common default is 1.2 (height of the current character space+.2 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jun 2013
Device: None yet
|
Right, 1 is tight; 1.2 is the default, but 100 should make it huge. No effect.
Update: I spent more time in the Inspector, and it would appear that I'm being overridden way deep down in some p tags. So, this appears to have some impact, copied from another thread: p {line-height:40px !important;} Now I just need to understand if it's going to break anything. I assume px is pixels; should I use a percentage since that's more flexible? Any "recommended" way to do this? |
![]() |
![]() |
![]() |
#4 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,904
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
There are cases where I have reduced line-height that far. I was stitching together Image slices. But I sur can't see any other reason off the top-o-me bald head ![]() |
|
![]() |
![]() |
![]() |
#5 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,130
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But the thing is, in the eBook, do not set a line hight. Set it with the line height settings in the reading software.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Member
![]() Posts: 11
Karma: 10
Join Date: Jun 2013
Device: None yet
|
Quote:
Quote:
No one (well, I don't) wants a line spacing of 1; from my tests in a browser, line-height 100 defaults to 100 pixels, an "exaggerated for effect" test to see if I was making an impact. When I finally tried it in the p tag, you could see the 100 pixels for sure! I tried the px version because I found books specifying a height of 20px. Reading through more threads, I'm now at this: p {line-height:140% !important;} This makes all the lines a bit more spaced than before; I haven't tested enough with "Font Larger" to see if it makes things too big. I also haven't figured out yet how to add "skip a line after a paragraph" but I'm sure someone's thread will help. |
||
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,904
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
p {margin-top: .5em }
Spaces Paragraphs I simply use Top vs Bottom because a bottom can possibly cause a blank screen for the last paragraph |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,192
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can read all abut how line-height works here: https://developer.mozilla.org/en-US/...SS/line-height
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jun 2013
Device: None yet
|
These are great, gang! Thanks!
I've wound up with Code:
p {line-height: 1.4 !important; margin-top: 0.5em !important;} PS: https://developer.mozilla.org/en-US/...CSS/margin-top for info about the margin-top value, via theducks. |
![]() |
![]() |
![]() |
#10 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,904
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The Editor HAS an Inspector mode (View: Inspector) where it can show a visual of the Box properties ![]() |
|
![]() |
![]() |
![]() |
Tags |
css, line spacing, viewer |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pdf line spacing in Calibre Viewer | sanon | Library Management | 4 | 04-20-2016 07:07 PM |
Line Spacing | Francois Driesen | Calibre | 2 | 08-22-2014 02:21 PM |
Line Spacing | Nikita Jedi | Conversion | 11 | 07-07-2012 07:05 PM |
7.34 line spacing??? | JSWolf | Calibre | 18 | 12-19-2010 11:09 PM |
Line spacing | Ivo | Kobo Reader | 3 | 06-30-2010 12:54 PM |