diff options
| author | Hans Hagen <pragma@wxs.nl> | 2013-09-07 13:50:00 +0200 |
|---|---|---|
| committer | Hans Hagen <pragma@wxs.nl> | 2013-09-07 13:50:00 +0200 |
| commit | c6ebdfe2b6d339bb36c7a2559c98be3499c49ba9 (patch) | |
| tree | b164027c02c5ee6c167c24ab8b39a038646e050b /tex/context/base/font-ctx.lua | |
| parent | a862752411f1fcc2734df3327de0f1d9abb8a1ab (diff) | |
| download | context-c6ebdfe2b6d339bb36c7a2559c98be3499c49ba9.tar.gz | |
beta 2013.09.07 13:50
Diffstat (limited to 'tex/context/base/font-ctx.lua')
| -rw-r--r-- | tex/context/base/font-ctx.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 8b44d1c36..feefac338 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -73,6 +73,8 @@ local resources = hashes.resources local csnames = hashes.csnames local marks = hashes.markdata local lastmathids = hashes.lastmathids +local exheights = hashes.exheights +local emwidths = hashes.emwidths local designsizefilename = fontgoodies.designsizes.filename @@ -1542,11 +1544,11 @@ end local dimenfactors = number.dimenfactors -function helpers.dimenfactor(unit,tfmdata) -- could be a method of a font instance +function helpers.dimenfactor(unit,id) if unit == "ex" then - return (tfmdata and tfmdata.parameters.x_height) or 655360 + return id and exheights[id] or 282460 -- lm 10pt elseif unit == "em" then - return (tfmdata and tfmdata.parameters.em_width) or 655360 + return id and emwidths [id] or 655360 -- lm 10pt else local du = dimenfactors[unit] return du and 1/du or tonumber(unit) or 1 |
