Re: [svgwg] context-value UA rules for OpenType are giving unexpected rendering / compat problems

I would expect that `context-value` would be computed to an absolute length on the root element of each glyph, and then would inherit within the font as normal, not as a keyword.

But I'm surprised it makes a difference.  Is the Stylo implementation using the local transformation on each element to calculate the scaling factor between the `context` and the current shape? As I read the spec, it should be a fixed scaling factor based on the font-size in the parent document and the px-per-em in the glyph, and therefore it should work the same whether inherited as an absolute value or as a keyword:

> This value means the same as the computed value of the corresponding property of the context element, but scaled so that it has the same size when used in the coordinate system of the root `<svg>` element of the SVG glyph document. For example, if the context element has 'stroke-width' set to 2px and the SVG glyph document is rendered with a coordinate system such that 2048 user units corresponds to 16px in the context element's coordinate space, then using context-value for 'stroke-width' in the glyph definition will have the same visual effect as using 256 user units.

Some clarifications in the OpenType spec would definitely help, and we definitely need to do something about the final paragraph of that section that links to SVG 2 for values which are not currently defined in SVG 2.  Anyone have any connections for updating that spec?

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/421#issuecomment-383332225 using your GitHub account

Received on Saturday, 21 April 2018 21:18:02 UTC