OSDN Git Service

ltjsclasses: \ClassErrorNoLine was not defined
[luatex-ja/luatexja.git] / src / ltj-jfont.lua
index 3889992..a4aa4cd 100644 (file)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.jfont',
-  date = '2018/02/18',
+  date = '2018/06/15',
   description = 'Loader for Japanese fonts',
 })
 
@@ -179,6 +179,8 @@ end
 
 local update_jfm_cache
 do
+   local floor = math.floor
+   local function myround(a) return floor(a+0.5) end
    local function mult_table(old,scale) -- modified from table.fastcopy
       if old then
         local new = { }
@@ -186,7 +188,7 @@ do
            if type(v) == "table" then
               new[k] = mult_table(v,scale)
            elseif type(v) == "number" then
-              new[k] = round(v*scale)
+              new[k] = myround(v*scale)
            else
               new[k] = v
            end