![]() |
#1 |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
How to Use Justification Properly?
Since devices are getting higher and higher in resolution and software is getting better and better at hyphenation, so in my opinion it makes sense to consider justification for the main text. I've also seen that RbnJrg uses justification by default, and who am I to question that.
Nevertheless, I would like to know what you generally think about this and whether it would make sense to leave low-resolution devices left-aligned and if so, at which value the breakpoint is usually set nowadays (I personally tend to 768px). |
![]() |
![]() |
![]() |
#2 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
Ergo: low resolution -> less words per line -> ugly word-spacing on justification |
|
![]() |
![]() |
![]() |
#4 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
How to Use Justification Properly? Don't.
Don't specify justification or lack of it, except where necessary (e.g. poetry and long titles are probably better not justified). Let the user set the default in their reading device/application, as with font size, margins, line spacing, etc. If the software is broken and doesn't allow it, too bad for them, don't break it for users with proper readers. |
![]() |
![]() |
![]() |
#5 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
But if that's the common way to go I will consider removing my 1em body margin as well... |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Every device I have has its internal Defaults (some also have user settings)
So there is no need to spec base Line spacing. Margins or Blockquotes. Those should be specific overrides, where you want more or less than you get without the specific setting. Places I force a large line space: Signs that may wrap to 2 lines and you want them further apart. Danger<br />
High Voltage |
![]() |
![]() |
![]() |
#7 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,033
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Quote:
Left & right margins can only be set larger, not smaller. If line-height is set at all, then the user can't change it at all. The Font metrics automatically set a line-height, which the user can override. The first top margin on a first new page (caused by file change) may be stripped, thus padding-top is better for something at the start of a file (normally one per chapter or similar division) and likely any bottom margin at the end of a file is stripped. But it depends on the app or ereader. Blockquotes are a throwback to HTML3. They might be semantically appropriate for an actual quote, but for stanzas, preambles, quoted letters and many things simply an appropriate CSS for <p class="something-more-indented"> is better. Similarly automatic lists are tricky in HTML and are better as a paragraph style with inverted margins and manually entered indexes, which allows a gap and restarting at next number, whereas the auto HTML list in an ebook can usually only start at 1st index. |
|
![]() |
![]() |
![]() |
#10 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<body> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </body> Quote:
PS. I'm guilty myself of specifying "p { margin:0; text-indent: Xem; }", but that's mostly so I can get something readable in a browser. |
||
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
But I'm going to defend my position. And I'm going to do so based on what's happening with Google Play Books and PocketBook ereaders (which I've seen from your comments that you use). The following is a screenshot of an epub opened with GPB styled with my .css styles: What happens when I select from the GPB menu text-align to left? The following: As you can see, GPB aligns to the left ALL THE TEXT, not only the text in <p> tags but also text in <h*> tags. And what happens if I select justified text? The following: The text in <h*> tags remains aligned to the left. Now imagine the disaster that would occur if proper alignment weren't included, with paragraphs that should be aligned to the right or center? If you let users set the alignment, they won't get the best reading experience. By adding your own style, you give them a point of comparison between what they can get on their own and what the book can provide by default. And the same thing happens in PB. The following screenshot is from another chapter in the same book, with the default styles: Now, PB is smarter than GPB and doesn't allow you to change the alignment unless the user disables the styles built into the .css file. What happens if you disable those styles and set the alignment to left? Well, this is it: Compare the reading experience with built-in styles and what users can achieve by disabling them. One more thing: all my epubs are epub3 with fallback code for epub2. And all my epubs have hyphenation, regardless of whether the e-reader has that feature or not. This is because my epubs have "Hyphenator" built in, a JavaScript program that hyphenates words where necessary. If the e-reader has hyphenation, then Hyphenator doesn't run; if not, it does. And finally, if the default alignment for <p> elements is justified or left-aligned, you have to consider the language. English is a language of short words, so even without hyphenation, justified text looks good (see the first screenshot, which belongs to GPB, with justified text and no hyphens—I should clarify that there are no hyphens there because GPB is an epub2 reader and doesn't support JS). On the other hand, German is a language of long words, and there, even with hyphens, you have to carefully analyze whether justified or left alignment is appropriate. The behavior of GPB and PB is practically shared by most e-readers, so if users choose left-aligned text, they have to be prepared for the entire book, not just the body text, to have that alignment (imagine text that should be right-aligned with the opposite alignment; a real disaster). And regarding font size, you might want to read the following articles: https://www.w3schools.com/css/css_font_size.asp https://developer.mozilla.org/en-US/.../CSS/font-size https://developer.mozilla.org/en-US/...nt-size-adjust Last edited by RbnJrg; 07-15-2025 at 09:08 PM. |
|
![]() |
![]() |
![]() |
#12 | |
Connoisseur
![]() Posts: 61
Karma: 10
Join Date: May 2025
Device: iPad
|
Quote:
As a software developer I've had this to learn as well, namely that users just take what they get and as a last ressort, at a point where they get really bothered by something, they seek for a solution. So give them a best possible base point, since even if they could get a better experience manually, most of them never will. But I'll get it with line-height, in contrast to websites it seems better to not set them for ebooks. And the overall margin 0 for the body element hat no effect on the readers I've tested (except Sigil's inbuilt reader, which has no presettings at all). @RbnJrg Is there a way I could get one of your ebooks or CSS to study you approaches? You seem to have great experience, and only looking at the screenshots you provided here I have multiple followup questions^^. But if your'e not comfortable don't bother, I've already learned at lot from you and say thanks for all that valuable information. |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,766
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
![]() |
#14 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 521
Karma: 8500000
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
|
Quote:
For that reason, I format the text with what I would like users to see if they have no choice. In other words, there is no way to please every user if they all use devices that don't allow changing justification, so picking one is no worse than not picking one (somebody will be upset regardless of your choice). |
|
![]() |
![]() |
![]() |
#15 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Most people prefer justified. So go with that. They can change it either in the CSS or in the options if there is such.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Troubleshooting Justification | sillypoint | Amazon Kindle | 10 | 03-21-2013 11:09 PM |
PRS-T1 Justification | treadlightly | Sony Reader | 4 | 12-14-2011 01:21 PM |
PRS-T1 Justification | Hatgirl | Sony Reader | 5 | 11-17-2011 09:59 AM |
Justification | Georgiegirl2012 | General Discussions | 21 | 09-27-2010 09:38 AM |
DX justification | jlinden | Amazon Kindle | 7 | 01-18-2010 07:22 AM |