Thread: Drop caps?
View Single Post
Old 02-06-2024, 06:18 PM   #4
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: 80,222
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by jackm8 View Post
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.


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 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.
Do you know that your drop-cap span has broken searching? The first work in the chatter cannot be found with a search.

Yes you can have the same code for ePub and KF8/KFX. But one thing you need to do in the ePub is set the line-height the same as that of the Kindle. Also, you may need to use the same font. ON my Kobo, I can override your choice of font and that can spoil your drop cap. On a Reader, drop cap really should not be used as there are many cases where it's a fail.
JSWolf is offline   Reply With Quote