summaryrefslogtreecommitdiff
path: root/tex/context/base/font-hsh.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-hsh.lua')
-rw-r--r--tex/context/base/font-hsh.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/tex/context/base/font-hsh.lua b/tex/context/base/font-hsh.lua
index 46d82d78f..efd042fe1 100644
--- a/tex/context/base/font-hsh.lua
+++ b/tex/context/base/font-hsh.lua
@@ -96,6 +96,26 @@ setmetatableindex(identifiers, function(t,k)
return k == true and identifiers[currentfont()] or nulldata
end)
+do
+
+ -- to be used
+
+ local define = font.define
+ local setfont = font.setfont
+ local frozen = font.frozen
+
+ function fonts.reserveid(fontdata)
+ return define(fontdata or nulldata)
+ end
+
+ function fonts.enhanceid(id,fontdata)
+ if not frozen(id) then
+ setfont(id,fontdata)
+ end
+ end
+
+end
+
setmetatableindex(characters, function(t,k)
if k == true then
return characters[currentfont()]
@@ -325,3 +345,5 @@ end)
function font.getfont(id)
return identifiers[id]
end
+
+font.setfont = currentfont -- bah, no native 'setfont' as name