View Single Post
Old 01-11-2009, 04:41 AM   #25
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,560
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by brewt View Post
The proportionality seems consistent with the positioning of the drop cap to the rest of the paragraph. So altering the code to lower the drop cap should continue to provide consistent viewing regardless of size.
Yes, that's what I expected. Since the lengths are given in ems, there should be no problem changing the font size, but changing the typeface or the line spacing (which different devices may allow, or have different defaults) could be different.

Quote:
So, if I've read this right, you've got more than 1 after-the-drop-cap-code, depending on, of course, the width of the letter (I's take up less horizontal space than W's. Err, A's).
More than the width of the letter, it's about the shape of the letter. If the letter does not quite reach the top right corner, I add some negative spacing for the rest of the line, otherwise the flow is a bit strange, a sort of kerning. This happens for A and L. If the drop cap would not drop, i.e, if it would extend above the first line, but not below, I would use special code for letters that don't reach the bottom right corner, like T and W.

Another thing. In my tests, with a browser, the drop cap position was affected by the negative indent (it was displaced to the left), so I had to add a matching margin-left to the span.drop definition, and that would need to be changed in the .afterA and .afterL cases... I don't know if this behavior is normal or a "bug" in my browser, tough.
Jellby is offline   Reply With Quote