View Single Post
Old 06-26-2025, 10:47 AM   #59
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,857
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
With your first code for the Kindle, will you get a perfect dropcap when using ChareInk6SP as the font wiyh KF8? The font uses a smaller line height that works in KF8 but not KFX.
The perfect drop cap only is for KFX, for .kf8 you need more than that simple code to have a decent drop cap. You need to employ the same font for body text and drop cap and the line height of the drop cap has to be the same as the paragraphs. Besides, it's neccesary to adjust drop cap margins. Something like this:

Code:
body {
   font-size: 1em; /* to have a consistent font-size for all ebook */
}

p {
   margin: 0;
   text-align: justify;
   text-indent: 1.2em;
   line-height: 1.2em;
   font-size: 100%; /* now that 100% is 100% of font-size of body */
}

p.drop {
   text-indent: 0;
}

.dropCap {
   float: left;
   line-height: 1.2em;
   font-size: 360%; /* Or the size you wish */
   font-weight: bold;
   margin: -0.02em 5px -0.03em 0; /* Here you could need change these values */
}
The best output under .kf8 is by employing a .svg image, so what floats as drop cap is not a letter but an image. Best (perfect) output for drop caps (no matter the font-size) is achieved under KFX and under epub3 with ereaders that suppor "initial-letter" (or "-webkit-initial-letter") property. In my tests with epub3 all Sigil's plugins, Calibre Viewer, Thorium, Koodo Reader, Foliate, Cantook, Reasily, Lithium, PocketBook, Infinity Reader and Kobo for Android support that property.
RbnJrg is offline   Reply With Quote