From: Hironori Kitagawa Date: Sun, 8 Nov 2015 09:25:09 +0000 (+0900) Subject: ltj-jfont.lua: braced font specification X-Git-Tag: 20151212.0~2^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=48b8e3dc636d7e15b621b2845b23e2c7b7cc7d1d;p=luatex-ja%2Fluatexja.git ltj-jfont.lua: braced font specification --- diff --git a/src/addons/luatexja-preset.sty b/src/addons/luatexja-preset.sty index 9a8ee54..917ba78 100644 --- a/src/addons/luatexja-preset.sty +++ b/src/addons/luatexja-preset.sty @@ -324,7 +324,7 @@ } {} \DeclareFontShape{JT3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp] {\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3" - : jfm=ujisv ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl + : jfm=ujisv ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl; ; script=latn \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }} } {} \bool_if:NT \l_ltjpreset_expert_bool { diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index 3e4e0b1..7eb9763 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -325,6 +325,8 @@ do -- extract jfm_file_name and jfm_var -- normalize position of 'jfm=' and 'jfmvar=' keys local function extract_metric(name) + local is_braced = name:match('^{(.*)}$') + name= is_braced or name jfm_file_name = ''; jfm_var = ''; jfm_ksp = true local tmp, index = name:sub(1, 5), 1 if tmp == 'file:' or tmp == 'name:' or tmp == 'psft:' then @@ -371,10 +373,11 @@ do if not name:match('vert') and not name:match('vrt2') then name = name .. ';vert;vrt2' end + print(name) else is_vert_enabled = nil end - return name + return is_braced and ('{' .. name .. '}') or name end -- define_font callback