11-17-2015, 03:29 AM | #1 |
Connoisseur
Posts: 80
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
|
Raised capital modifies line height
I've created an epub with a dropcap on the same baseline as the first line of text:
No problem with the epub, but when i convert it to mobi (with kindlegen) or AZW3 (with Calibre), the second line distance from the first became too large: How can I fix the situation? This is the style used: PHP Code:
PHP Code:
|
11-17-2015, 07:37 AM | #2 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...51&postcount=9 Regards |
|
Advert | |
|
11-17-2015, 07:45 AM | #3 |
Connoisseur
Posts: 80
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
|
|
11-17-2015, 08:55 AM | #4 |
Connoisseur
Posts: 80
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
|
It works great!
Thank you! |
11-17-2015, 11:40 AM | #5 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
Advert | |
|
11-17-2015, 11:52 PM | #6 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Using a custom SVG block per letter is probably overkill.
What you're seeing is that on some Kindle devices, you cannot set the line height to less than 1.2x the font size, because Kindle's interpretation of CSS is deliberately brain damaged by design. However, assuming your descenders aren't too tall, you should be able to achieve the same effect by leaving the line height set to 1.2em and using negative bottom margins with overflow-y: hidden. |
11-18-2015, 04:11 AM | #7 | |
Connoisseur
Posts: 80
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
|
Quote:
PHP Code:
SVG solves it, but it could be a long work (I used 3 svg for a «…Y ) |
|
11-18-2015, 11:44 AM | #8 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
11-18-2015, 12:06 PM | #9 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
1. In the .xhtml file: Code:
<p><span class="raised">L</span>orem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula. Praesent orci dui, pulvinar id convallis a, faucibus non mauris.</p> Code:
p { text-align: justify; } .raised { float: left; display: table-cell; font-size: 3em; font-weight: bold; margin: -0.75em 10px -0.5em 0; } Regards |
|
11-18-2015, 04:32 PM | #10 | |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
|
|
11-18-2015, 05:38 PM | #11 |
Resident Curmudgeon
Posts: 73,984
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But the problem with the Kindles is that if there are embedded fonts, the default is for Publisher Default to be turned off. Amazon should change this so if there are embedded fonts, Publisher Default is on. The only thing you can do is put in a page saying there are embedded fonts and to set the fonts to Publisher Default.
|
11-19-2015, 05:27 AM | #12 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
About two years ago I spent a lot of time to find a method that worked with any model of Kindle. Even with a custom font, you can't get the perfect bottom alignment for all models (you can see the raised cap perfectly in e-ink devices but not in Fire models and viceversa ); the only way I found is to use an image. And in this case, the best kind of image is a svg. Of course, if we were working on epub, all this is not necessary since in epub we can control line-height (and as you well know, in Kindle we can't set a line-height lower than 1.2em). Regards |
|
11-20-2015, 06:33 AM | #13 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I thought drop-caps were a splendid idea, until Amazon exploded the notion when they changed the line spacing default and I had to go back and remove them from several books. Very irritating.
Not only do I not use them now, but I notice that the same is true of a majority (if not most) books from mainstream publishers. Self-pubbers on the KDP forums are forever arguing that e-books are different so shouldn't be held to traditional book-making standards -- for example, that e-books should be "left justified," oxymoronic as that may be. But they may have a point in the case of drop-caps. They may be vanishing now, just as the punctuation mark before or after the em dash vanished a century ago. |
11-20-2015, 08:09 AM | #14 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Can we be clear about whether we're talking about drop caps or raised caps? The thread title says "Dropcap", but most of the discussion actually seems to have been about raised caps!
|
11-20-2015, 11:20 AM | #15 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
You are right; the OP called drop cap what it was actually a raised cap. Said that, all this thread is about how to implement "raised caps" in Kindle devices. I think there is no problem to handle DROP caps in Kindle (that is, Kindles that support .kf8).
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
optimal line height ? | cybmole | Sigil | 6 | 09-05-2013 09:30 AM |
Line height insanity! | Kamikuza | Conversion | 6 | 10-24-2012 11:56 PM |
Minimum Line Height being ignored for MOBI | yanathin | Conversion | 2 | 10-05-2012 03:24 PM |
Advice about line-height | Julien Pham | Sigil | 2 | 12-22-2011 09:05 AM |
Problems with Line Height Formatting | JohnnyRocks | Conversion | 4 | 02-20-2011 07:10 AM |