From 66e5e30808380f832451181f72d3031592288e9a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 9 Nov 2009 17:47:00 +0100 Subject: beta 2009.11.09 17:47 --- tex/context/base/font-ctx.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tex/context/base/font-ctx.lua') 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 -- cgit v1.2.3