OSDN Git Service

typo
[luatex-ja/luatexja.git] / src / ltj-jfont.lua
index 7793ffd..d63da29 100644 (file)
@@ -1,9 +1,9 @@
 --
--- luatexja/jfont.lua
+-- ltj-jfont.lua
 --
 luatexbase.provides_module({
   name = 'luatexja.jfont',
-  date = '2019/08/27',
+  date = '2019/09/26',
   description = 'Loader for Japanese fonts',
 })
 
@@ -456,7 +456,7 @@ do
       jfm_dir = dir
       local i = load_jfont_metric()
       local j = -update_jfm_cache(i, size)
-      font_metric_table[j]=metrics[i].size_cache[s]      
+      font_metric_table[j]=metrics[i].size_cache[size]
       tex.sprint(cat_lp, '\\ltj@cur' .. (dir=='yoko' and 'j' or 't') .. 'fnt' .. tostring(j) .. '\\relax')
    end
    luatexja.jfont.load_jfmonly = load_jfmonly
@@ -773,16 +773,18 @@ do
       if rotate_in_uax50(i) then rot[i] = true end
     end
     ltju.loop_over_feat(tfmdata, vert_vrt2, function (i,k) rot[i] = nil end)
-    -- 同じグリフが複数の Unicode ポイントを持っている場合.
-    -- いずれかの Unicode ポイントで rot = true ならば全体で rotate
-    ltju.loop_over_duplicates(tfmdata,
-       function (i, v)
-         local f = rot[i]
-         if not f then
-            for j,_ in pairs(v) do if rot[j] then f=true; break end end
-         end
-         rot[i]=f; for j,_ in pairs(v) do rot[j]=f end
-       end)
+    -- ↓「TeX Live 2019のLuaLaTeXで縦書きの三点リーダーが横書きになる」
+    -- (https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2722) により無効化
+    -- -- 同じグリフが複数の Unicode ポイントを持っている場合.
+    -- -- いずれかの Unicode ポイントで rot = true ならば全体で rotate
+    --ltju.loop_over_duplicates(tfmdata,
+    --   function (i, v)
+    --     local f = rot[i]
+    --     if not f then
+    --        for j,_ in pairs(v) do if rot[j] then f=true; break end end
+    --     end
+    --     rot[i]=f; for j,_ in pairs(v) do rot[j]=f end
+    --   end)
     for i,_ in pairs(rot) do
        dest = dest or {}; dest.rotation = dest.rotation or {}
        dest.rotation[i] = true
@@ -806,7 +808,10 @@ do
    end
    local function prepare_extra_data_font(id, res)
       if type(res)=='table' and (res.psname or res.filename) then
-         font_extra_info[id] = font_extra_basename[res.psname or nameonly(res.filename)]
+         local bname = res.psname or nameonly(res.filename)
+         local t = font_extra_basename[bname]
+         if not t then bname = prepare_extra_data_base(res) end
+        font_extra_info[id] = t or font_extra_basename[bname]
       end
    end
     luatexbase.add_to_callback(