Debian Codegraph @

tests/test134.pe

raw
1 New()
2
3 Select("A")
4 SetGlyphName("A")
5 SetWidth(100)
6
7 Select("B")
8 SetGlyphName("B")
9 SetWidth(100)
10
11 Select("C")
12 SetGlyphName("C")
13 SetWidth(100)
14
15 Select("D")
16 SetGlyphName("D")
17 SetWidth(100)
18
19 MergeFeature($1)
20
21 lookups = GetLookups("GSUB")
22 if (SizeOf(lookups) != 2)
23 Error("There should be two lookups")
24 endif
25
26 i = 0
27 while (i < SizeOf(lookups))
28 subtables = GetLookupSubtables(lookups[i])
29 if (SizeOf(subtables) != 1)
30 Print("Lookup: ", lookups[i])
31 Error("There should be one subtable")
32 endif
33 if (i == 1)
34 Select("A")
35 sub = GetPosSub(subtables[0])
36 if (SizeOf(sub) != 1)
37 Error("Incorrect number of substitutions")
38 endif
39 if (SizeOf(sub[0]) != 4 || sub[0][1] != "MultSubs" || sub[0][2] != "C" || sub[0][3] != "D")
40 Error("Incorrect substitution")
41 endif
42 endif
43 i++
44 endloop
45
46 Close()