Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-24-2020, 03:03 PM   #1
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Letter-spacing

Is there a way to make letter-spacing work in epub?
kamanza is offline   Reply With Quote
Old 05-24-2020, 03:25 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by kamanza View Post
Is there a way to make letter-spacing work in epub?
Yes, just use the letter-spacing CSS.

But why do you want to use it?

I would strongly recommend against using it though, since readers of ebooks can use many different fonts/font-sizes, and it will most likely cause letters to clash into each other.
Tex2002ans is offline   Reply With Quote
Advert
Old 05-24-2020, 04:03 PM   #3
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Quote:
Originally Posted by Tex2002ans View Post
But why do you want to use it?
I only want to sometimes use it for headings. It works in Sigil and in Calibre viewer, but does not in ADE.
Apparently, I'll just have to insert spaces manually.

Last edited by kamanza; 05-24-2020 at 04:06 PM.
kamanza is offline   Reply With Quote
Old 05-24-2020, 04:08 PM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by kamanza View Post
It works in Sigil, but does not in ADE.
I don't believe letter-spacing works in RMSDK (EPUB2), but it might work in EPUB3... but again, I strongly recommend against using it.

Quote:
Originally Posted by kamanza View Post
Apparently, I'll just have to insert spaces manually.
Why not just leave the text as it is?

Code:
<h2>CHAPTER 1</h2>
Trying to insert forced spaces:

Code:
<h2>C H A P T E R 1</h2>
will just cause many more issues (especially Text-to-Speech). Also see the "Accessibility Concerns" heading in the MDN link above.
Tex2002ans is offline   Reply With Quote
Old 05-24-2020, 04:20 PM   #5
kamanza
Zealot
kamanza began at the beginning.
 
Posts: 115
Karma: 10
Join Date: Jan 2011
Device: none
Thanks for replying.
I'm not formatting books for publication, I'm only prettifying them for myself & for a couple of friends, so I don't have to worry about Text-to-Speech, etc. And i like the way C H A P T E R 1 looks.
kamanza is offline   Reply With Quote
Advert
Old 05-25-2020, 09:54 AM   #6
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
If it's just for you/friends and your devices support letter-spacing css, then it's easiest to just use that.
Turtle91 is offline   Reply With Quote
Old 01-13-2022, 02:10 PM   #7
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
A solution would be to customise the font (change the tracking eg in FontForge / Metrics / Set both side bearings), but this implies the reading software/hardware would read and apply the correct tracking from the font (might be needed to be exported as old style for some software to work), and of course to be able to sideload them.
Ghitulescu is offline   Reply With Quote
Old 01-15-2022, 07:14 AM   #8
Moonbase59
Zealot
Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.
 
Moonbase59's Avatar
 
Posts: 111
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8"
My advice: If you really have to use letter-spacing (I know some old German texts that would require it),
  • do use the CSS property instead of, say, non-breaking spaces or the like.
  • only use relative units (like ex, em, etc.) instead of fixed units (like px).

This should at least help to avoid odd justification, searching, TTS and accessibility problems.

The letter-spacing property has been there since CSS1 (and SVG 1.1) and received a rather good reception, although it’s officially still a "recommendation", see caniuse.com. Thus, some e-readers might not have implemented it.

And of course never use it on scripts like Arabic, where some letters must stay connected.

Last edited by Moonbase59; 01-15-2022 at 07:21 AM.
Moonbase59 is offline   Reply With Quote
Old 01-15-2022, 10:20 AM   #9
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Moonbase59 View Post
If you really have to use letter-spacing (I know some old German texts that would require it)
You only need to use this property if you want to faithfully reproduce the look of old German blackletter books.

Quote:
Originally Posted by Moonbase59 View Post
And of course never use it on scripts like Arabic, where some letters must stay connected.
Actually, only six of the 28 letters don't have a distinct medial form. Besides, Arabs wouldn't use letter spacing for emphasis, because they have a special letter for lengthening words (tatweel), which looks like a hyphen.

Without tatweel: تطويل
With tatweel: تـطـويـل
Doitsu is offline   Reply With Quote
Old 01-15-2022, 10:46 AM   #10
Moonbase59
Zealot
Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.
 
