summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ctx.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-04-19 16:29:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-04-19 16:29:00 +0200
commit7b107268d43038815d72037d28dbb3a3e4331d64 (patch)
treeab683af201b7baeeaf557f3bd829792a9c4e019a /tex/context/base/font-ctx.lua
parentb5f4e5df1fd7d3a868e190fc1df83b82a140e8d9 (diff)
downloadcontext-7b107268d43038815d72037d28dbb3a3e4331d64.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.lua18
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