[csswg-drafts] [css-inline-3] initial-letter sizing for non-western scripts (#5366)

faceless2 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-inline-3] initial-letter sizing for non-western scripts ==
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, 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.

![image](https://user-images.githubusercontent.com/989243/88598936-64848400-d062-11ea-9c72-7aa9d4ae2fd0.png)

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:

![image](https://user-images.githubusercontent.com/989243/88598908-4fa7f080-d062-11ea-84c1-7fe48a71c71e.png)

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 + [a - b] * [font size of paragraph])/[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



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5366 using your GitHub account

Received on Monday, 27 July 2020 23:19:45 UTC