-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropcap with descenders introduces uneven lines #1925
Comments
Hmm, interesting bug. I typically don't use fonts with descenders in capitals for drop caps anyway but should be fixed. I'm guessing we need to fudge the glyph height to add in the descender depth before we scale it to a size that fits X lines. That depth wouldn't normally be included in those calculations, but for drop caps the total bounding box is what matters not the font-reported glyph height. I'm a little surprise this turned up by stretching that first line leading and not by just over-running the space at the bottom and drawing on top of the 5th line. |
Same surprise here! My guess is that the first line inherits the depth of the dropped caps, but I haven't checked that code for some time...
I wonder if (2b) is not the best choice (= detect, introduce an extra line, but keep scaling and alignment unchanged, possibly with a warning for visual check) |
@kyrias Seems to be the same issue, yes (to be real sure you could run SILE with Interestingly in such a case, solution 1 would be better than solution 2b... So we could shape, say, a "A" (I wouldn't expect descenders here in most fonts) and if it has a depth, pick solution 1, otherwise pick 2b... Interesting coding example :) |
(But probably such initials weren't done for dropped capitals in the first place) |
Myeah.
Hm, what do you mean? They come from this bible. |
I mean the decision to have them encoded, in that font, with such a baseline offset on all characters (or, that is, top-aligned with ascenders, it seems, looking at my image above)... That's kind of neat actually for display at the same point size as the main text, on a single line (as in my image above), but that's sort of unusual (it seems to me). Anyway, it's another case for the general issue. Even some fonts specifically designed for dropped capitals sometimes have descenders, e.g. Ehmcke-Fraktur Initialen Regular |
Self-assigning the issue, unless someone wants to give it a stab? |
Ran with docker
siletypesetter/sile:v0.14.13
:Same issue with a Q.
No font specified, so using default font Gentium Plus -- which happens to have capitals with descenders. Might occur with other fonts, though I wouldn't have noticed used most of the time fancy fonts such as Zalmann Caps ^^ i.e. fonts without descenders.
And it seems indeed that the depth being overlooked or not being taken into account somewhere:
The text was updated successfully, but these errors were encountered: