Closed Bug 1916037 Opened 1 year ago Closed 1 year ago

Nightly doesnt support some variable fonts at https://v-fonts.com/fonts/gimme-constructo-variable and throws some WOFF2 sanitization errors , Chrome supports

Categories

(Core :: Graphics: Text, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1922381

People

(Reporter: mayankleoboy1, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file about:support

Go to https://v-fonts.com/fonts/gimme-constructo-variable

AR: Boxes which do not change when you move the slider.
ER: Font should be supportd. Chrome already supports this font.

12:45:50.091 Loading failed for the <script> with source “https://analytics.hex.xyz/matomo.js”. gimme-constructo-variable:1:1
12:45:50.119 downloadable font: Layout: Invalid filter range in condition (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:50.119 downloadable font: Layout: Failed to parse condition table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:50.119 downloadable font: GSUB: Failed to parse condition set table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:50.119 downloadable font: GSUB: Failed to parse feature variations table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:50.119 downloadable font: GSUB: Failed to parse table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:50.119 downloadable font: rejected by sanitizer (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:51.654
Error in parsing value for ‘-webkit-text-size-adjust’. Declaration dropped. gimme-constructo-variable:49:28
12:45:51.680
Unknown property ‘-moz-osx-font-smoothing’. Declaration dropped. style.css:433:26
12:45:51.680
Error in parsing value for ‘width’. Declaration dropped. style.css:590:9
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-track’. Ruleset ignored due to bad selector. style.css:693:21
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-fill-lower’. Ruleset ignored due to bad selector. style.css:701:21
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-fill-upper’. Ruleset ignored due to bad selector. style.css:707:21
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-thumb’. Ruleset ignored due to bad selector. style.css:713:21
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-fill-lower’. Ruleset ignored due to bad selector. style.css:723:27
12:45:51.680 Unknown pseudo-class or pseudo-element ‘-ms-fill-upper’. Ruleset ignored due to bad selector. style.css:726:27
12:45:52.667
GET
https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
[HTTP/2 200 0ms]

12:45:52.735 downloadable font: Layout: Invalid filter range in condition (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:52.735 downloadable font: Layout: Failed to parse condition table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:52.735 downloadable font: GSUB: Failed to parse condition set table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:52.735 downloadable font: GSUB: Failed to parse feature variations table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:52.735 downloadable font: GSUB: Failed to parse table (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2
12:45:52.735 downloadable font: rejected by sanitizer (font-family: "Gimme Constructo Variable" style:normal weight:400 stretch:100 src index:0) source: https://v-fonts.com/assets/fonts/GimmeConstructoVariable_02.woff2

Summary: Nightly doesnt support some variable fonts at https://v-fonts.com/fonts/gimme-constructo-variable , Chrome supports → Nightly doesnt support some variable fonts at https://v-fonts.com/fonts/gimme-constructo-variable and throws some WOFF2 sanitization errors , Chrome supports

According to the log messages, these fonts have an error in the GSUB table, so Nightly is deliberately rejecting them. The fault should be reported to the font developer.

Setting gfx.downloadable_fonts.otl_validation to false will disable the GSUB validation and allow the fonts to load.

Dumping the GSUB table with ttx, I found what I believe is triggering OTS to complain:

        <ConditionSet>
          <!-- ConditionCount=1 -->
          <ConditionTable index="0" Format="1">
            <AxisIndex value="0"/>
            <FilterRangeMinValue value="1.99994"/>
            <FilterRangeMaxValue value="1.0"/>
          </ConditionTable>
        </ConditionSet>

Note that the Min value is larger than the Max, which doesn't make any sense. That will be reported by the check here.

(I guess it could be argued that this mis-ordered filter range is not actually a violation of the OpenType spec, as it doesn't specifically say that the min & max values must be properly ordered; but such a range can never actually match. Maybe this should be softened to an OTS warning rather than an error, though in practice that'll probably mean it just doesn't get noticed.)

The OTS update that just landed in bug 1922381 fixes this: closing as a dupe of that bug (although it was actually this original issue that prompted the OTS change -- thanks for reporting!)

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1922381
Resolution: --- → DUPLICATE

I confirm that hte demo works as expected in Nightly (and is consistent with the Chrome's behaviour).

Yeah, that's strange -- it looks like the Constructo font causes DirectWrite to do something far more expensive internally when we request glyph metrics. Or maybe it's somehow failing to use the glyph width cache in gfxDWriteFont, and re-measuring constantly.

Probably worth filing as a separate issue for further investigation.

See Also: → 1923820
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: