From f3157085de19cbc6cee3ade6d9e4e705675196a3 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 5 Oct 2019 16:12:50 +0200 Subject: 2019-10-05 14:54:00 --- tex/context/base/mkiv/font-ogr.lua | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'tex/context/base/mkiv/font-ogr.lua') 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) -- cgit v1.2.3