diff options
author | Marius <mariausol@gmail.com> | 2013-04-19 17:40:26 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-04-19 17:40:26 +0300 |
commit | b7e0ad6611d168a628cd644b4c6c7a83788e483a (patch) | |
tree | 72c8e0d8fa4899ce271636bfa6da99a3bcf058fa /tex/context/base/font-ctx.lua | |
parent | 4586560fc032bd763deee980ed5238511be88ba9 (diff) | |
download | context-b7e0ad6611d168a628cd644b4c6c7a83788e483a.tar.gz |
beta 2013.04.19 16:29
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index cb640b892..c894660d5 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -959,7 +959,7 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature csnames[tfmdata] = specification.cs tex.definefont(global,cs,tfmdata) -- resolved (when designsize is used): - setsomefontsize(fontdata[tfmdata].parameters.size .. "sp") + setsomefontsize((fontdata[tfmdata].parameters.size or 0) .. "sp") lastfontid = tfmdata else -- setting the extra characters will move elsewhere @@ -1533,6 +1533,22 @@ end) to scale virtual characters.</p> --ldx]]-- +function constructors.checkvirtualids(tfmdata) + -- begin of experiment: we can use { "slot", 0, number } in virtual fonts + local fonts = tfmdata.fonts + 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 + end + end + else + -- tfmdata.fonts = { "id", selfid } -- conflicts with other next id's (vf math), too late anyway + end + -- end of experiment +end + -- function constructors.getvirtualid(tfmdata) -- -- since we don't know the id yet, we use 0 as signal -- local tf = tfmdata.fonts |