diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua | 68 |
1 files changed, 30 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua index 9f85ee20839..9def52ef02c 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-font-con.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-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 @@ -596,7 +595,6 @@ function constructors.scale(tfmdata,specification) targetparameters.descender = delta * descender end -- --- inspect(targetparameters) constructors.enhanceparameters(targetparameters) -- official copies for us, now virtual -- local protrusionfactor = (targetquad ~= 0 and 1000/targetquad) or 0 @@ -677,9 +675,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 +705,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 +722,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 +813,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, @@ -1037,11 +1026,11 @@ function constructors.finalize(tfmdata) properties.virtualized = tfmdata.type == "virtual" end -- - properties.fontname = tfmdata.fontname - properties.filename = tfmdata.filename - properties.fullname = tfmdata.fullname - properties.name = tfmdata.name - properties.psname = tfmdata.psname + properties.fontname = properties.fontname or tfmdata.fontname + properties.filename = properties.filename or tfmdata.filename + properties.fullname = properties.fullname or tfmdata.fullname + properties.name = properties.name or tfmdata.name + properties.psname = properties.psname or tfmdata.psname -- properties.encodingbytes = tfmdata.encodingbytes or 1 properties.embedding = tfmdata.embedding or "subset" @@ -1174,7 +1163,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 +1603,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] |