View Single Post
Old 05-16-2019, 01:41 PM   #3
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,830
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Doitsu View Post
I've found many drop caps examples on the Internet, but none of the authors explained how they arrived at the values that they used and often the examples only worked with the fonts that they used in their examples.

IMHO, there must be a way to calculate the perfect values for font size, padding, margins etc. for any given font if the cap and line heights are known.
Hi Doitsu;

There is no such formula. Why? Because you not only have to deal with font-family and css but also with different rendering engine. It's known that -for example- ADE displays the things in a different way than WebKit. And you can't control that because a formula for ADE won't work for WebKit.

Your best bet is to float a square/rectangle and enclose the letter inside it. Sometime ago I posted about that:

https://www.mobileread.com/forums/sh...1&postcount=31

https://www.mobileread.com/forums/sh...2&postcount=55

https://www.mobileread.com/forums/sh...0&postcount=17

In the first link, I deal with the "tricky" Q to show that the method is the same no matter the letter.

Regards
Rubén
RbnJrg is online now   Reply With Quote