diff options
author | Marius <mariausol@gmail.com> | 2011-06-20 16:50:10 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-06-20 16:50:10 +0300 |
commit | 06465c8428905be5c083c70f4e7de6a59d129139 (patch) | |
tree | 4141cc479a1d8dfc991e3aa04d62a31752bfdec0 /tex/context/base/font-ctx.lua | |
parent | a12c76dbfcdf2a4159ba03613ba990a57b9b1ce0 (diff) | |
download | context-06465c8428905be5c083c70f4e7de6a59d129139.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) |