summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-tfm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-tfm.lua')
-rw-r--r--tex/context/base/mkiv/font-tfm.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua
index 63f3276b1..4dbd5fc66 100644
--- a/tex/context/base/mkiv/font-tfm.lua
+++ b/tex/context/base/mkiv/font-tfm.lua
@@ -150,7 +150,6 @@ local function read_from_tfm(specification)
features.pfbfile = pfbfile
end
end
-
local newtfmdata = (depth[filename] == 1) and tfm.reencode(tfmdata,specification)
if newtfmdata then
tfmdata = newtfmdata
@@ -443,7 +442,7 @@ do
local characters = { }
local originals = tfmdata.characters
local indices = { }
- local parentfont = { "font", 1 }
+ local parentfont = { "font", 1 } -- can be zero (self referencing)
local private = tfmdata.privateoffset or constructors.privateoffset
local reported = encdone[tfmfile][encfile] -- bah, encdone for tfm or pfb ?
-- create characters table
@@ -451,6 +450,14 @@ do
-- vector : pfbindex -> name
-- encoding : tfmindex -> name
+ -- we store the order also because some tex encodings (see math-vfu) needs
+ -- that for remapping with non standard glyphs names cq. lack of unicode
+ -- slot information
+
+ for k, v in next, originals do
+ v.order = k
+ end
+
local backmap = vector and table.swapped(vector)
local done = { } -- prevent duplicate
for tfmindex, name in sortedhash(encoding) do -- predictable order
@@ -462,7 +469,7 @@ do
else
unicode = private
private = private + 1
- if not reported then
+ if trace_defining and not reported then
report_tfm("glyph %a in font %a with encoding %a gets unicode %U",name,tfmfile,encfile,unicode)
end
end