summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luaotfload/fontloader-l-table.lua
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-21 03:03:40 +0000
committerNorbert Preining <norbert@preining.info>2023-08-21 03:03:40 +0000
commitf4e4c48e897bec27fd8d07ba278c03c6f0c64336 (patch)
treeb8c47431b940055b5095271c39a9db123375efd6 /macros/luatex/generic/luaotfload/fontloader-l-table.lua
parent53b22757814343c6071be2e64dc0639f7afc5468 (diff)
CTAN sync 202308210303
Diffstat (limited to 'macros/luatex/generic/luaotfload/fontloader-l-table.lua')
-rw-r--r--macros/luatex/generic/luaotfload/fontloader-l-table.lua24
1 files changed, 20 insertions, 4 deletions
diff --git a/macros/luatex/generic/luaotfload/fontloader-l-table.lua b/macros/luatex/generic/luaotfload/fontloader-l-table.lua
index c20bd4733c..b6c3744b8b 100644
--- a/macros/luatex/generic/luaotfload/fontloader-l-table.lua
+++ b/macros/luatex/generic/luaotfload/fontloader-l-table.lua
@@ -711,7 +711,11 @@ local function do_serialize(root,name,depth,level,indexed)
elseif tv == "number" then
if tk == "number" then
if hexify then
- handle(format("%s [0x%X]=0x%X,",depth,k,v))
+ if accurate then
+ handle(format("%s [0x%X]=%q,",depth,k,v))
+ else
+ handle(format("%s [0x%X]=%s,",depth,k,v))
+ end
elseif accurate then
handle(format("%s [%s]=%q,",depth,k,v))
else
@@ -719,7 +723,11 @@ local function do_serialize(root,name,depth,level,indexed)
end
elseif tk == "boolean" then
if hexify then
- handle(format("%s [%s]=0x%X,",depth,k and "true" or "false",v))
+ if accurate then
+ handle(format("%s [%s]=%q,",depth,k and "true" or "false",v))
+ else
+ handle(format("%s [%s]=%s,",depth,k and "true" or "false",v))
+ end
elseif accurate then
handle(format("%s [%s]=%q,",depth,k and "true" or "false",v))
else
@@ -729,7 +737,11 @@ local function do_serialize(root,name,depth,level,indexed)
-- ignore
elseif noquotes and not reserved[k] and lpegmatch(propername,k) then
if hexify then
- handle(format("%s %s=0x%X,",depth,k,v))
+ if accurate then
+ handle(format("%s %s=%q,",depth,k,v))
+ else
+ handle(format("%s %s=%s,",depth,k,v))
+ end
elseif accurate then
handle(format("%s %s=%q,",depth,k,v))
else
@@ -737,7 +749,11 @@ local function do_serialize(root,name,depth,level,indexed)
end
else
if hexify then
- handle(format("%s [%q]=0x%X,",depth,k,v))
+ if accurate then
+ handle(format("%s [%q]=%q,",depth,k,v))
+ else
+ handle(format("%s [%q]=%s,",depth,k,v))
+ end
elseif accurate then
handle(format("%s [%q]=%q,",depth,k,v))
else