summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-tfm.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-01-05 11:45:00 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-01-05 11:45:00 +0100
commit6032373f72b7980d5b197eb371f1d56ecb800ee8 (patch)
treea4b8909aea02ccedcffac468dc80e5c7d88850e6 /tex/context/base/mkiv/font-tfm.lua
parenta04a6e9b9b68a836f27d971115fd1049c04e6c19 (diff)
downloadcontext-6032373f72b7980d5b197eb371f1d56ecb800ee8.tar.gz
2021-01-05 10:44:00
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