C_O_L_R_test: add test for paint pointed to by both 3- and 4-byte offsets
This commit is contained in:
parent
286e6466cd
commit
d2fd4dfb24
@ -116,7 +116,7 @@ COLR_V1_SAMPLE = (
|
|||||||
(b"\x00\x03", "LayerRecordCount (3)"),
|
(b"\x00\x03", "LayerRecordCount (3)"),
|
||||||
(b"\x00\x00\x00\x34", "Offset to BaseGlyphList from beginning of table (52)"),
|
(b"\x00\x00\x00\x34", "Offset to BaseGlyphList from beginning of table (52)"),
|
||||||
(b"\x00\x00\x00\x9f", "Offset to LayerList from beginning of table (159)"),
|
(b"\x00\x00\x00\x9f", "Offset to LayerList from beginning of table (159)"),
|
||||||
(b"\x00\x00\x01\x62", "Offset to ClipList (354)"),
|
(b"\x00\x00\x01\x66", "Offset to ClipList (358)"),
|
||||||
(b"\x00\x00\x00\x00", "Offset to DeltaSetIndexMap (NULL)"),
|
(b"\x00\x00\x00\x00", "Offset to DeltaSetIndexMap (NULL)"),
|
||||||
(b"\x00\x00\x00\x00", "Offset to VarStore (NULL)"),
|
(b"\x00\x00\x00\x00", "Offset to VarStore (NULL)"),
|
||||||
(b"\x00\x06", "BaseGlyphRecord[0].BaseGlyph (6)"),
|
(b"\x00\x06", "BaseGlyphRecord[0].BaseGlyph (6)"),
|
||||||
@ -187,22 +187,26 @@ COLR_V1_SAMPLE = (
|
|||||||
(b"\x00\x05", "ColorLine.ColorStop[1].PaletteIndex (5)"),
|
(b"\x00\x05", "ColorLine.ColorStop[1].PaletteIndex (5)"),
|
||||||
(b"@\x00", "ColorLine.ColorStop[1].Alpha (1.0)"),
|
(b"@\x00", "ColorLine.ColorStop[1].Alpha (1.0)"),
|
||||||
# LayerList
|
# LayerList
|
||||||
(b"\x00\x00\x00\x04", "LayerList.LayerCount (4)"),
|
(b"\x00\x00\x00\x05", "LayerList.LayerCount (5)"),
|
||||||
(
|
(
|
||||||
b"\x00\x00\x00\x14",
|
b"\x00\x00\x00\x18",
|
||||||
"First Offset to Paint table from beginning of LayerList (20)",
|
"First Offset to Paint table from beginning of LayerList (24)",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
b"\x00\x00\x00\x23",
|
b"\x00\x00\x00\x27",
|
||||||
"Second Offset to Paint table from beginning of LayerList (35)",
|
"Second Offset to Paint table from beginning of LayerList (39)",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
b"\x00\x00\x00\x4e",
|
b"\x00\x00\x00\x52",
|
||||||
"Third Offset to Paint table from beginning of LayerList (78)",
|
"Third Offset to Paint table from beginning of LayerList (82)",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
b"\x00\x00\x00\x9e",
|
b"\x00\x00\x00\xa2",
|
||||||
"Fourth Offset to Paint table from beginning of LayerList (158)",
|
"Fourth Offset to Paint table from beginning of LayerList (162)",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
b"\x00\x00\x00\xbc",
|
||||||
|
"Fifth Offset to Paint table from beginning of LayerList (188)",
|
||||||
),
|
),
|
||||||
# BaseGlyphPaintRecord[2]
|
# BaseGlyphPaintRecord[2]
|
||||||
(b"\x0a", "BaseGlyphPaintRecord[2].Paint.Format (10)"),
|
(b"\x0a", "BaseGlyphPaintRecord[2].Paint.Format (10)"),
|
||||||
@ -296,7 +300,7 @@ COLR_V1_SAMPLE = (
|
|||||||
),
|
),
|
||||||
(b"\xfc\x17", "xSkewAngle (-0.0611)"),
|
(b"\xfc\x17", "xSkewAngle (-0.0611)"),
|
||||||
(b"\x01\xc7", "ySkewAngle (0.0278)"),
|
(b"\x01\xc7", "ySkewAngle (0.0278)"),
|
||||||
# PaintGlyph
|
# PaintGlyph glyph00011 (pointed to by both PaintSkew above and by LayerList[4] offset)
|
||||||
(b"\x0a", "LayerList.Paint[3].Paint.Paint.Paint.Format (10)"),
|
(b"\x0a", "LayerList.Paint[3].Paint.Paint.Paint.Format (10)"),
|
||||||
(b"\x00\x00\x06", "Offset to Paint subtable from beginning of PaintGlyph (6)"),
|
(b"\x00\x00\x06", "Offset to Paint subtable from beginning of PaintGlyph (6)"),
|
||||||
(b"\x00\x0b", "LayerList.Paint[2].Glyph (11)"),
|
(b"\x00\x0b", "LayerList.Paint[2].Glyph (11)"),
|
||||||
@ -413,7 +417,7 @@ COLR_V1_XML = [
|
|||||||
" </BaseGlyphPaintRecord>",
|
" </BaseGlyphPaintRecord>",
|
||||||
"</BaseGlyphList>",
|
"</BaseGlyphList>",
|
||||||
"<LayerList>",
|
"<LayerList>",
|
||||||
" <!-- LayerCount=4 -->",
|
" <!-- LayerCount=5 -->",
|
||||||
' <Paint index="0" Format="10"><!-- PaintGlyph -->',
|
' <Paint index="0" Format="10"><!-- PaintGlyph -->',
|
||||||
' <Paint Format="3"><!-- PaintVarSolid -->',
|
' <Paint Format="3"><!-- PaintVarSolid -->',
|
||||||
' <PaletteIndex value="2"/>',
|
' <PaletteIndex value="2"/>',
|
||||||
@ -510,6 +514,13 @@ COLR_V1_XML = [
|
|||||||
' <dx value="257"/>',
|
' <dx value="257"/>',
|
||||||
' <dy value="258"/>',
|
' <dy value="258"/>',
|
||||||
" </Paint>",
|
" </Paint>",
|
||||||
|
' <Paint index="4" Format="10"><!-- PaintGlyph -->',
|
||||||
|
' <Paint Format="2"><!-- PaintSolid -->',
|
||||||
|
' <PaletteIndex value="2"/>',
|
||||||
|
' <Alpha value="0.5"/>',
|
||||||
|
" </Paint>",
|
||||||
|
' <Glyph value="glyph00011"/>',
|
||||||
|
" </Paint>",
|
||||||
"</LayerList>",
|
"</LayerList>",
|
||||||
'<ClipList Format="1">',
|
'<ClipList Format="1">',
|
||||||
" <Clip>",
|
" <Clip>",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user