diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-11-09 17:47:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-11-09 17:47:00 +0100 |
commit | 66e5e30808380f832451181f72d3031592288e9a (patch) | |
tree | 87bbd912cbcfe5f8f9a4e797f34aa15760d6e271 /tex/context/base/font-ctx.lua | |
parent | 128e5756b60274b62fa31304324abd31c48d711a (diff) | |
download | context-66e5e30808380f832451181f72d3031592288e9a.tar.gz |
beta 2009.11.09 17:47
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 8e42b0ab0..c18fbe0ff 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -398,3 +398,17 @@ end --~ return nil --~ end --~ end + +-- we need a place for this .. outside the generic scope + +local dimenfactors = number.dimenfactors + +function fonts.dimenfactor(unit,tfmdata) + if unit == "ex" then + return tfmdata.parameters.x_height + elseif unit == "em" then + return tfmdata.parameters.em_height + else + return dimenfactors[unit] or unit + end +end |