fontations: Regression in FreeType/Fontations path equality after c32c0a6442371d0206f82a4a981b3854f313aaae
See https://issues.skia.org/419049647
In the following set of fonts and tests Skia’s path difference testing notices path differences between the FreeType contour and the Fontations contour:
- Noto Sans Arabic [Fontations_NotoSans_ar_Arab]
- Noto Sans Armenian [Fontations_NotoSans_Armn]
- Noto Sans Bengali [Fontations_NotoSans_Beng]
- Noto Sans Devanagari [Fontations_NotoSans_Deva]
- Noto Sans Georgian [Fontations_NotoSans_Geor]
- Noto Sans Gujarati [Fontations_NotoSans_Gujr]
- Noto Sans Gurmukhi [Fontations_NotoSans_Guru]
- Noto Sans JP [Fontations_NotoSans_Jpan]
- Noto Sans Javanese [Fontations_NotoSans_Java]
- Noto Sans KR [Fontations_NotoSans_Kore]
- Noto Sans Kannada [Fontations_NotoSans_Knda]
- Noto Sans Khmer [Fontations_NotoSans_Khmr]
- Noto Sans Malayalam [Fontations_NotoSans_Mlym]
- Noto Sans SC [Fontations_NotoSans_Hans]
- Noto Sans Sinhala [Fontations_NotoSans_Sinh]
- Noto Sans TC [Fontations_NotoSans_Hant]
- Noto Sans Tamil [Fontations_NotoSans_Taml]
- Noto Sans Telugu [Fontations_NotoSans_Telu]
- Noto Sans Thai [Fontations_NotoSans_Thai]
- Noto Sans Vithkuqi [Fontations_NotoSans_Vith]
Example failure:
["/Users/drott/dev/skia/third_party/externals/googlefonts_testdata/data/fonts/NotoSansGurmukhi[wdth,wght].ttf"#0 ppem: 144 coords: [0.0, 0.0]] glyph id 7 outline doesn't match:
MoveTo { x: 82.375, y: 0.0 }
LineTo { x: 82.375, y: 53.71875 }
LineTo { x: 84.09375, y: 51.265625 }
QuadTo { cx0: 79.0625, cy0: 50.109375, x: 74.59375, y: 48.375 }
QuadTo { cx0: 70.125, cy0: 46.65625, x: 66.15625, y: 44.34375 }
QuadTo { cx0: 62.203125, cy0: 42.046875, x: 58.46875, y: 39.03125 }
LineTo { x: 61.203125, y: 43.921875 }
QuadTo { cx0: 61.203125, cy0: 35.71875, x: 59.90625, y: 29.296875 }
QuadTo { cx0: 58.609375, cy0: 22.890625, x: 55.9375, y: 19.21875 }
QuadTo { cx0: 53.28125, cy0: 15.546875, x: 49.109375, y: 15.546875 }
QuadTo { cx0: 46.078125, cy0: 15.546875, x: 44.0625, y: 17.34375 }
QuadTo { cx0: 42.046875, cy0: 19.15625, x: 42.046875, y: 23.90625 }
QuadTo { cx0: 42.046875, cy0: 29.375, x: 44.703125, y: 35.421875 }
QuadTo { cx0: 47.375, cy0: 41.46875, x: 51.265625, y: 45.640625 }
QuadTo { cx0: 51.125, cy0: 50.109375, x: 50.328125, y: 54.71875 }
QuadTo { cx0: 49.53125, cy0: 59.328125, x: 48.3125, y: 63.140625 }
QuadTo { cx0: 47.09375, cy0: 66.953125, x: 45.5, y: 68.828125 }
LineTo { x: 50.109375, y: 68.109375 }
QuadTo { cx0: 45.359375, cy0: 66.671875, x: 40.453125, y: 64.359375 }
QuadTo { cx0: 35.5625, cy0: 62.0625, x: 31.59375, y: 59.46875 }
QuadTo { cx0: 27.640625, cy0: 56.875, x: 25.203125, y: 54.578125 }
LineTo { x: 27.21875, y: 60.765625 }
QuadTo { cx0: 27.21875, cy0: 51.84375, x: 25.984375, y: 45.0 }
QuadTo { cx0: 24.765625, cy0: 38.15625, x: 22.09375, y: 34.34375 }
QuadTo { cx0: 19.4375, cy0: 30.53125, x: 14.96875, y: 30.53125 }
QuadTo { cx0: 11.953125, cy0: 30.53125, x: 10.0, y: 32.328125 }
QuadTo { cx0: 8.0625, cy0: 34.125, x: 8.0625, y: 39.03125 }
QuadTo { cx0: 8.0625, cy0: 44.359375, x: 10.65625, y: 50.328125 }
QuadTo { cx0: 13.25, cy0: 56.296875, x: 16.984375, y: 60.34375 }
QuadTo { cx0: 16.5625, cy0: 69.40625, x: 14.609375, y: 74.296875 }
QuadTo { cx0: 12.671875, cy0: 79.203125, x: 11.09375, y: 80.359375 }
LineTo { x: 17.28125, y: 79.34375 }
LineTo { x: -1.015625, y: 79.34375 }
LineTo { x: -1.015625, y: 89.5625 }
LineTo { x: 20.734375, y: 89.5625 }
QuadTo { cx0: 22.171875, cy0: 86.6875, x: 23.53125, y: 82.359375 }
QuadTo { cx0: 24.90625, cy0: 78.046875, x: 25.84375, y: 73.296875 }
QuadTo { cx0: 26.78125, cy0: 68.546875, x: 26.78125, y: 64.078125 }
- LineTo { x: 24.90625, y: 65.671875 }
+ LineTo { x: 24.90625, y: 65.65625 }
QuadTo { cx0: 26.640625, cy0: 67.828125, x: 31.171875, y: 70.625 }
QuadTo { cx0: 35.71875, cy0: 73.4375, x: 41.765625, y: 75.953125 }
QuadTo { cx0: 47.8125, cy0: 78.484375, x: 53.859375, y: 79.78125 }
QuadTo { cx0: 55.296875, cy0: 77.328125, x: 56.59375, y: 73.515625 }
QuadTo { cx0: 57.890625, cy0: 69.703125, x: 58.890625, y: 65.296875 }
QuadTo { cx0: 59.90625, cy0: 60.90625, x: 60.484375, y: 56.578125 }
QuadTo { cx0: 61.0625, cy0: 52.265625, x: 61.0625, y: 48.8125 }
LineTo { x: 58.609375, y: 50.828125 }
QuadTo { cx0: 61.203125, cy0: 52.984375, x: 65.078125, y: 55.140625 }
QuadTo { cx0: 68.96875, cy0: 57.3125, x: 73.859375, y: 59.25 }
QuadTo { cx0: 78.765625, cy0: 61.203125, x: 84.09375, y: 62.359375 }
LineTo { x: 82.375, y: 58.3125 }
LineTo { x: 82.375, y: 89.5625 }
LineTo { x: 107.859375, y: 89.5625 }
LineTo { x: 107.859375, y: 79.34375 }
LineTo { x: 94.03125, y: 79.34375 }
LineTo { x: 94.03125, y: 0.0 }
LineTo { x: 82.375, y: 0.0 }
Attaching one test font:
A bisect using
cargo run --bin fauntlet compare-glyphs /Users/drott/dev/skia/third_party/externals/googlefonts_testdata/data/fonts/NotoSansGurmukhi[wdth,wght].ttf
points to c32c0a6442371d0206f82a4a981b3854f313aaae which means releases after from skrifa-v0.29.2 are affected.
This is an important regression in Chromium and Skia and would need a rather quick fix. May I also again suggest to run (more) fauntlet as part of CI here?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29 (26 by maintainers)
Commits related to this issue
- Partial revert of "bypass variation processing for default location" In response to #1500 — committed to googlefonts/fontations by dfrg 2 years ago
- Partial revert of "bypass variation processing for default location" (#1501) In response to #1500 — committed to googlefonts/fontations by dfrg 2 years ago
- Roll FreeType from deef6d2a to 1518bc83 (13 commits) https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/deef6d2a3c3c2e502c88737e22d4633f50d570b5..1518bc83d26b434031bd12c706... — committed to google/skia by deleted user a year ago
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/374
You beat me to it 😃)
Reproduced. Thanks.