summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/font-tfm.lua
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/font-tfm.lua
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-tfm.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/font-tfm.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-tfm.lua b/Master/texmf-dist/tex/context/base/font-tfm.lua
index 8f0a99d5aee..b1ec7c1dec2 100644
--- a/Master/texmf-dist/tex/context/base/font-tfm.lua
+++ b/Master/texmf-dist/tex/context/base/font-tfm.lua
@@ -63,6 +63,7 @@ local function read_from_tfm(specification)
local tfmdata = font.read_tfm(filename,size) -- not cached, fast enough
if tfmdata then
local features = specification.features and specification.features.normal or { }
+ local resources = tfmdata.resources or { }
local properties = tfmdata.properties or { }
local parameters = tfmdata.parameters or { }
local shared = tfmdata.shared or { }
@@ -76,9 +77,20 @@ local function read_from_tfm(specification)
shared.processes = next(features) and tfm.setfeatures(tfmdata,features) or nil
--
tfmdata.properties = properties
+ tfmdata.resources = resources
tfmdata.parameters = parameters
tfmdata.shared = shared
--
+ parameters.slant = parameters.slant or parameters[1] or 0
+ parameters.space = parameters.space or parameters[2] or 0
+ parameters.space_stretch = parameters.space_stretch or parameters[3] or 0
+ parameters.space_shrink = parameters.space_shrink or parameters[4] or 0
+ parameters.x_height = parameters.x_height or parameters[5] or 0
+ parameters.quad = parameters.quad or parameters[6] or 0
+ parameters.extra_space = parameters.extra_space or parameters[7] or 0
+ --
+ constructors.enhanceparameters(parameters) -- official copies for us
+ --
if constructors.resolvevirtualtoo then
fonts.loggers.register(tfmdata,file.extname(filename),specification) -- strange, why here
local vfname = findbinfile(specification.name, 'ovf')
@@ -95,9 +107,8 @@ local function read_from_tfm(specification)
end
end
--
- if next(features) then
- constructors.applymanipulators("tfm",tfmdata,specification.features.normal,trace_features,report_tfm)
- end
+ local allfeatures = tfmdata.shared.features or specification.features.normal
+ constructors.applymanipulators("tfm",tfmdata,allfeatures.normal,trace_features,report_tfm)
if not features.encoding then
local encoding, filename = match(properties.filename,"^(.-)%-(.*)$") -- context: encoding-name.*
if filename and encoding and encodings.known[encoding] then
@@ -115,7 +126,7 @@ local function check_tfm(specification,fullname) -- we could split up like afm/o
foundname = findbinfile(fullname, 'ofm') or "" -- not needed in context
end
if foundname == "" then
- foundname = fonts.names.getfilename(fullname,"tfm")
+ foundname = fonts.names.getfilename(fullname,"tfm") or ""
end
if foundname ~= "" then
specification.filename = foundname