Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2019, 07:56 AM   #1
HHJT
Member
HHJT began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2018
Device: Kobo Glo
Letter-spacing issue

Hi,

Posted this on the Kobo forum yesterday.

When I give extra letter-spacing the space between letters gets larger, but the space between two words disapears, creating:

C H A P T E R O N E

Code:
<h1><span class="spacing">CHAPTER ONE</span></h1>

span.spacing {letter-spacing:5px}
I’ve tried span.spacing {letter-spacing:.25em} or including the spacing in the tag itself. Didn’t work.

Only my Kobo Glo does this, by the way. iBook and Calibre no problems...
HHJT is offline   Reply With Quote
Old 08-24-2019, 09:07 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
A quick test here and the letter spacing works with kepubs, but not epubs. Different renderers are used for the two formats. The Adobe RMSDK is used for epubs. It probably means all other ereaders or apps that use it won't use it. ADE v2.0.1 doesn't use it, which is consistent with the RMSDK.
davidfor is offline   Reply With Quote
Old 08-24-2019, 09:47 AM   #3
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,094
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
Could you use a fall-back with greater word-spacing?
Turtle91 is offline   Reply With Quote
Old 08-24-2019, 10:03 AM   #4
HHJT
Member
HHJT began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2018
Device: Kobo Glo
Thanx for replying.

The document was made in OO writer, and converted to epub with writer2xhtml. In Sigil I make last minute replacement when needed. I check my epubs with iBooks and ADE. You’re right: ADE doesn’t recognize letter-spacing. But Ibooks does and so does the Calibre ebook viewer. I use Calibre to upload te pub to my Kobo Glo. I do not use ADE.

I know letter-spacing works on kepub. I can see the spacing between letters. The spacebars are discarded some how.
HHJT is offline   Reply With Quote
Old 08-24-2019, 10:31 AM   #5
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,094
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
Multiple normal spaces are condensed into 1 space on all renderers that I'm aware of - and any whitespace between paragraph tags is ignored.
You would need to use letter-spacing and/or word-spacing in your CSS to adjust the distance.
If your renderer does not support that CSS you can use some work-arounds like adding non-breaking-spaces (&nbsp; or & #160; ).

for example:
Hello (no spaces)
H e l l o (single space)
H& #160; e& #160; l& #160; l& #160;* o (non-breaking space PLUS single space)
H&nbsp;&nbsp;&nbsp;e&nbsp;&nbsp;&nbsp;l&nbsp;&nbsp ;&nbsp;l&nbsp;&nbsp;&nbsp;o (multiple non-breaking-spaces)

edit: don't put a space between the &#...I couldn't keep the forum from converting it to an actual space even when I tried using noparse.


Of course, you could also get a different font that has larger space between the letters... but that's going a bit too far, don't you think?

Last edited by Turtle91; 08-24-2019 at 11:56 AM.
Turtle91 is offline   Reply With Quote
Old 08-24-2019, 04:43 PM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by HHJT View Post
Hi,

Posted this on the Kobo forum yesterday.

When I give extra letter-spacing the space between letters gets larger, but the space between two words disapears, creating:

C H A P T E R O N E

Code:
<h1><span class="spacing">CHAPTER ONE</span></h1>

span.spacing {letter-spacing:5px}
I’ve tried span.spacing {letter-spacing:.25em} or including the spacing in the tag itself. Didn’t work.

Only my Kobo Glo does this, by the way. iBook and Calibre no problems...
On WebKit render engines, works fine. But as workaround, try using also the property "word-spacing". For example;

Code:
span.spacing {
    letter-spacing: 5px;
    word-spacing: 10px;
}
But of course, ADE (under epub2) doesn't support those properties so you'll be forced to use "&nbsp;" to simulate separations.
RbnJrg is offline   Reply With Quote
Old 08-24-2019, 04:50 PM   #7
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by Turtle91 View Post
edit: don't put a space between the &#...I couldn't keep the forum from converting it to an actual space even when I tried using noparse.
Put the noparse only around the & and # with the number right after the /noparse, &#160. Now if I could only remember the word noparse on the rare cases when I need to use it.
lumpynose is offline   Reply With Quote
Old 08-24-2019, 07:12 PM   #8
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,094
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
Quote:
Originally Posted by lumpynose View Post
Put the noparse only around the & and # with the number right after the /noparse, &#160. Now if I could only remember the word noparse on the rare cases when I need to use it.
Ahh, thanks! I wouldn't have figured that out!!
Turtle91 is offline   Reply With Quote
Old 08-24-2019, 09:34 PM   #9
lumpynose
Wizard
lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.lumpynose ought to be getting tired of karma fortunes by now.
 
Posts: 1,086
Karma: 6719822
Join Date: Jul 2012
Device: Palm Pilot M105
Quote:
Originally Posted by Turtle91 View Post
Ahh, thanks! I wouldn't have figured that out!!
Yeah, me neither. I forget who here did it but I saw it when I quoted their message. That was also when I learned about the noparse tag.
lumpynose is offline   Reply With Quote
Old 08-26-2019, 09:40 AM   #10
HHJT
Member
HHJT began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2018
Device: Kobo Glo
Quote:
Originally Posted by RbnJrg View Post
On WebKit render engines, works fine. But as workaround, try using also the property "word-spacing". For example;

Code:
span.spacing {
    letter-spacing: 5px;
    word-spacing: 10px;
}
But of course, ADE (under epub2) doesn't support those properties so you'll be forced to use "&nbsp;" to simulate separations.
That solved my problem!
HHJT is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
About Word, letter-spacing and EPUB roger64 ePub 58 04-27-2017 11:28 AM
EPUB to PDF odd letter spacing Books987 Conversion 5 01-27-2015 05:21 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 02:29 PM.


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