diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-03-10 15:42:39 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-03-10 15:42:39 +0100 |
commit | 0b0256403b7e111df0ecdb8ca589f20df787dacd (patch) | |
tree | 49b02d80ccbb26aa235351ae3dfd2d099635ea72 /tex/context/base/mkiv/font-hsh.lua | |
parent | 631a40d69d7fb4e5beff90039d21da5472dd1020 (diff) | |
download | context-0b0256403b7e111df0ecdb8ca589f20df787dacd.tar.gz |
2020-03-10 14:47:00
Diffstat (limited to 'tex/context/base/mkiv/font-hsh.lua')
-rw-r--r-- | tex/context/base/mkiv/font-hsh.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/font-hsh.lua b/tex/context/base/mkiv/font-hsh.lua index 8d1e85145..7e90e1502 100644 --- a/tex/context/base/mkiv/font-hsh.lua +++ b/tex/context/base/mkiv/font-hsh.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['font-hsh'] = { local rawget = rawget local setmetatableindex = table.setmetatableindex -local currentfont = font.current +local currentfont = font and font.current -- used in the web service local allocate = utilities.storage.allocate local fonts = fonts @@ -103,7 +103,7 @@ setmetatableindex(identifiers, function(t,k) return k == true and identifiers[currentfont()] or nulldata end) -do +if font then -- to be used @@ -370,8 +370,12 @@ setmetatableindex(variants, function(t,k) end end) -function font.getfont(id) - return identifiers[id] +if font then + + function font.getfont(id) + return identifiers[id] + end + end -- font.setfont = currentfont -- bah, no native 'setfont' as name |