12-21-2020, 09:51 PM | #1 |
Guru
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? Last edited by AlanHK; 12-21-2020 at 09:57 PM. |
12-24-2020, 01:59 AM | #2 |
Witchman
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. Last edited by slowsmile; 12-24-2020 at 11:44 PM. |
Advert | |
|
12-27-2020, 07:26 AM | #3 |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
|
12-28-2020, 12:09 AM | #4 | |
Bookmaker & Cat Slave
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:
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 |
|
12-28-2020, 03:25 AM | #5 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
You can get a dropcap to work fairly well using float and negative margins. Any way to use something like that for standing caps? |
|
Advert | |
|
12-28-2020, 05:38 AM | #6 |
Resident Curmudgeon
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. |
12-28-2020, 09:05 AM | #7 |
Grand Sorcerer
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. |
|
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 |