![]() |
#16 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
|
Quote:
Nothing does, but removing it by filtering the property. At least this makes them uniform... Last edited by mzso; 02-11-2018 at 04:54 AM. |
|
![]() |
![]() |
![]() |
#17 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,078
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:
1) A code error . Some Errors in the CSS will cause some render engines to ignore the whole 2) Not linked properly to the file. 3) Another (inline?) style overrides the CSS 4) Failure of the user to understand the (HTML/CSS) code being modified |
|
![]() |
![]() |
![]() |
#18 |
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
|
In a properly made eBook, the font size of the body font will be the default and the default is 1em. So 1.2em will be just fine as long as you don't do something silly and override the default font size.
|
![]() |
![]() |
![]() |
#19 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
|
Well, the line height didn't change at all. I added all the CSS code you shared. Even increased the line-height values to make it more obvious. But nothing but my header changed. And some title text.
|
![]() |
![]() |
![]() |
#20 | |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Quote:
Check your CSS file for the <body class=???> and add line-height: 1.2; to that class (if it's not already included). Go through the CSS file and delete all the line-heights except for the class that is the <body class>. Do a regex find and replace to delete them all. Sometimes, you just have to keep looking to find the problem, and the problem might be found where you don't expect it to be. |
|
![]() |
![]() |
![]() |
#21 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Yes, 1.2em is fine when the font size has been coded correctly, but 1.2 is the standard and ends up working better, because the font size is not always coded correctly (quite often, actually--isn't it amazing how many ebooks are coded incorrectly?).
|
![]() |
![]() |
![]() |
#22 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
|
Quote:
Ps: Here are the source CSS files fo the books I tested with. I guess there's a number of elements I would need changed. Spoiler:
|
|
![]() |
![]() |
![]() |
#23 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
|
Quote:
If you set the body style to a line-height of 1.2 instead of 1.2em then inherited fonts will be spaced properly relative to the font used. |
|
![]() |
![]() |
![]() |
#24 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Add the following to your .calibre entry in the .css file:
line-height: 1.2; so that it looks like this (I deleted one line and added another): .calibre { display: block; font-size: 1em; line-height: 1.2; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; text-align: justify; } Better yet, change that entry to this and see if you like it better: .calibre { display: block; font-size: 1em; line-height: 1.2; margin-bottom: 0; margin-left: 30pt; margin-right: 30pt; margin-top: 0; text-align: justify; } When you're having problems with line-height, chances are that the line-height line is missing from the body class, which is .calibre in your case above. My extra CSS entries change any line-heights that aren't 1.2 to 1.2. I would also delete all the lines for line-height in the rest of the .css file (and you really should have .css files: page_styles.css and stylesheet.css). Just adding my extra CSS entries won't do any good, since those are extra entries to either change current entries or to add to current entries. |
![]() |
![]() |
![]() |
#25 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Using em to set up the line-height of a book is a bad idea. And no, the code does not look better. I prefer using a 1.3 value for the body (and modify this value according to some individual styles if need be).
Last edited by roger64; 02-12-2018 at 11:49 PM. Reason: prefer |
![]() |
![]() |
![]() |
#26 | |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
|
Quote:
If text-align is not justify change it to justify. I imagined it would make every text justified but in reality the book doesn't change at all. Edit: I just realized that the same books appear justified when I view them in SumatraPDF, meanwhile they appear left aligned when viewed in Calibre and after conversion to PDF also. Last edited by mzso; 02-15-2018 at 05:29 AM. |
|
![]() |
![]() |
![]() |
#27 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
![]() |
![]() |
![]() |
#28 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Feb 2018
Device: PC
|
Thanks. I found that not long after posting, it worked fine. (Though rules not working is still a little odd.)
|
![]() |
![]() |
![]() |
#29 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
"Why set extra CSS, if you're going to convert a book go to the conversion settings choose Look & feel - Text tab and select Justify text. This will ensure the body of the text is justified during conversion."
Doing this will justify the cover image, which means it will be off-center (in many cases). |
![]() |
![]() |
![]() |
#30 | |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aura H2O Line height setting is ignored | kAlvaro | Kobo Reader | 6 | 08-09-2016 07:59 AM |
Calibre - changing the line-height in the user interface book description | CynthiaBlue | Development | 2 | 02-05-2016 12:48 AM |
Set maximum height for images in reader | truth1ness | Library Management | 0 | 10-06-2015 12:36 PM |
optimal line height ? | cybmole | Sigil | 6 | 09-05-2013 09:30 AM |
Line height insanity! | Kamikuza | Conversion | 6 | 10-24-2012 11:56 PM |