summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-ogr.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-ogr.lua')
-rw-r--r--tex/context/base/mkiv/font-ogr.lua27
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)