-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-mark.fea
More file actions
69 lines (53 loc) · 2.11 KB
/
test-mark.fea
File metadata and controls
69 lines (53 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# diacritics-minimal.fea
# Minimal GDEF + mark + mkmk for testing diacritic placement on "o"
# ----------------------------------------------------------
# 1. Language systems
# ----------------------------------------------------------
languagesystem DFLT dflt;
languagesystem latn dflt;
# ----------------------------------------------------------
# 2. Glyph classes for GDEF
# Adjust/add bases and marks as needed.
# ----------------------------------------------------------
# Base glyphs: just "o" for this minimal test
@BASE_GLYPHS = [ o ];
# Ligature glyphs: none for this minimal test
@LIGATURES = [ ];
# Mark glyphs: U+0300 COMBINING GRAVE ACCENT
# Make sure the name "gravecomb" exists in the font
@MARK_GLYPHS = [ gravecomb ];
# Components: typically empty
@COMPONENTS = [ ];
# ----------------------------------------------------------
# 3. GDEF table
# This is crucial so shaping engines will apply mark GPOS.
# ----------------------------------------------------------
table GDEF {
GlyphClassDef
@BASE_GLYPHS,
@LIGATURES,
@MARK_GLYPHS,
@COMPONENTS;
} GDEF;
# ----------------------------------------------------------
# 4. Mark feature (mark-to-base)
# Places gravecomb (U+0300) on "o".
# ----------------------------------------------------------
# For convenience, a mark class with our single mark glyph
@GRAVE_MARKS = [ gravecomb ];
feature mark {
# markClass: define the anchor on the MARK (gravecomb)
# anonymous anchor: <anchor x y>
markClass gravecomb <anchor 0 500> @GRAVE_MARKS;
# Base glyph "o": give it a crazy-high anchor so movement is obvious
pos base o <anchor 0 1700> mark @GRAVE_MARKS;
} mark;
# ----------------------------------------------------------
# 5. mkmk feature (mark-to-mark)
# Minimal stub: allows future stacking, but not essential for the test.
# ----------------------------------------------------------
feature mkmk {
# Attach the mark to another mark (here just itself) at a second position
# This is mostly to make the mkmk feature non-empty.
pos mark gravecomb <anchor 0 550> mark @GRAVE_MARKS;
} mkmk;