summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-con.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-06-06 13:57:28 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-06-06 13:57:28 +0200
commit5e668aa418d6d082446e9369ae06625b50e49943 (patch)
tree8f6acc7855a1f43463d7ac6ae28c6ecc7c42c958 /tex/context/base/mkiv/font-con.lua
parent32f8047624c2fa49c3031a66edb5a039a813f276 (diff)
downloadcontext-5e668aa418d6d082446e9369ae06625b50e49943.tar.gz
2017-06-06 13:28:00
Diffstat (limited to 'tex/context/base/mkiv/font-con.lua')
-rw-r--r--tex/context/base/mkiv/font-con.lua26
1 files changed, 22 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index e328d56d2..5a19d84ee 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -345,10 +345,6 @@ function constructors.scale(tfmdata,specification)
local defaultdepth = resources.defaultdepth or 0
local units = parameters.units or 1000
--
- if target.fonts then
- target.fonts = fastcopy(target.fonts) -- maybe we virtualize more afterwards
- end
- --
-- boundary keys are no longer needed as we now have a string 'right_boundary'
-- that can be used in relevant tables (kerns and ligatures) ... not that I ever
-- used them
@@ -453,6 +449,13 @@ function constructors.scale(tfmdata,specification)
local writingmode = properties.writingmode or "horizontal"
local identity = properties.identity or "horizontal"
--
+ local vfonts = target.fonts
+ if vfonts and #vfonts > 0 then
+ target.fonts = fastcopy(vfonts) -- maybe we virtualize more afterwards
+ elseif isvirtual then
+ target.fonts = { { id = 0 } } -- catch error
+ end
+ --
if changed and not next(changed) then
changed = false
end
@@ -806,6 +809,21 @@ function constructors.scale(tfmdata,specification)
--
constructors.trytosharefont(target,tfmdata)
--
+ -- catch incosnistencies
+ --
+ local vfonts = target.fonts
+ if isvirtual then
+ if not vfonts or #vfonts == 0 then
+ target.fonts = { { id = 0 } }
+ end
+ elseif vfonts then
+ properties.virtualized = true
+ target.type = "virtual"
+ if #vfonts == 0 then
+ target.fonts = { { id = 0 } }
+ end
+ end
+ --
return target
end