mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 14:01:10 +01:00
* [subset] Fix empty ClassDefFormat2 not intersecting class zero An empty ClassDef (rangeCount == 0) assigns class zero to every glyph, but ClassDefFormat2::intersects_class() and intersected_classes() reported no intersection when glyphs is not empty. Adds a subset test that fails before and passes after. * [subset] Fix empty ClassDefFormat1 not intersecting class zero Same bug as the previous commit, in the format 1 variant. When glyphCount is zero and startGlyphID is zero, `startGlyph + classValue.len - 1` underflows to 0xFFFFFFFF, so neither of the two comparisons can be true and class zero is never reported. (With a nonzero startGlyphID it happens to work.) harfbuzz always serializes an empty ClassDef as format 2, so this is only reachable with fonts produced by other tools. Extends the previous test with a hand-built format 1 variant of the font.
13 lines
180 B
Plaintext
13 lines
180 B
Plaintext
FONTS:
|
|
gsub_chaining2_empty_input_classdef.otf
|
|
gsub_chaining2_empty_input_classdef_f1.otf
|
|
|
|
PROFILES:
|
|
layout-test.txt
|
|
layout-test-retain-gids.txt
|
|
|
|
SUBSETS:
|
|
(0123456789
|
|
0123456789
|
|
*
|