diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-08-08 18:39:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-08-08 18:39:00 +0200 |
commit | b7c9a60459b89987576c3aba5b5c9e476275cd7d (patch) | |
tree | bce23153c6680f83a84cb0d53ef4a68dd4260bc5 /tex/context/base/font-ctx.lua | |
parent | f6db6e1eedd11bd472f4e8f3d2e44c1c57794a02 (diff) | |
download | context-b7c9a60459b89987576c3aba5b5c9e476275cd7d.tar.gz |
beta 2013.08.08 18:39
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 7388a49ca..229915fb8 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -1003,6 +1003,7 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature -- characters[0x2007] = { width = characters[0x0030] and characters[0x0030].width or parameters.space } -- figure -- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period -- + constructors.checkvirtualids(tfmdata) -- experiment, will become obsolete when slots can selfreference local id = font.define(tfmdata) csnames[id] = specification.cs tfmdata.properties.id = id @@ -1085,6 +1086,7 @@ function definers.define(specification) end return tfmdata, fontdata[tfmdata] else + constructors.checkvirtualids(tfmdata) -- experiment, will become obsolete when slots can selfreference local id = font.define(tfmdata) tfmdata.properties.id = id definers.register(tfmdata,id) @@ -1613,8 +1615,11 @@ function constructors.checkvirtualids(tfmdata) local selfid = font.nextid() if fonts and #fonts > 0 then for i=1,#fonts do - if fonts[i][2] == 0 then - fonts[i][2] = selfid + local fi = fonts[i] + if fi[2] == 0 then + fi[2] = selfid + elseif fi.id == 0 then + fi.id = selfid end end else |