Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2022, 12:21 AM   #1
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Best practices for line height in 2022?

I found this 10 year old post but not much else giving opinions on setting line height in epubs.

I am mainly a Kindle user and that has allowed the user to set line height for a long time. However I see that in Calibre and ADE, this is not an option.

What is currently considered best practice for setting line height?
BKh is offline   Reply With Quote
Old 01-20-2022, 04:22 AM   #2
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,858
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Have NO line height setting in the CSS. Especially in body text. I have got this working automatically from wordprocessor by setting no linespaceing of any kind in a style and 0 on the two override entries on Calibre conversion.

Some bought books from Amazon have no line height and work well, others need the property removed. Calibre can remove it in all the CSS in the editor in one command, or you can look at each style.
Quoth is offline   Reply With Quote
Advert
Old 01-20-2022, 05:18 AM   #3
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,550
Karma: 145863177
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 BKh View Post
I found this 10 year old post but not much else giving opinions on setting line height in epubs.

I am mainly a Kindle user and that has allowed the user to set line height for a long time. However I see that in Calibre and ADE, this is not an option.

What is currently considered best practice for setting line height?
The best practice is to have no line height at all. It's not needed. All it does is get in the way.
JSWolf is online now   Reply With Quote
Old 01-20-2022, 08:22 AM   #4
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,059
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by BKh View Post
However I see that in Calibre and ADE, this is not an option.
You can adjust line height in the calibre viewer, but it requires some effort. Go to Preferences, Styles, and enter a new style in the box. Something like:

body {line-height: 2}


(Added: As others have written avoid setting a line height for the whole book in your EPUB.)

Last edited by jhowell; 01-20-2022 at 08:24 AM.
jhowell is offline   Reply With Quote
Old 01-20-2022, 08:37 AM   #5
ValTim
Junior Member
ValTim began at the beginning.
 
ValTim's Avatar
 
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
I was considering adding line-height for one of my paragraphs, because there are some words in a bigger font, and I can see an irregular space between lines in Apple Books. But maybe it does not make sense to add it just for a single style. It could make a bigger difference with the rest of body text. What do you think?
ValTim is offline   Reply With Quote
Advert
Old 01-20-2022, 09:14 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,550
Karma: 145863177
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 ValTim View Post
I was considering adding line-height for one of my paragraphs, because there are some words in a bigger font, and I can see an irregular space between lines in Apple Books. But maybe it does not make sense to add it just for a single style. It could make a bigger difference with the rest of body text. What do you think?
Is there a reason these words are in a larger size? Would it not be better to make these words stand out with say sans-serif and bold at the same font size as the rest of the text?
JSWolf is online now   Reply With Quote
Old 01-20-2022, 10:19 AM   #7
ValTim
Junior Member
ValTim began at the beginning.
 
ValTim's Avatar
 
Posts: 8
Karma: 10
Join Date: Jan 2022
Device: Kindle Paperwhite
These words are not in a larger size, but in uppercase, and the embedded font looks bigger than the default fonts.
ValTim is offline   Reply With Quote
Old 01-20-2022, 11:28 AM   #8
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,550
Karma: 145863177
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 ValTim View Post
These words are not in a larger size, but in uppercase, and the embedded font looks bigger than the default fonts.
Then there is no need to change the line height.
JSWolf is online now   Reply With Quote
Old 01-21-2022, 05:12 AM   #9
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Just to clarify, as there seems to be some misunderstanding, I'm talking about when designing a book from scratch. And specifically the paragraph font. The only reason I mentioned Calibre is because it is the viewer that the person making the ebook tested on.

Also, while I welcome opinions, if anyone can give me a solid reason why it's bad to set it, that would be great. Intuitively it makes sense not to touch it and just let the device handle it.

I have found this "starter kit" https://github.com/mattharrison/epub-css-starter-kit That uses 1.5em for line height.

