diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-04-26 20:17:14 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-04-26 20:17:14 +0200 |
commit | 1b8f320120195d4a8a523c4bdba45d811bd81048 (patch) | |
tree | 6de94017bc7b267a983b934d4da5c4c207d0cbbc /tex/context/base/mkiv/lpdf-lmt.lua | |
parent | 3c25716e01b7251f0f7504481692421a729e4b53 (diff) | |
download | context-1b8f320120195d4a8a523c4bdba45d811bd81048.tar.gz |
2020-04-26 19:56:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-lmt.lua')
-rw-r--r-- | tex/context/base/mkiv/lpdf-lmt.lua | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/lpdf-lmt.lua b/tex/context/base/mkiv/lpdf-lmt.lua index 3966143b4..8148bec01 100644 --- a/tex/context/base/mkiv/lpdf-lmt.lua +++ b/tex/context/base/mkiv/lpdf-lmt.lua @@ -378,23 +378,52 @@ local flushcharacter do local naturalwidth = nil + -- local naturalwidths = setmetatableindex(function(t,font) + -- local d = descriptions[font] + -- local c = characters[font] + -- local f = parameters[font].hfactor + -- local v = setmetatableindex(function(t,char) + -- local w + -- local e = d and d[char] + -- if e then + -- w = e.width + -- if w then + -- w = w * f + -- end + -- end + -- if not w then + -- e = c[char] + -- if e then + -- w = e.width or 0 + -- end + -- end + -- if not w then + -- w = 0 + -- end + -- t[char] = w + -- return w + -- end) + -- t[font] = v + -- return v + -- end) + local naturalwidths = setmetatableindex(function(t,font) local d = descriptions[font] local c = characters[font] local f = parameters[font].hfactor local v = setmetatableindex(function(t,char) - local e = d and d[char] local w + local e = c[char] if e then - w = e.width - if w then - w = w * f - end + w = e.width or 0 end if not w then - e = c[char] + e = d and d[char] if e then - w = e.width or 0 + w = e.width + if w then + w = w * f + end end end if not w then |