summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-con.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-04-03 22:35:21 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-04-03 22:35:21 +0200
commit1e5d7f41ddede5e6400a2a7762032823d3545df4 (patch)
treebf53397fbdd2b85c94db72321e7d0e466d02acd5 /tex/context/base/mkiv/font-con.lua
parent0175a693fcb853ecce7d49f6564895c2dbfd11f1 (diff)
downloadcontext-1e5d7f41ddede5e6400a2a7762032823d3545df4.tar.gz
2018-04-03 22:30:00
Diffstat (limited to 'tex/context/base/mkiv/font-con.lua')
-rw-r--r--tex/context/base/mkiv/font-con.lua28
1 files changed, 26 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index 9cffa5927..add646da1 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -492,6 +492,15 @@ function constructors.scale(tfmdata,specification)
else
target.slant = 0
end
+ -- effects
+ local mode = parameters.mode or 0
+ if mode ~= 0 then
+ target.mode = mode
+ end
+ local width = parameters.width or 0
+ if width ~= 0 then
+ target.width = width
+ end
--
targetparameters.factor = delta
targetparameters.hfactor = hdelta
@@ -499,6 +508,8 @@ function constructors.scale(tfmdata,specification)
targetparameters.size = scaledpoints
targetparameters.units = units
targetparameters.scaledpoints = askedscaledpoints
+ targetparameters.mode = mode
+ targetparameters.width = width
--
local isvirtual = properties.virtualized or tfmdata.type == "virtual"
local hasquality = parameters.expansion or parameters.protrusion
@@ -875,12 +886,15 @@ function constructors.scale(tfmdata,specification)
--
constructors.aftercopyingcharacters(target,tfmdata)
--
- constructors.trytosharefont(target,tfmdata)
+ constructors.trytosharefont(target,tfmdata)
--
-- catch inconsistencies
--
local vfonts = target.fonts
- if isvirtual then
+-- if isvirtual then
+if isvirtual or target.type == "virtual" or properties.virtualized then
+ properties.virtualized = true
+target.type = "virtual"
if not vfonts or #vfonts == 0 then
target.fonts = { { id = 0 } }
end
@@ -925,6 +939,14 @@ function constructors.finalize(tfmdata)
parameters.size = tfmdata.size
end
--
+ if not parameters.mode then
+ parameters.mode = 0
+ end
+ --
+ if not parameters.width then
+ parameters.width = 0
+ end
+ --
if not parameters.extendfactor then
parameters.extendfactor = tfmdata.extend or 0
end
@@ -1023,6 +1045,8 @@ function constructors.finalize(tfmdata)
tfmdata.step = nil
tfmdata.extend = nil
tfmdata.slant = nil
+ tfmdata.mode = nil
+ tfmdata.width = nil
tfmdata.units = nil
tfmdata.units_per_em = nil
--