Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-17-2015, 04:29 AM   #1
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 79
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:
<p><span class="dropcap">L</span>orem ipsum dolor sit amet [...]</p
PHP Code:
body{font-size:100%;font-family:serif;}
p{margin:0;text-indent:0;line-height:1.2em;text-align:justify;font-size:1em;widows:2;orphans:2;}
.
dropcap{font-size:4.7em;line-height:0.8em;margin-right:3pt;} 
senhal is offline   Reply With Quote
Old 11-17-2015, 08:37 AM   #2
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by senhal View Post
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?

What about this procedure?

https://www.mobileread.com/forums/sho...51&postcount=9

Regards
RbnJrg is offline   Reply With Quote
Advert
Old 11-17-2015, 08:45 AM   #3
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 79
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Thanks, I just read the thread...
https://www.mobileread.com/forums/sho...d.php?t=237323

I try.
senhal is offline   Reply With Quote
Old 11-17-2015, 09:55 AM   #4
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 79
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
It works great!
Thank you!
senhal is offline   Reply With Quote
Old 11-17-2015, 12:40 PM   #5
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by senhal View Post
It works great!
Thank you!
You are welcome.
RbnJrg is offline   Reply With Quote
Advert
Old 11-18-2015, 12:52 AM   #6
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
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.
dgatwood is offline   Reply With Quote
Old 11-18-2015, 05:11 AM   #7
senhal
Connoisseur
senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.senhal knows what's going on.
 
senhal's Avatar
 
Posts: 79
Karma: 25684
Join Date: Sep 2014
Device: Kindle NT
Quote:
Originally Posted by dgatwood View Post
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.
With
PHP Code:
.dropcap{font-size:4.7em;line-height:1.2em;margin-right:3pt;margin-bottom:-1em;overflow-yhidden
unfortunately, nothing changes...
SVG solves it, but it could be a long work (I used 3 svg for a «…Y )
senhal is offline   Reply With Quote
Old 11-18-2015, 12:44 PM   #8
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by senhal View Post
SVG solves it, but it could be a long work (I used 3 svg for a «…Y )
Why? You only need one svg for «…Y.
RbnJrg is offline   Reply With Quote
Old 11-18-2015, 01:06 PM   #9
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by dgatwood View Post
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.
You can use this alternative method:

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>
2. In the .css file:

Code:
p {
    text-align: justify;
}

.raised {
    float: left;
    display: table-cell;
    font-size: 3em;
    font-weight: bold;
    margin: -0.75em 10px -0.5em 0;
}
However, the bottom alignment of the raised cap could slightly vary with different fonts (in Kindle e-inks devices you have six font to choose). The perfect bottom alignment no matter the font or the Kindle model, you only can get it with a image (for raised caps). And the lighter kind of image (for this purpose) it's the svg. I attach an epub so you can experiment with it

Regards
Attached Files
File Type: epub Raised Cap for Kindle.epub (2.6 KB, 144 views)
RbnJrg is offline   Reply With Quote
Old 11-18-2015, 05:32 PM   #10
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by RbnJrg View Post
However, the bottom alignment of the raised cap could slightly vary with different fonts (in Kindle e-inks devices you have six font to choose). The perfect bottom alignment no matter the font or the Kindle model, you only can get it with a image (for raised caps). And the lighter kind of image (for this purpose) it's the svg. I attach an epub so you can experiment with it
This is why you should always provide a custom font for drop cap glyphs. You need to be in control over the descenders to ensure that they don't descend into the next line of text, and the only way to do that is to actually control the font.
dgatwood is offline   Reply With Quote
Old 11-18-2015, 06:38 PM   #11
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: 69,155
Karma: 114842697
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.
JSWolf is offline   Reply With Quote
Old 11-19-2015, 06:27 AM   #12
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by dgatwood View Post
This is why you should always provide a custom font for drop cap glyphs. You need to be in control over the descenders to ensure that they don't descend into the next line of text, and the only way to do that is to actually control the font.
Hi dgatwood;

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
RbnJrg is offline   Reply With Quote
Old 11-20-2015, 07:33 AM   #13
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,510
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.
Notjohn is offline   Reply With Quote
Old 11-20-2015, 09:09 AM   #14
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93380495
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Notjohn View Post
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.
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!
HarryT is offline   Reply With Quote
Old 11-20-2015, 12:20 PM   #15
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,409
Karma: 5625801
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by HarryT View Post
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!
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).
RbnJrg is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
optimal line height ? cybmole Sigil 6 09-05-2013 10:30 AM
Line height insanity! Kamikuza Conversion 6 10-25-2012 12:56 AM
Minimum Line Height being ignored for MOBI yanathin Conversion 2 10-05-2012 04:24 PM
Advice about line-height Julien Pham Sigil 2 12-22-2011 10:05 AM
Problems with Line Height Formatting JohnnyRocks Conversion 4 02-20-2011 08:10 AM


All times are GMT -4. The time now is 02:27 PM.


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