Moonbase59's Avatar
 
Posts: 111
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8"
I see there is lots of knowledge here in this forum. Fantastic, I like that.

Quote:
Originally Posted by Doitsu View Post
You only need to use this property if you want to faithfully reproduce the look of old German blackletter books.
Guess what I’m just playing with… ;-) Fortunately, we nowadays have (OpenType) technology that allows stuff like switching between blackletter and Antiqua views, embedding typesetting rules, and correct searching. (I love Ulrich Zeidler’s LOV fonts, check out ligafaktur.de.) Another use might be reproducing spaced text written on a typewriter (when we still had manual typewriters) and keeping searchability intact.


Quote:
Originally Posted by Doitsu View Post
Actually, only six of the 28 letters don't have a distinct medial form. Besides, Arabs wouldn't use letter spacing for emphasis, because they have a special letter for lengthening words (tatweel), which looks like a hyphen.

Without tatweel: تطويل
With tatweel: تـطـويـل
A real interesting excursus into Arabic, appreciated!
Moonbase59 is offline   Reply With Quote
Old 01-15-2022, 11:26 AM   #11
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Check http://unifraktur.sourceforge.net/letterspacing.html too, if you don't know it.
Jellby is offline   Reply With Quote
Old 01-15-2022, 01:29 PM   #12
Moonbase59
Zealot
Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.Moonbase59 can program the VCR without an owner's manual.
 
Moonbase59's Avatar
 
Posts: 111
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8"
Quote:
Originally Posted by Jellby View Post
Cheers for the reminder, totally forgot about that page. Playing around, I promptly found a bug (I suppose it is with the LOV fonts, but not 100% sure): The "automatic" doesn’t cope with spacing correctly (check marked words, correct typesetting in parenthesis).

Tested this using Calibre Reader 5.34, Thorium 1.8.0, Foliate 2.6.4.

Test EPUB included, just in case someone wants to try. (Needs "publisher’s settings" or at least "publisher font" to render correctly.) See also my post in the E-Reader Forum (German).
Attached Thumbnails
Click image for larger version

Name:	Thorium - Test Fraktur_001.png
Views:	119
Size:	124.2 KB
ID:	191613  
Attached Files
File Type: epub Hormann, Matthias - Test Fraktur (101).epub (360.3 KB, 89 views)

Last edited by Moonbase59; 01-15-2022 at 03:33 PM.
Moonbase59 is offline   Reply With Quote
Old 02-03-2022, 05:45 AM   #13
Ghitulescu
Fanatic
Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.Ghitulescu ought to be getting tired of karma fortunes by now.
 
Posts: 563
Karma: 403106
Join Date: Aug 2014
Device: PRS-T1
So, what is the solution to use in an ePub2.01 if one needs to replicate an old fraktur text?
These use spacing as emphasis and (rarely) bold. There are extremely few (fraktur, blackletters) that have more than one weight.

EDIT: I mean, letter spacing is not mandatory for epub, and all examples I have found so far are actually for html/internet.
Ghitulescu is offline   Reply With Quote
Old 02-03-2022, 12:17 PM   #14
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Ghitulescu View Post
So, what is the solution to use in an ePub2.01 if one needs to replicate an old fraktur text?
I used &nbsp; for ADE 2.0.1 and letter-spacing: 0.25em; for all other readers.
For an example, see this book.
Doitsu is offline   Reply With Quote
Old 02-03-2022, 01:33 PM   #15
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: 74,033
Karma: 129333114
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 Doitsu View Post
I used &nbsp; for ADE 2.0.1 and letter-spacing: 0.25em; for all other readers.
For an example, see this book.
If you want, you can also use &thinsp; (thin space) instead of a full space.
JSWolf is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Letter-spacing issue HHJT ePub 9 08-26-2019 09:40 AM
About Word, letter-spacing and EPUB roger64 ePub 58 04-27-2017 11:28 AM
letter spacing errors JeremyBenson Kindle Formats 24 02-20-2013 07:04 PM
'letter-spacing' in Mobi hkdorama Kindle Formats 4 07-26-2010 06:35 AM


All times are GMT -4. The time now is 05:35 AM.


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