Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2022, 01:01 PM   #31
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,892
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Well formatted ebooks do not have a line-height property at all. The default is set by font metrics of selected font and if you set it in CSS, then it breaks almost all ereaders.

Only PDFs (and thus for POD or other publishing, or fixed layout for tablets) should have a line-height. Leave it undefined in Wordprocessor style and then conversion from docx to epub has no line-height in CSS. Amazon uses epub source to make mobi, azw3 and kfx.

The CSS line-height and many other valid CSS only make sense on web pages, not ebooks!
Quoth is offline   Reply With Quote
Old 09-01-2022, 01:30 PM   #32
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,616
Karma: 145864263
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
Well formatted ebooks do not have a line-height property at all. The default is set by font metrics of selected font and if you set it in CSS, then it breaks almost all ereaders.

Only PDFs (and thus for POD or other publishing, or fixed layout for tablets) should have a line-height. Leave it undefined in Wordprocessor style and then conversion from docx to epub has no line-height in CSS. Amazon uses epub source to make mobi, azw3 and kfx.

The CSS line-height and many other valid CSS only make sense on web pages, not ebooks!
Do you also agree that there should be no margins set and let the program/device being used handle them?
JSWolf is offline   Reply With Quote
Advert
Old 09-01-2022, 01:52 PM   #33
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
Well formatted ebooks do not have a line-height property at all. The default is set by font metrics of selected font and if you set it in CSS, then it breaks almost all ereaders.
Where do you get the information that line-height is set by font metrics? If that is so, then all i can say is that it doesn't work very well.

If I could achieve what I want by not setting line-height and page margin, then I would do that. The fact that I can't I regard as also broken.
bookman156 is offline   Reply With Quote
Old 09-01-2022, 02:04 PM   #34
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,892
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by bookman156 View Post
Where do you get the information that line-height is set by font metrics? If that is so, then all i can say is that it doesn't work very well.

If I could achieve what I want by not setting line-height and page margin, then I would do that. The fact that I can't I regard as also broken.
What on earth are you using to read / test ebooks?
Overall page margin has an app or ereader default (too large offset added in Kindle, so 0 is best). The line height has an app or ereader default.

I hope you are not making a Print Replica ebook. They are a disaster.

In just about every sane app & ereader (but note Kindle adds about 50 px to base L & R setting) the defaults work, but the user, the person reading, can set them. But certainly can't adjust line height if it's in the CSS on many readers.

Of course the font face (metrics) and font size set a default line height on any sensible renderer so as descenders don't touch tallest item on line below.
Quoth is offline   Reply With Quote
Old 09-01-2022, 02:11 PM   #35
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,892
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
Do you also agree that there should be no margins set and let the program/device being used handle them?
No overall page margins. Or 0.
Only additional margins or indents from that for lists, quotations, letters, telegrams, first line of a not-first-paragraph, epigrams, marginalia, preambles etc. Maybe some not-centered-headings (but rare).

Except if editing a Kindle ebook for personal consumption. Then I might be tempted to L & R -45px !

Padding top only used after forced pagebreak, like a chapter heading.
no margins between ordinary paragraphs.
Quoth is offline   Reply With Quote
Advert
Old 09-01-2022, 02:15 PM   #36
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
The line height has an app or ereader default.
I realise that. You said it was determined by the metrics of the font selected. I was querying that statement. I guess now you were referring to the fonts on the device, as opposed to embedded fonts.

As for page margin, I find it odd anyone should complain that 0.5em is breaking the device. A complaint that I am preventing someone adding 0.1 em less margin is odd indeed. Have you never seen an epub open with zero margin because using the epub's CSS value? Then you force the reader to fiddle with margin settings.
bookman156 is offline   Reply With Quote
Old 09-01-2022, 02:28 PM   #37
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
Of course the font face (metrics) and font size set a default line height on any sensible renderer so as descenders don't touch tallest item on line below.
My concern for the typographical presentation goes a bit beyond whether ascenders and descenders touch. I am one of those mad people who believe in leading, since I added enough of it in sheet lead metal when setting letterpress books to come to believe that too much and too little are either side of just right.

Kindles are little better than a typewriter with single and double spacing, 1.5 if it's a good typewriter. I'm not trying to impress any leading decisions on a Kindle because it ignores them. But if a reader shows merit and finesse, like PocketBook Reader on Android, then why not cater for it with some CSS that is better than it can achieve on its own? It's not 'breaking' Kindles, and some other reader is hardly rendered completely useless by my decision.

But if line-height is little more than a choice between too tight and too spaced for you, then I can understand you not setting it and relying on the device to perhaps come up with something just bearable.
bookman156 is offline   Reply With Quote
Old 09-01-2022, 04:19 PM   #38
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,794
Karma: 168959602
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bookman156 View Post
I realise that. You said it was determined by the metrics of the font selected. I was querying that statement. I guess now you were referring to the fonts on the device, as opposed to embedded fonts.

As for page margin, I find it odd anyone should complain that 0.5em is breaking the device. A complaint that I am preventing someone adding 0.1 em less margin is odd indeed. Have you never seen an epub open with zero margin because using the epub's CSS value? Then you force the reader to fiddle with margin settings.
My standard when editing an ebook is to set the default margins to 0,0,0,0 which allows the reader to choose the margins. Basically set it once and forget it. Much like when you have the default font size set to 1em.

