[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Fix script selection (4120e0e)

Marcel Fabian Krüger tex at 2krueger.de
Sun Nov 10 09:33:42 CET 2019


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/4120e0ee925c4419ac00d15bec6229956082eecd

>---------------------------------------------------------------

commit 4120e0ee925c4419ac00d15bec6229956082eecd
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun Nov 10 09:33:42 2019 +0100

    Fix script selection


>---------------------------------------------------------------

4120e0ee925c4419ac00d15bec6229956082eecd
 src/luaotfload-scripts.lua | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/luaotfload-scripts.lua b/src/luaotfload-scripts.lua
index 2cb2e0b..062a2a5 100644
--- a/src/luaotfload-scripts.lua
+++ b/src/luaotfload-scripts.lua
@@ -67,7 +67,7 @@ local function script_to_iso(tag)
   tag = tag:lower()
   tag = canonical_name[tag] or tag
   local stripped, did_strip = tag:gsub("%d$", "")
-  tag = did_strip and versioned_script[stripped] or tag
+  tag = did_strip == 1 and versioned_script[stripped] or tag
   local tag_length = #tag
   if tag_length == 4 then return tag end -- Optimization for common case
   -- I promise you, I am not making this one up
@@ -76,9 +76,9 @@ end
 
 local function to_harfbuzz(script, language)
   local otscript = script_to_iso(script)
-  if script_to_ot(otscript) == script then
-    return otscript, language
-  end
+  -- if script_to_ot(otscript) == script then
+  --   return otscript, language
+  -- end
   return otscript, "x-hbot" .. language .. "-hbsc" .. script
 end
 





More information about the latex3-commits mailing list