diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-04-21 21:40:30 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-04-21 21:40:32 +0200 |
commit | ff1cc8f4d4e1d52cc1e9df9fd01f74395c782db5 (patch) | |
tree | 70ee2aec647dcbc5e3a13f75fa84fa199fdf3d81 /src/fontloader/misc/fontloader-font-otr.lua | |
parent | b1a1ee5d1ec8002acee2702e6dd070073e0ee0ee (diff) | |
download | luaotfload-ff1cc8f4d4e1d52cc1e9df9fd01f74395c782db5.tar.gz |
[fontloader] sync with Context as of 2016-04-21
Hans fixed a couple issues due to our reports. Also, brand new Lua based
PFB loader.
Diffstat (limited to 'src/fontloader/misc/fontloader-font-otr.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-font-otr.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/fontloader/misc/fontloader-font-otr.lua b/src/fontloader/misc/fontloader-font-otr.lua index 3542d18..27bb6a6 100644 --- a/src/fontloader/misc/fontloader-font-otr.lua +++ b/src/fontloader/misc/fontloader-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-1 do + local glyph = glyphs[i] if width ~= 0 then glyph.width = width end |