Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2020, 09:51 PM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
linespace for standing cap

I use a standing cap at the chapter beginning:

<p class="first"><span class="stand">T</span><span class="small">HE GLACIER WOUND AND TWISTED</span> between upthrust walls of naked stone.

p{margin:0;text-align:justify;}
.small{font-size:0.77778em;}
.stand{font-size:2.5em;font-style:italic;font-weight:bold;line-height: 1.2rem;}
.first{text-indent:0;margin-top:2em;}



Convert to AZW, on Kindle, it adds a space proportional to the cap size below the first line: see screen.
On ePub was the same, until I added "line-height: 1.2rem;". That fixed the linespacing in ePub, but was ignored in Kindle.

Is there a way to fix linespacing that works in Kindle?
Attached Thumbnails
Click image for larger version

Name:	screenshot_2020_12_22.png
Views:	252
Size:	11.4 KB
ID:	184182  

Last edited by AlanHK; 12-21-2020 at 09:57 PM.
AlanHK is offline   Reply With Quote
Old 12-24-2020, 01:59 AM   #2
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
I've just tested this code which seems to successfully get rid of that unwanted space:

<p class="first"><span class="stand">T</span><span class="small">HE GLACIER WOUND AND TWISTED</span> between upthrust walls of naked stone.</p>

p{margin:0;text-align:justify;}
.first{text-indent:0;margin-top:2em;}
.stand{font-style:italic;font-weight:bold;line-height:0;font-size:2.5em;padding:0;}
.small{font-size:0.7777em;}


For some reason, the line-height:0 in the stand class seems to remove the unwanted excess lower space. Since line-height:0 is not allowed, the epub will always automatically reset that line-height:0 value back to it's default line-height setting - which is normally 1.2 or 120%. Hence the unwanted space magically disappears. That's just a guess on my part by the way. But this fix seems to do the job of successfully getting rid of that unwanted space below when tested on both Adobe Digital Editions and Kindle Previewer. See attachments below.
Attached Thumbnails
Click image for larger version

Name:	KP_Snip.JPG
Views:	255
Size:	34.0 KB
ID:	184237   Click image for larger version

Name:	ADE_Snip.JPG
Views:	244
Size:	79.9 KB
ID:	184239  

Last edited by slowsmile; 12-24-2020 at 11:44 PM.
slowsmile is offline   Reply With Quote
Advert
Old 12-27-2020, 07:26 AM   #3
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by slowsmile View Post
I've just tested this code which seems to successfully get rid of that unwanted space
Thanks, but didn't work for me, using Previewer 2.92 and sideloading the resulting file to a PW3. Same extra spacing.

However, in the Previewer, it did work.
AlanHK is offline   Reply With Quote
Old 12-28-2020, 12:09 AM   #4
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by AlanHK View Post
Thanks, but didn't work for me, using Previewer 2.92 and sideloading the resulting file to a PW3. Same extra spacing.

However, in the Previewer, it did work.
Yup, took the words right out of my mouth. Looks good on KP3.x, but on a real device, you still have the space.

You know, it's doing what it ought. It's creating space for the descenders, that's all. I know it's frustrating, but...

Hitch
Hitch is offline   Reply With Quote
Old 12-28-2020, 03:25 AM   #5
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by Hitch View Post
You know, it's doing what it ought. It's creating space for the descenders,that's all. I know it's frustrating, but...
Kindle seems to ignore reduced linespacing styles in general.

You can get a dropcap to work fairly well using float and negative margins.
Any way to use something like that for standing caps?
AlanHK is offline   Reply With Quote
Advert
Old 12-28-2020, 05:38 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: 74,027
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
It's a bug (IMHO) in the Kindle rendering software. Amazon doesn't care that they have margins too wide and a line height too big. And for most people,this is not something they can fix or even know they can fix. The L/R margin is fairly easy to fix, but the line-height fix is something that's not easy to fix. It requires editing your chosen font's metrics.

Last edited by JSWolf; 12-28-2020 at 05:40 AM.
JSWolf is offline   Reply With Quote
Old 12-28-2020, 09:05 AM   #7
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: 6,498
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
There is a thread from 2014, KF8 and raised cap, where this issue was discussed. Several solutions were proposed but all had drawbacks.

I wouldn't worry about it as long as your book supports Enhanced Typesetting when published. The KFX renderer does a better job in this case. It only adds extra space between lines if the enlarged letter actually has a descender.
jhowell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
If Sigil is standing still.... mrmikel Sigil 1 09-23-2013 03:29 AM
Standing the Nook HD+ Using the O Ring charleslou Barnes & Noble NOOK 3 06-26-2013 10:24 PM
Long Standing Line Spacing Bug murg Kobo Reader 10 12-28-2012 07:22 PM
Standing out in the App Crowd kennyc Android Developer's Corner 0 03-23-2011 07:10 AM


All times are GMT -4. The time now is 12:26 AM.


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