Debian Codegraph @

tests/test136.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 MergeFeature($1)
16
17 lookups = GetLookups("GSUB")
18 if (SizeOf(lookups) != 4)
19 Error("There should be two lookups")
20 endif
21
22 i = 0
23 while (i < SizeOf(lookups))
24 subtables = GetLookupSubtables(lookups[i])
25 if (SizeOf(subtables) != 1)
26 Print("Lookup: ", lookups[i])
27 Error("There should be one subtable")
28 endif
29 if (i == 1)
30 Select("A")
31 sub = GetPosSub(subtables[0])
32 if (SizeOf(sub) != 1)
33 Error("Incorrect number of substitutions")
34 endif
35 if (SizeOf(sub[0]) != 3 || sub[0][1] != "Substitution" || sub[0][2] != "C")
36 Error("Incorrect substitution")
37 endif
38 endif
39 if (i == 3)
40 Select("B")
41 sub = GetPosSub(subtables[0])
42 if (SizeOf(sub) != 1)
43 Error("Incorrect number of substitutions")
44 endif
45 if (SizeOf(sub[0]) != 3 || sub[0][1] != "Substitution" || sub[0][2] != "A")
46 Error("Incorrect substitution")
47 endif
48 endif
49 i++
50 endloop
51
52 Close()