Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2025, 04:02 AM   #1
paperback
Connoisseur
paperback began at the beginning.
 
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).
paperback is offline   Reply With Quote
Old 03-01-2025, 06:18 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is offline   Reply With Quote
Old 03-01-2025, 06:33 AM   #3
paperback
Connoisseur
paperback began at the beginning.
 
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.
Attached Files
File Type: epub Verne - In Search of the Castaways.epub (998.6 KB, 62 views)
paperback is offline   Reply With Quote
Old 03-01-2025, 06:40 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	88
Size:	941.9 KB
ID:	213993  
kovidgoyal is offline   Reply With Quote
Old 03-03-2025, 07:03 AM   #5
paperback
Connoisseur
paperback began at the beginning.
 
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.
paperback is offline   Reply With Quote
Old 03-03-2025, 07:26 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by paperback View Post
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.
Here is how you tell if the viewer is working or not. Edit the eBook to put in a large line height such as line-height: 4em;. Then you'll know if the viewer is respecting the line height in CSS.
JSWolf is offline   Reply With Quote
Old 03-03-2025, 08:01 AM   #7
paperback
Connoisseur
paperback began at the beginning.
 
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.
paperback is offline   Reply With Quote
Old 03-03-2025, 09:37 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
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.
Quoth is offline   Reply With Quote
Old 03-03-2025, 10:34 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by paperback View Post
Up to now the Reader hasn't displayed line-heights correctly. Now, for some reason, the problem has gone away.

So, issue closed. thanks.
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.
JSWolf is offline   Reply With Quote
Old 03-14-2025, 06:39 AM   #10
paperback
Connoisseur
paperback began at the beginning.
 
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.
paperback is offline   Reply With Quote
Old 03-14-2025, 07:16 AM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by paperback View Post
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.
Have to tried setting the line height to something overly large to check that it's working?
JSWolf is offline   Reply With Quote
Old 03-17-2025, 05:32 AM   #12
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,921
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by paperback View Post
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.
No, don't use line-height except for real websites, and even there there are minefields.

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.
Quoth is offline   Reply With Quote
Old 03-17-2025, 06:50 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by Quoth View Post
No, don't use line-height except for real websites, and even there there are minefields.

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)
1em also equals 16px. And don't make any of the fonts other then the copyright page and smallcaps smaller then 1em.
JSWolf is offline   Reply With Quote
Old 03-17-2025, 09:58 AM   #14
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,921
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by JSWolf View Post
1em also equals 16px. And don't make any of the fonts other then the copyright page and smallcaps smaller then 1em.
Oh, no. Never use px for margins, padding, font size etc, only for images. Also px doesn't always mean actual display pixels.

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.
Quoth is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 08:46 PM.


MobileRead.com is a privately owned, operated and funded community.