diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-04-21 10:40:49 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-04-21 10:40:49 +0200 |
commit | 595681ed25471f1206e4942adbf0abd664fa7e11 (patch) | |
tree | b0e2a8e390dea023af96a3e5e5c056b7d9f34023 /tex/context/base/mkiv/font-otr.lua | |
parent | 0bc04866afcb280678aec47daed0716a2a4d17c7 (diff) | |
download | context-595681ed25471f1206e4942adbf0abd664fa7e11.tar.gz |
2016-04-21 10:14:00
Diffstat (limited to 'tex/context/base/mkiv/font-otr.lua')
-rw-r--r-- | tex/context/base/mkiv/font-otr.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua index 3542d180e..d20238349 100644 --- a/tex/context/base/mkiv/font-otr.lua +++ b/tex/context/base/mkiv/font-otr.lua @@ -1066,14 +1066,13 @@ readers.hmtx = function(f,fontdata,specification) local nofmetrics = fontdata.horizontalheader.nofhmetrics local glyphs = fontdata.glyphs local nofglyphs = fontdata.nofglyphs - local nofrepeated = nofglyphs - nofmetrics local width = 0 -- advance local leftsidebearing = 0 for i=0,nofmetrics-1 do local glyph = glyphs[i] width = readshort(f) leftsidebearing = readshort(f) - if advance ~= 0 then + if width ~= 0 then glyph.width = width end -- if leftsidebearing ~= 0 then @@ -1082,8 +1081,8 @@ readers.hmtx = function(f,fontdata,specification) end -- The next can happen in for instance a monospace font or in a cjk font -- with fixed widths. - for i=nofmetrics,nofrepeated do - local glyph = glyphs[i] + for i=nofmetrics,nofglyphs do + local glyph = glyphs[i] if width ~= 0 then glyph.width = width end |