View Single Post
Old 05-18-2020, 05:45 PM   #6
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: 79,935
Karma: 146918083
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 DNSB View Post
I despise using drop caps since they basically need to be tweaked for every format and ereader. That being said, the larger the font size for a drop cap compared to the body text, the harder it is to to make it look half decent on multiple platforms. One book I worked on used a cursive font for the drop caps. I ended up with a separate class for each letter used as a drop cap and another class for the case where a double quote preceded the first letter. It ended up looking half decent on 768x1024 or larger displays but the CSS was a dog's breakfast.

The basic code looks like this with the margins being tweaked for the individual characters:

.first-letter-t {
float: left;
font-size: 300%;
margin-left: 0.03em;
margin-top: -0.3em;
margin-right: 0.12em;
margin-bottom: -0.36em;
font-weight: bold;
}
This is CSS for a dropcap. The CSS in the first post is not for a dropcap.
JSWolf is offline   Reply With Quote