From 83a331fff83ac18314885a39e959ca0c10f316f7 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 15 Jul 2010 23:20:05 +0300 Subject: beta 2010-07-15 15:05 --- tex/context/base/font-ctx.lua | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (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 71d870559..85577f4a7 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -413,17 +413,23 @@ end) local calculate_scale = fonts.tfm.calculate_scale +-- Not ok, we can best use a database for this. The problem is that we +-- have delayed definitions and so we never know what style is taken +-- as start. + function fonts.tfm.calculate_scale(tfmtable, scaledpoints, relativeid) - local scaledpoints, delta, units = calculate_scale(tfmtable, scaledpoints, relativeid) - if enable_auto_r_scale and relativeid then -- for the moment this is rather context specific - local relativedata = fontdata[relativeid] - local id_x_height = relativedata and relativedata.parameters and relativedata.parameters.x_height - local tf_x_height = id_x_height and tfmtable.parameters and tfmtable.parameters.x_height * delta - if tf_x_height then - scaledpoints = (id_x_height/tf_x_height) * scaledpoints - delta = scaledpoints/units - end - end + local scaledpoints, delta, units = calculate_scale(tfmtable,scaledpoints) +--~ if enable_auto_r_scale and relativeid then -- for the moment this is rather context specific +--~ local relativedata = fontdata[relativeid] +--~ local rfmtable = relativedata and relativedata.unscaled and relativedata.unscaled +--~ local id_x_height = rfmtable and rfmtable.parameters and rfmtable.parameters.x_height +--~ local tf_x_height = tfmtable and tfmtable.parameters and tfmtable.parameters.x_height +--~ if id_x_height and tf_x_height then +--~ local rscale = id_x_height/tf_x_height +--~ delta = rscale * delta +--~ scaledpoints = rscale * scaledpoints +--~ end +--~ end return scaledpoints, delta, units end -- cgit v1.2.3