w3c / imsc-hrm

IMSC Hypothetical Render Model
https://w3c.github.io/imsc-hrm/spec/imsc-hrm.html
Other
1 stars 6 forks source link

Is NRGA really calculated by squaring percentage values? #64

Closed nigelmegitt closed 1 year ago

nigelmegitt commented 1 year ago

The specification of how NRGA is computed is based on fontSize as a percentage of root container height, squared. The sum of NRGA for all the glyphs in the glyph cache (previously buffer) must not exceed NGBS, which is 1.

The phrase "as a percentage of Root Container Region height" is confusing. Taking it literally, a single glyph whose font size is, say, 6% of the root container region height would generate NRGA of 6 * 6 = 36, which immediately exceeds NGBS.

I think what is intended here is "as a decimal fraction of Root Container Region height", so that this hypothetical glyph's NRGA = 0.06 * 0.06 = 0.0036.

nigelmegitt commented 1 year ago

I noticed that Example 2 suggests that my interpretation is indeed the intended one.