diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-10-05 16:12:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-10-05 16:12:50 +0200 |
commit | f3157085de19cbc6cee3ade6d9e4e705675196a3 (patch) | |
tree | 7eea7710e9a533170911ad6fc34503c2910598c9 /tex/context/base/mkiv/font-ogr.lua | |
parent | 6f2d249bfb4ead58ed709e59c403df9457f51982 (diff) | |
download | context-f3157085de19cbc6cee3ade6d9e4e705675196a3.tar.gz |
2019-10-05 14:54:00
Diffstat (limited to 'tex/context/base/mkiv/font-ogr.lua')
-rw-r--r-- | tex/context/base/mkiv/font-ogr.lua | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/tex/context/base/mkiv/font-ogr.lua b/tex/context/base/mkiv/font-ogr.lua index ed5bc709b..5d45c3c5b 100644 --- a/tex/context/base/mkiv/font-ogr.lua +++ b/tex/context/base/mkiv/font-ogr.lua @@ -202,18 +202,23 @@ do end function dropins.registerglyph(parameters) - local category = parameters.category - local unicode = parameters.unicode - local unitype = type(unicode) - if unitype == "string" then - local uninumber = tonumber(unicode) - if uninumber then - unicode = round(uninumber) - else - unicode = utfbyte(unicode) + local category = parameters.category + local unicode = parameters.unicode + local unichar = parameters.unichar + if type(unichar) == "string" then + unicode = utfbyte(unichar) + else + local unitype = type(unicode) + if unitype == "string" then + local uninumber = tonumber(unicode) + if uninumber then + unicode = round(uninumber) + else + unicode = utfbyte(unicode) + end + elseif unitype == "number" then + unicode = round(unicode) end - elseif unitype == "number" then - unicode = round(unicode) end parameters.unicode = unicode -- print(category,unicode) |