diff options
author | Karl Berry <karl@freefriends.org> | 2023-05-19 20:25:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-05-19 20:25:29 +0000 |
commit | ed22f78cee813a18561f6481e5088ada5ba11f9a (patch) | |
tree | f6a72c301e4c9dcdfe3767854679331dd40d1f1c /Master/texmf-dist/tex | |
parent | c3253811d646e68080dc9d5b2130e7dacc175544 (diff) |
evangelion-jfm (19may23)
git-svn-id: svn://tug.org/texlive/trunk@67164 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua b/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua index f4cb29e67fb..632b4a85d7c 100644 --- a/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua +++ b/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua @@ -1,11 +1,11 @@ ---- Evangelion Japanese Font Metric for LuaTeX ----- Current Version: 1.0.3 (c) +---- Current Version: 1.0.4 (e) ---- Dev URL: https://github.com/RadioNoiseE/Evangelion-JFM ---- Copyright 2023, RadioNoiseE © -- 初始化 -local lang_jp, lang_tc, lang_sc, dir_vt, font_extd, punc_lg, punc_hg, std_nil, al_hw, al_fw +local lang_jp, lang_tc, lang_sc, dir_vt, font_extd, punc_lg, punc_hg, std_nil, al_hw, al_fw, as_nil if luatexja.jfont.jfm_feature then lang_jp = luatexja.jfont.jfm_feature.jp @@ -18,30 +18,36 @@ if luatexja.jfont.jfm_feature then std_nil = luatexja.jfont.jfm_feature.nstd al_hw = luatexja.jfont.jfm_feature.hwid al_fw = luatexja.jfont.jfm_feature.fwid + as_nil = luatexja.jfont.jfm_feature.plain end -- 預處理及容錯 if font_extd == true and dir_vt == false then tex.error('JFM feature "extd" only works with feature "vert".\n' .. 'For now I\'ll ignore it.') + luatexja.jfont.jfm_feature["extd"] = nil end if punc_lg == true and dir_vt == false then tex.error('JFM feature "lgp" only works with feature "vert".\n' .. 'For now I\'ll ignore it.') + luatexja.jfont.jfm_feature["lgp"] = nil end if al_hw == true and al_fw == true then tex.error('JFM feature "hwid" cannot be used with "fwid".') + luatexja.jfont.jfm_feature["hwid"] = nil + luatexja.jfont.jfm_feature["fwid"] = nil end if not ((lang_jp and not (lang_tc or lang_sc)) or - (lang_tc and not (lang_jp or lang_sc)) or - (lang_sc and not (lang_jp or lang_tc))) then + (lang_tc and not (lang_jp or lang_sc)) or + (lang_sc and not (lang_jp or lang_tc))) then tex.error('Specify one and only one feature from three language specific features\n' .. '"jp", "trad" or "smpl"\n' .. 'is required.\n' .. 'For now I\'ll use "lang_jp" for japanese by default.') + luatexja.jfont.jfm_feature["hwid"] = nil end -- 壓縮比例設定 @@ -54,13 +60,13 @@ local lgp_kanjiskip = {kanjiskip_natural = 0, kanjiskip_stretch = 1, kanjiskip_s -- 定義函數宏 local function logic_anif(f1, f2, r1, r2) - local rta = f1 and (f2 and r1) or r2 - return rta + local rta = f1 and (f2 and r1) or r2 + return rta end local function logic_if(f1, r1, r2) - local rti = f1 and r1 or r2 - return rti + local rti = f1 and r1 or r2 + return rti end local function context_height() @@ -426,4 +432,11 @@ if al_fw == false and al_fw == true then eva[10].width = 1 end +if sa_nil == true then + for _, catnum in ipairs({1, 101, 102, 2, 201, 202, 3, 301, 302, 4, 5, 6, 7, 8, 9, 10, 11}) do + eva[catnum] = nil + end + eva[0].glue = {} +end + luatexja.jfont.define_jfm(eva) |