Thread: Drop caps?
View Single Post
Old 02-06-2024, 06:09 PM   #3
jackm8
Addict
jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.jackm8 ought to be getting tired of karma fortunes by now.
 
jackm8's Avatar
 
Posts: 346
Karma: 3535840
Join Date: Nov 2015
Device: none
Thanks. It's surprisingly easy. Code works on .epubs that are then converted to .kfx with KFX Output plugin.

All that's needed is "span.dropcaps" into styles.css, then <span class="dropcaps">T</span> around first capital letter in the chapter, replacing the T.
Quote:
span.dropcaps
{
font-weight:normal;
font-size:320%;
float:left;
margin-top:-0.3225em;
margin-bottom:-0.3245em;
}

<span class="dropcaps">T</span>
A slight problem is that this code doesn't work the same way in epub format. Looking at preview in Sigil and Calibre, capital letter is off, but in Kindle Previewer it's then properly formatted. So it takes a bit of packing and unpacking from epub to kfx when adjusting things.

Also, it's not as pleasing visually in case of very short paragraphs, or when very small fonts settings are selected. But by the looks of it, typesetters in old paperbacks did it in a very similar way: https://archive.org/details/producer...p?view=theater (page 28, page 38, page 157...)

I'm just wonder now if there's a way to tune it so that it looks the same in epub and in kindle's format without changing the code.
Attached Thumbnails
Click image for larger version

Name:	prev0.jpg
Views:	146
Size:	518.7 KB
ID:	206235   Click image for larger version

Name:	prev1.jpg
Views:	141
Size:	555.4 KB
ID:	206236   Click image for larger version

Name:	prev2.jpg
Views:	158
Size:	309.6 KB
ID:	206237  

Last edited by jackm8; 02-06-2024 at 06:39 PM.
jackm8 is offline   Reply With Quote