diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-06-08 10:23:49 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-06-08 10:23:49 +0200 |
commit | 86bfea5faac983d15c47eec27f43ec56e75c69ef (patch) | |
tree | 69a37851a9b8beeb625110f4fc51ff1ef188d7e4 /tex/generic | |
parent | c2d2236242c95f4753e7b197d576102c6fc20446 (diff) | |
download | context-86bfea5faac983d15c47eec27f43ec56e75c69ef.tar.gz |
2018-06-08 09:38:00
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 05acd5ede..0889d7777 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 06/04/18 12:18:30 +-- merge date : 06/08/18 09:31:24 do -- begin closure to overcome local limits and interference @@ -3814,13 +3814,35 @@ local endofstring=patterns.endofstring local whitespace=patterns.whitespace local spacer=patterns.spacer local spaceortab=patterns.spaceortab +local ptf=1/65536 +local bpf=(7200/7227)/65536 local function points(n) + if n==0 then + return "0pt" + end n=tonumber(n) - return (not n or n==0) and "0pt" or lpegmatch(stripper,format("%.5fpt",n/65536)) + if not n or n==0 then + return "0pt" + end + n=n*ptf + if n%1==0 then + return format("%ipt",n) + end + return lpegmatch(stripper,format("%.5fpt",n)) end local function basepoints(n) + if n==0 then + return "0pt" + end n=tonumber(n) - return (not n or n==0) and "0bp" or lpegmatch(stripper,format("%.5fbp",n*(7200/7227)/65536)) + if not n or n==0 then + return "0pt" + end + n=n*bpf + if n%1==0 then + return format("%ibp",n) + end + return lpegmatch(stripper,format("%.5fbp",n)) end number.points=points number.basepoints=basepoints @@ -18254,7 +18276,7 @@ function readers.gdef(f,fontdata,specification) local format=readushort(f) if format==1 then local nofsets=readushort(f) - local sets=readcardinal(f,nofsets,ulong) + local sets=readcardinaltable(f,nofsets,ulong) for i=1,nofsets do local offset=sets[i] if offset~=0 then |