Re: [css-houdini-drafts] [font-metrics-api] Revised proposal of font metrics for each character

@FremyCompany:
> ...safe to reuse. Though now I think about it, the same holds true if kerning is factored in, so you probably can't reuse anyway. Thoughts?

Yeah, reuse is not possible by kerning, joining, and all such shaping effects. In Blink internally we cached metrics for each space-delimited word, but had problem in kerning between space character and letters. To determine the correct reusability is not an easy task, for this API, we assume authors call the API for all their string without considering reuse.

> I think this API needs to return first a runs array consisting of arrays of text runs of same font and directionality

The idea to return runs was raised by other people too, and I think it's nice and clean. But figuring out how to segment runs isn't easy. The directionality and fonts are good ones, one may want to split at script boundary, and more. The current proposal tries to avoid that discussion by returning a flat array with all such properties exposed (fonts are not exposed yet but we probably want to add in future), so that authors can build runs if needed.

-- 
GitHub Notification of comment by kojiishi
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/828#issuecomment-433029152 using your GitHub account

Received on Thursday, 25 October 2018 12:21:50 UTC