As for the metrics of the fonts? Some fonts have a larger intrinsic line height than others. You can notice this when you leave the line height alone and notice that changing the display font also changes the white space between lines. You might want to check Deep dive CSS: font metrics, line-height and vertical-align for some visual examples using various fonts.
DNSB is offline   Reply With Quote
Old 09-01-2022, 04:34 PM   #39
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
My standard when editing an ebook is to set the default margins to 0,0,0,0 which allows the reader to choose the margins.
Setting it at 0.5em also allows the reader to choose the margins, so long as they don't want less, apparently. To me it's just adding a polite starting point. I can't understand anyone wanting less than 0.5em. It's just a slight margin to avoid any possibility of starting with zero margin.

On a web-page that is to be viewed on a smartphone 0.8em is pretty normal, sometimes more.
bookman156 is offline   Reply With Quote
Old 09-01-2022, 06:33 PM   #40
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,616
Karma: 145864263
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 bookman156 View Post
I realise that. You said it was determined by the metrics of the font selected. I was querying that statement. I guess now you were referring to the fonts on the device, as opposed to embedded fonts.

As for page margin, I find it odd anyone should complain that 0.5em is breaking the device. A complaint that I am preventing someone adding 0.1 em less margin is odd indeed. Have you never seen an epub open with zero margin because using the epub's CSS value? Then you force the reader to fiddle with margin settings.
Yes, I have seen an ePub open with 0 margin. And by having a 0 margin, I can set the margin to what I want, not what you want. I have my Kobo set how I like it. Your .5em margin would break that.
JSWolf is offline   Reply With Quote
Old 09-01-2022, 06:58 PM   #41
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,616
Karma: 145864263
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 bookman156 View Post
Setting it at 0.5em also allows the reader to choose the margins, so long as they don't want less, apparently. To me it's just adding a polite starting point. I can't understand anyone wanting less than 0.5em. It's just a slight margin to avoid any possibility of starting with zero margin.
You may be starting to get it. 0.5em is no good because the reader cannot set less if that's what's wanted. I want less then 0.5em. So that's going to be no good. I do want a margin, but not that big. See, you cannot decide what the user wants or not for things that the user may be able to change. Some programs will completely override the margins and some will just letr you add more to the margin starting with the values in the CSS. So don't set your L/R margin to 0.
JSWolf is offline   Reply With Quote
Old 09-01-2022, 07:22 PM   #42
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
I do want a margin, but not that big.
A 0.5em margin really isn't that big. You must hate reading websites on a phone as you can do nothing about the margin, which will most likely be at least 0.8em.

What do you like for your margin then? Don't tell me 0.45em...
bookman156 is offline   Reply With Quote
Old 09-01-2022, 08:56 PM   #43
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Quote:
Originally Posted by bookman156 View Post
A 0.5em margin really isn't that big. You must hate reading websites on a phone as you can do nothing about the margin, which will most likely be at least 0.8em.

What do you like for your margin then? Don't tell me 0.45em...
In my case, my margins in the books are set to 0:
Code:
body, html {
/* Basic Styling for HTML and BODY Sections of a File */
	border-width:	0;
	height:	100%;
	margin:	0;
	orphans:	1;
	padding:	0;
	widows:	1;
}
On my Kobo, itself, I've got the margin setting all the way down to 0. The text in the book is pretty close to the edges of the screen (maybe 1/8"). Eye-balling it, I'd say that's almost 1em (at the usual font size I've got the Kobo set to use) of margin that the device is already adding to the book. Changing the font size doesn't change that margin: it's either a hardware constraint or it's built into the device firmware somewhere where I can't get to it.
enuddleyarbl is offline   Reply With Quote
Old 09-01-2022, 09:30 PM   #44
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
On my Kobo, itself, I've got the margin setting all the way down to 0. The text in the book is pretty close to the edges of the screen (maybe 1/8"). Eye-balling it, I'd say that's almost 1em (at the usual font size I've got the Kobo set to use) of margin that the device is already adding to the book.
You mean your Kobo has an approximately 1em margin even when it's set at zero? Does that change if you set margin to 0.5em in the CSS or does it remain the same?
bookman156 is offline   Reply With Quote
Old 09-02-2022, 03:37 AM   #45
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,616
Karma: 145864263
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 bookman156 View Post
A 0.5em margin really isn't that big. You must hate reading websites on a phone as you can do nothing about the margin, which will most likely be at least 0.8em.

What do you like for your margin then? Don't tell me 0.45em...
The main issue is that you take away the reader's choice by imposing a 5.em margin.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top-margin (bottom-margin?) for Kobo? Notjohn Sigil 14 02-28-2015 06:43 AM
CSS: margin-top and margin Leonatus ePub 16 06-16-2014 04:29 AM
CSS margin instead of margin-top, etc. icallaci Conversion 24 10-19-2013 09:52 AM
New conversion questions: Getting rid of huge left margin Epub to Mobi geekgeek Calibre 2 08-31-2010 11:00 PM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM


All times are GMT -4. The time now is 04:58 PM.


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