From adc43c3c243ed95215af6fe02d71e393c178da23 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Thu, 19 Nov 2015 20:15:06 +0100 Subject: 2015-11-19 19:15:00 --- tex/context/base/font-hsh.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tex/context/base/font-hsh.lua') 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 -- cgit v1.2.3