1 local is_vt, is_qj, is_bj, is_km, is_hwcl
3 if luatexja.jfont.jfm_feature then
4 is_vt = luatexja.jfont.jfm_feature.vert
5 is_qj = luatexja.jfont.jfm_feature.quanjiao
6 is_bj = luatexja.jfont.jfm_feature.banjiao
7 is_km = luatexja.jfont.jfm_feature.kaiming
8 is_hwcl = luatexja.jfont.jfm_feature.hwcl
13 tex.error('JFM feature "hwcl" can only be used in vertical mode')
18 not ((is_qj and not (is_bj or is_km)) or (is_bj and not (is_qj or is_km)) or
19 (is_km and not (is_qj or is_bj)))
22 'You must specify ONLY ONE feature among "quanjiao", "banjiao" and ' ..
27 local function aki(wd, pr, km)
31 (is_bj and {0, wd, 0, priority = {p, -p}} or
32 {wd, 0, wd, priority = {p, -p}}) or
33 (is_qj and {wd, 0, wd, priority = {p, -p}} or
34 {0, wd, 0, priority = {p, -p}})
37 luatexja.jfont.define_jfm {
39 dir = is_vt and 'tate' or 'yoko',
42 kanjiskip = {0.0, 0.25, 0},
43 xkanjiskip = {0.25, 0.25, 0.125},
49 height = is_vt and 0.5 or 0.88,
50 depth = is_vt and 0.5 or 0.12,
80 height = is_vt and 0.5 or 0.88,
81 depth = is_vt and 0.5 or 0.12,
111 height = is_vt and 0.5 or 0.88,
112 depth = is_vt and 0.5 or 0.12,
130 height = is_vt and 0.5 or 0.88,
131 depth = is_vt and 0.5 or 0.12,
148 width = is_vt and (is_hwcl and 0.5 or 1) or 0.5,
149 height = is_vt and 0.5 or 0.88,
150 depth = is_vt and 0.5 or 0.12,
153 [0] = is_vt and (is_hwcl and aki(0.5) or {}) or aki(0.5),
154 [1] = is_vt and (is_hwcl and aki(0.5) or {}) or aki(0.5),
155 [3] = is_vt and (is_hwcl and aki(0.5) or aki(0.25, 1)) or aki(0.5),
156 [5] = is_vt and (is_hwcl and aki(0.5) or {}) or aki(0.5),
157 [51] = is_vt and (is_hwcl and aki(0.5) or {}) or aki(0.5),
158 [52] = is_vt and (is_hwcl and aki(0.5) or {}) or aki(0.5)
168 height = is_vt and 0.5 or 0.88,
169 depth = is_vt and 0.5 or 0.12,
175 [21] = aki(0.25, -1),
176 [22] = aki(0.25, -1),
179 [41] = aki(0.25, -1),
180 [42] = aki(0.25, -1),
191 height = is_vt and 0.5 or 0.88,
192 depth = is_vt and 0.5 or 0.12,
195 [0] = aki(0.5, 1, true),
196 [1] = aki(0.5, 1, true),
197 [3] = aki(0.5, 1, true),
198 [5] = aki(0.5, 1, true),
199 [51] = aki(0.5, 1, true),
200 [52] = aki(0.5, 1, true)
206 align = is_vt and 'middle' or 'left',
209 width = is_vt and 1 or 0.5,
210 height = is_vt and 0.5 or 0.88,
211 depth = is_vt and 0.5 or 0.12,
214 [0] = is_vt and {} or aki(0.5, 1, true),
215 [1] = is_vt and {} or aki(0.5, 1, true),
216 [3] = is_vt and aki(0.25, -1) or aki(0.5, 1, true),
217 [5] = is_vt and {} or aki(0.5, 1, true),
218 [51] = is_vt and {} or aki(0.5, 1, true),
219 [52] = is_vt and {} or aki(0.5, 1, true)
224 chars = {'‼', '⁇', '⁈', '⁉'},
229 height = is_vt and 0.5 or 0.88,
230 depth = is_vt and 0.5 or 0.12,
250 height = is_vt and 0.5 or 0.88,
251 depth = is_vt and 0.5 or 0.12,
264 -- U+2E3A TWO-EM DASH
270 height = is_vt and 0.5 or 0.88,
271 depth = is_vt and 0.5 or 0.12,
284 -- U+2E3B THREE-EM DASH
290 height = is_vt and 0.5 or 0.88,
291 depth = is_vt and 0.5 or 0.12,
305 chars = {'boxbdd', 'parbdd', 'glue'}