summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-ini.lua')
-rw-r--r--tex/context/base/font-ini.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index 5cff22760..a4a38ed71 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -115,3 +115,15 @@ function fonts.show_font_parameters()
end
end
end
+
+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