diff options
author | Marius <mariausol@gmail.com> | 2013-09-07 15:00:24 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-09-07 15:00:24 +0300 |
commit | cd00fa38da8153404c3a0efbff80fefa08f05082 (patch) | |
tree | 0e28431ea0f464e5ddf88059033f8d1bc4201663 /tex/context/base/font-ctx.lua | |
parent | 396705141059782c28dde647849cf2eb8797872f (diff) | |
download | context-cd00fa38da8153404c3a0efbff80fefa08f05082.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 |