Also on MobileRead's wiki here https://wiki.mobileread.com/wiki/CSS_template
it has 1.5em

As well, remember I'm asking about line height for basic paragraph text, not other fancy things. Perhaps new threads could be started if people have othe questions about line height.

Thanks!
BKh is offline   Reply With Quote
Old 01-21-2022, 05:17 AM   #10
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,550
Karma: 145863177
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 BKh View Post
Just to clarify, as there seems to be some misunderstanding, I'm talking about when designing a book from scratch. And specifically the paragraph font. The only reason I mentioned Calibre is because it is the viewer that the person making the ebook tested on.

Also, while I welcome opinions, if anyone can give me a solid reason why it's bad to set it, that would be great. Intuitively it makes sense not to touch it and just let the device handle it.

I have found this "starter kit" https://github.com/mattharrison/epub-css-starter-kit That uses 1.5em for line height.

Also on MobileRead's wiki here https://wiki.mobileread.com/wiki/CSS_template
it has 1.5em

As well, remember I'm asking about line height for basic paragraph text, not other fancy things. Perhaps new threads could be started if people have othe questions about line height.

Thanks!
Ignore the line height of 1.5em. That's way too large. And many people will hate you for it. You need to just forget line height exists in CSS. Don't use it. Let the user change the line height by changing the font or changing the line height (in devices/programs that allow this).
JSWolf is online now   Reply With Quote
Old 01-21-2022, 09:32 AM   #11
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,059
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by BKh View Post
Also, while I welcome opinions, if anyone can give me a solid reason why it's bad to set it, that would be great.
If you are making a book for others to read then it would be a poor reader experience to have your book render with a line height that differs from other books. As a reader I have set my devices to display using the font, font size, margins, and line spacing that work best for me. It is annoying when a publisher thinks they know better and tries to override my choices.
jhowell is offline   Reply With Quote
Old 01-21-2022, 09:33 AM   #12
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
(in devices/programs that allow this).
Personally I agree with you. But what's the answer I give when I'm asked what about those devices that don't allow it?
BKh is offline   Reply With Quote
Old 01-21-2022, 09:40 AM   #13
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If you embed a font for the main text, it's probably a good idea to define a line-height for it too, especially if the font has "weird" metrics.

But for the reasons already discussed, it's already a bad idea to embed a main text font, and therefore to set a line-height.
Jellby is offline   Reply With Quote
Old 01-21-2022, 01:08 PM   #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,858
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by BKh View Post
Personally I agree with you. But what's the answer I give when I'm asked what about those devices that don't allow it?
If there is no line-height property there will be a default set by the rendering software based on the font metrics.
On most ereaders and ereader apps you can change the line-height if it's not set in CSS. If it is set, then usually the user can't change it and the results may be poor if the user changes the font on the ereader or size of font. So that's why there is no need to set line-height ANYWHERE in CSS, a most of all not in the body style. I've used about 7 makes of eink reader, tested programs and apps, have 3 models of Kindle (tested 3 other models) and have had 2 Sony models of different eras and have had 4 different Kobo (still have 3). What works best on everything is having no line-height, it's for web pages because it's not normally a user setting on a browser.

Not all CSS that actually works on ereaders makes sense. Some of it may only make sense in niche styles, not First or Default Paragraphs of body text.
Quoth is offline   Reply With Quote
Old 01-21-2022, 09:18 PM   #15
BKh
Zealot
BKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheeseBKh can extract oil from cheese
 
BKh's Avatar
 
Posts: 107
Karma: 1000
Join Date: Mar 2011
Device: Kindle
Quote:
Originally Posted by Quoth View Post
If there is no line-height property there will be a default set by the rendering software based on the font metrics.
Ah, that makes sense.

Thanks!
BKh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kepub Line-Height lordeagle Kobo Reader 4 03-30-2021 02:46 PM
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


All times are GMT -4. The time now is 03:41 PM.


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