diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-06-19 14:17:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-06-19 14:17:00 +0200 |
commit | 4001733dc25cb6743004db0e9319708481d91135 (patch) | |
tree | 00b7792d817903c03a1b05be4c961282c63e229d /tex/context/base/font-ctx.lua | |
parent | 6a36a76d35fcc0f4fea1f492e0c31d57e126a014 (diff) | |
download | context-4001733dc25cb6743004db0e9319708481d91135.tar.gz |
beta 2011.06.19 14:17
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 9f2e4f255..5b8a4e8ec 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -114,6 +114,7 @@ hashes.characters = chardata hashes.parameters = parameters hashes.quads = quaddata hashes.xheights = xheightdata +hashes.csnames = csnames setmetatableindex(chardata, function(t,k) local characters = fontdata[k].characters @@ -714,10 +715,6 @@ function definers.stage_two(global,cs,str,size,inheritancemode,classfeatures,fon end end local tfmdata = definers.read(specification,size) -- id not yet known - local cs = specification.cs - if cs then - csnames[cs] = tfmdata -- new (beware: locals can be forgotten) - end if not tfmdata then report_defining("unable to define %s as \\%s",name,cs) texsetcount("global","lastfontid",-1) @@ -727,6 +724,7 @@ function definers.stage_two(global,cs,str,size,inheritancemode,classfeatures,fon report_defining("reusing %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s)", name,tfmdata,cs,classfeatures,fontfeatures,classfallbacks,fontfallbacks,classgoodies,goodies) end + csnames[tfmdata] = specification.cs tex.definefont(global,cs,tfmdata) -- resolved (when designsize is used): setsomefontsize(fontdata[tfmdata].parameters.size .. "sp") @@ -743,6 +741,7 @@ function definers.stage_two(global,cs,str,size,inheritancemode,classfeatures,fon -- characters[0x2008] = { width = characters[0x002E] and characters[0x002E].width or parameters.space } -- period -- local id = font.define(tfmdata) + csnames[id] = specification.cs tfmdata.properties.id = id definers.register(tfmdata,id) -- to be sure, normally already done tex.definefont(global,cs,id) |