OSDN Git Service

fix "Command `\colon' already defined" error when fontspec is loaded without no-math...
[luatex-ja/luatexja.git] / src / ltj-jfont.lua
index cfd544c..3679ad1 100644 (file)
@@ -371,7 +371,7 @@ do
       if jfm_dir == 'tate' then
         is_vert_enabled = (not name:match('[:;]%-vert')) and (not  name:match('[:;]%-vrt2'))
          if not name:match('vert') and not name:match('vrt2') then
-            name = name .. ';vert;vrt2'
+            name = name .. ';+vert;+vrt2'
          end
       else
         is_vert_enabled = nil
@@ -699,7 +699,7 @@ do
    local function add_fl_table(dest, glyphs, unitable, asc_des, units)
       local tg, glyphmin, glyphmax = glyphs.glyphs, 0, glyphs.glyphmax
       for _,v in pairs(fields(glyphs)) do
-        if v=='glyphmin' then glyphmin = glyphs.glyphmin; break end
+        if v=='glyphmin' then glyphmin, glyphmax = glyphs.glyphmin, glyphmax+1; break end
       end
       for i = glyphmin, glyphmax-1 do
         local gv = tg[i]
@@ -970,8 +970,10 @@ do
            if h then
               local g = node_new(id_kern)
               setfield(g, 'subtype', 1); set_attr(g, attr_icflag, ITALIC)
-              setfield(g, 'kern', h.characters[getchar(p)].italic)
-              node_write(g); ensure_tex_attr(attr_icflag, 0)
+              if h.characters[getchar(p)] and h.characters[getchar(p)].italic then 
+                 setfield(g, 'kern', h.characters[getchar(p)].italic)
+                 node_write(g); ensure_tex_attr(attr_icflag, 0)
+              end
            end
         end
       end