summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-enh.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-09 20:47:50 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-06-09 20:47:50 +0200
commitbe735a865e2bdc6b7ac57161a24e4911741024f1 (patch)
tree583ffc0d91324da3b4f1239449bbcdf8e28a8ec3 /tex/context/base/mkiv/font-enh.lua
parent4e4dcdd6d58631f6b260dbc16007152ac14d9677 (diff)
downloadcontext-be735a865e2bdc6b7ac57161a24e4911741024f1.tar.gz
2016-06-09 19:28:00
Diffstat (limited to 'tex/context/base/mkiv/font-enh.lua')
-rw-r--r--tex/context/base/mkiv/font-enh.lua25
1 files changed, 9 insertions, 16 deletions
diff --git a/tex/context/base/mkiv/font-enh.lua b/tex/context/base/mkiv/font-enh.lua
index 99b5c597b..b1fcd9be8 100644
--- a/tex/context/base/mkiv/font-enh.lua
+++ b/tex/context/base/mkiv/font-enh.lua
@@ -118,19 +118,16 @@ local registerotffeature = otffeatures.register
local function initializeunicoding(tfmdata)
local goodies = tfmdata.goodies
local newcoding = nil
- -- local tounicode = false
for i=1,#goodies do
local remapping = goodies[i].remapping
if remapping and remapping.unicodes then
newcoding = remapping.unicodes -- names to unicodes
- -- tounicode = remapping.tounicode -- not used
end
end
if newcoding then
local characters = tfmdata.characters
local descriptions = tfmdata.descriptions
local oldcoding = tfmdata.resources.unicodes
- -- local tounicodes = tfmdata.resources.tounicode -- index to unicode
local originals = { }
for name, newcode in next, newcoding do
local oldcode = oldcoding[name]
@@ -142,25 +139,21 @@ local function initializeunicoding(tfmdata)
end
if oldcode then
local original = originals[oldcode]
+ local character, description
if original then
- characters [newcode] = original.character
- descriptions[newcode] = original.description
+ character = original.character
+ description = original.description
else
- characters [newcode] = characters [oldcode]
- descriptions[newcode] = descriptions[oldcode]
+ character = characters [oldcode]
+ description = descriptions[oldcode]
end
+ characters [newcode] = character
+ descriptions[newcode] = description
+ character .unicode = newcode
+ description.unicode = newcode
else
oldcoding[name] = newcode
end
- -- if tounicode then
- -- local description = descriptions[newcode]
- -- if description then
- -- local index = description.index
- -- if not tounicodes[index] then
- -- tounicodes[index] = tosixteen(newcode) -- shared (we could have a metatable)
- -- end
- -- end
- -- end
if trace_unicoding then
if oldcode then
report_unicoding("aliasing glyph %a from %U to %U",name,oldcode,newcode)