![]() |
#1 |
Connoisseur
![]() Posts: 76
Karma: 10
Join Date: Feb 2022
Device: None
|
Line-height being ignored in Viewer
Calibre 7.26 / LM 21 / Cinnamon 5.4.12.
Calibre Viewer is ignoring the line-height setting in the epub style sheet; Instead it is being set to a default by the viewer (looks like 1.2). I hve tried every solution proposed on the internet to no avail. Setting it in the viewer styles doesn't work either. But it's still not a solution as the line-height should automatically follow the epub stylesheet line height. This was definately working in older versions of calibre but it is inoperative in Calibre 7 26 (and at a guess probably for some considerable period before that). |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The viewer uses chromium to render HTML, line-height most defintely work in it. If you have a book where it's not working attach it ot a bug report.
|
![]() |
![]() |
![]() |
#3 |
Connoisseur
![]() Posts: 76
Karma: 10
Join Date: Feb 2022
Device: None
|
Example file uploaded. The paragraph iine-height has been set to 1.4 in the stylesheet but it makes no difference to the viewer's setting.
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,305
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works for me see attached screenshot, it even shows the effective line height in the inspector of 1.4
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() Posts: 76
Karma: 10
Join Date: Feb 2022
Device: None
|
I can't really tell from the image if the line-height is displaying correctly or not. All I know is that the Calibre Reader is stuck at a line height of 1.2.
By the way, Line height does display correctly in the Calibre Editor – vary it and it changes visually, as expected. But not in the Calibre reader. This does not affect the display on stand-alone devices, Kobo etc. |
![]() |
![]() |
![]() |
#6 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,641
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 76
Karma: 10
Join Date: Feb 2022
Device: None
|
Up to now the Reader hasn't displayed line-heights correctly. Now, for some reason, the problem has gone away.
So, issue closed. thanks. |
![]() |
![]() |
![]() |
#8 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,921
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
And also ebooks should never use line-height. The font metrics set a default and almost all ereaders let users vary line spacing.
A single line element, such as a title, subtitle, heading, Dinkus etc should use margins/padding to change space from other elements or the top of the page. |
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,641
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
When remove the line height from all eBooks, you can have the line height you want in the viewer by setting it to what you want.
|
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() Posts: 76
Karma: 10
Join Date: Feb 2022
Device: None
|
The reason for setting line-height in the stylesheet is that I'm using an old Kobo reader which doesn't allow you to vary the line-height.
Also I prefer different line-heights for blockquotes, paragraphs, footnotes, heaadings etc. |
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,641
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Have to tried setting the line height to something overly large to check that it's working?
|
![]() |
![]() |
![]() |
#12 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,921
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Use font sizes, margins and padding. The font face and font size will set a default relative line-spacing. Headings: biggest font-size, different face (often bold) Quotes: Slightly bigger font and/or different face body paragraphs: 1em = 12pt footnotes: slightly smaller, usually a sans-serif face EDIT: A paragraph after chapter start, heading or dinkus will be additional stlyes. A verse / lyric / poem / hymn etc (maybe a quote) will use three or five paragraph styles and each line is a paragraph: First paragraph at entire start (optional for extra space) First paragraph at start of a verse Body of verse Last paragraph of a verse Last paragraph at entire end (optional, for extra space) Last edited by Quoth; 03-17-2025 at 05:37 AM. |
|
![]() |
![]() |
![]() |
#13 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,641
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,921
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Fonts are not all the same size at 1em. Subscripts, superscripts and sometimes short footnotes / marginalia can be less than 1em. The real SMALL CAPS may actually be smaller than the regular text even when the same size, so if real SMALL CAPS they should be the same size as the paragraph they are in. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS line height vs Kobo line spacing slider? | bongoman | Kobo Reader | 2 | 07-12-2020 01:25 PM |
line height | Rellwood | Conversion | 3 | 04-07-2018 04:34 AM |
Aura H2O Line height setting is ignored | kAlvaro | Kobo Reader | 6 | 08-09-2016 07:59 AM |
optimal line height ? | cybmole | Sigil | 6 | 09-05-2013 09:30 AM |
Line height insanity! | Kamikuza | Conversion | 6 | 10-24-2012 11:56 PM |