-
Notifications
You must be signed in to change notification settings - Fork 757
Description
This is a slightly different scope to #5244
The sizing algorithm defined for the size of the initial-letter is as follows:
Font size of drop cap = ((N-1) * line-height + [cap-height of para] * [font size of paragraph])/[cap-height ratio of drop initial font]
That seems to be working well for Latin and Indic and Hebrew scripts (which is why I'm supporting the "hebrew top" baseline disappearing and from the algorithm to be replaced by cap-height, as suggested in #5208).
However it's not working so well for ideographic scripts, at least in horizontal alignment.
The algorithm that is working for me is:
Font size of drop cap = ((N-1) * line-height + [ideographic-face-bottom of para - ideographic-face-top of para] * [font size of paragraph])/[ideographic-face-bottom of drop initial font - ideographic-face-top of drop initial font]
Which gives the following results:
Looking ahead to #5244 eventually defining a "top" and "bottom" baseline for various other scripts, it might be worth changing the algorithm to not reference cap-height or ideograph-face baselines directly; the general form is
Font size of drop cap = ((N-1) * line-height + [abs(a - b)] * [font size of paragraph])/[abs(c - d)]
where:
- a is bottom alignment point of paragraph, as set by
initial-letter-align - b is top alignment point of paragraph, as set by
initial-letter-align - c is bottom alignment point of initial-letter, as determined by its content in section just after example 11
- d is top alignment point of initial-letter, as determined by its content in section just after example 11

