summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-con.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-con.lua')
-rw-r--r--tex/context/base/mkiv/font-con.lua57
1 files changed, 25 insertions, 32 deletions
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index 9f85ee208..93ce9f5da 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -547,7 +547,6 @@ function constructors.scale(tfmdata,specification)
local hasitalics = properties.hasitalics
local autoitalicamount = properties.autoitalicamount
local stackmath = not properties.nostackmath
- local nonames = properties.noglyphnames
local haskerns = properties.haskerns or properties.mode == "base" -- we can have afm in node mode
local hasligatures = properties.hasligatures or properties.mode == "base" -- we can have afm in node mode
local realdimensions = properties.realdimensions
@@ -677,9 +676,10 @@ function constructors.scale(tfmdata,specification)
description = descriptions[unicode] or character
index = description.index or unicode
end
- local width = description.width
- local height = description.height
- local depth = description.depth
+ local width = description.width
+ local height = description.height
+ local depth = description.depth
+ local isunicode = description.unicode
if realdimensions then
-- this is mostly for checking issues
if not height or height == 0 then
@@ -706,16 +706,16 @@ function constructors.scale(tfmdata,specification)
-- if depth then depth = vdelta*depth else depth = scaleddepth end
if depth and depth ~= 0 then
depth = delta*depth
- if nonames then
+ if isunicode then
chr = {
- index = index,
- height = height,
- depth = depth,
- width = width,
+ index = index,
+ height = height,
+ depth = depth,
+ width = width,
+ unicode = isunicode,
}
else
chr = {
- name = description.name,
index = index,
height = height,
depth = depth,
@@ -723,36 +723,23 @@ function constructors.scale(tfmdata,specification)
}
end
else
- -- this saves a little bit of memory time and memory, esp for big cjk fonts
- if nonames then
+ if isunicode then
chr = {
- index = index,
- height = height,
- width = width,
+ index = index,
+ height = height,
+ width = width,
+ unicode = isunicode,
}
else
chr = {
- name = description.name,
index = index,
height = height,
width = width,
}
end
end
- local isunicode = description.unicode
if addtounicode then
- if isunicode then
- chr.unicode = isunicode
- chr.tounicode = tounicode(isunicode)
- -- in luatex > 0.85 we can do this:
- -- chr.tounicode = isunicode
- else
- chr.tounicode = unknowncode
- end
- else
- if isunicode then
- chr.unicode = isunicode
- end
+ chr.tounicode = isunicode and tounicode(isunicode) or unknowncode
end
if hasquality then
-- we could move these calculations elsewhere (saves calculations)
@@ -827,7 +814,10 @@ function constructors.scale(tfmdata,specification)
if stackmath then
local mk = character.mathkerns
if mk then
- local tr, tl, br, bl = mk.topright, mk.topleft, mk.bottomright, mk.bottomleft
+ local tr = mk.topright
+ local tl = mk.topleft
+ local br = mk.bottomright
+ local bl = mk.bottomleft
chr.mathkern = { -- singular -> should be patched in luatex !
top_right = tr and mathkerns(tr,vdelta) or nil,
top_left = tl and mathkerns(tl,vdelta) or nil,
@@ -1174,7 +1164,9 @@ loose our testcases for <l n='luatex'/>.</p>
--ldx]]--
function constructors.hashinstance(specification,force)
- local hash, size, fallbacks = specification.hash, specification.size, specification.fallbacks
+ local hash = specification.hash
+ local size = specification.size
+ local fallbacks = specification.fallbacks
if force or not hash then
hash = constructors.hashfeatures(specification)
specification.hash = hash
@@ -1612,7 +1604,8 @@ end
-- while typesetting
function constructors.collectprocessors(what,tfmdata,features,trace,report)
- local processes, nofprocesses = { }, 0
+ local processes = { }
+ local nofprocesses = 0
if features and next(features) then
local properties = tfmdata.properties
local whathandler = handlers[what]