diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-07-15 15:01:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-07-15 15:01:00 +0200 |
commit | 84903d24d6d930438bb3cc4322c4b14271b713aa (patch) | |
tree | 7f5fca13da2c9e1c81e61fbcac67f61d55f13800 /tex/context/base/font-ctx.lua | |
parent | cb0c6e65703831a34d0ba909f703994a0825beac (diff) | |
download | context-84903d24d6d930438bb3cc4322c4b14271b713aa.tar.gz |
beta 2010.07.15 15:01
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 26 |
1 files changed, 16 insertions, 10 deletions
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 |