[latex3-commits] [git/LaTeX3-latex3-luaotfload] bidi-dev: Mirror is separate now (217786d)

Marcel Fabian Krüger tex at 2krueger.de
Sun Aug 25 23:35:21 CEST 2019


Repository : https://github.com/latex3/luaotfload
On branch  : bidi-dev
Link       : https://github.com/latex3/luaotfload/commit/217786dbb270fefbf33f051a1ac854e8a63978b1

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

commit 217786dbb270fefbf33f051a1ac854e8a63978b1
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun Aug 25 23:20:41 2019 +0200

    Mirror is separate now


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

217786dbb270fefbf33f051a1ac854e8a63978b1
 src/luaotfload-bidi.lua                            | 17 -----------------
 texmf/tex/latex-dev/luaotfload/luaotfload-bidi.lua | 17 -----------------
 2 files changed, 34 deletions(-)

diff --git a/src/luaotfload-bidi.lua b/src/luaotfload-bidi.lua
index 0d5f764..2f4ec05 100644
--- a/src/luaotfload-bidi.lua
+++ b/src/luaotfload-bidi.lua
@@ -97,18 +97,6 @@ for k, v in pairs(bidi_brackets) do
   bidi_brackets_canonical[k] = bidi_brackets_canonical[k] or k
 end
 
-local opentype_mirroring do
-  local entry = lpeg.Cg(codepoint * '; ' * codepoint * ' ')^-1 * (1-lpeg.P'\n')^0 * '\n'
-  local file = lpeg.Cf(
-      lpeg.Ct''
-    * entry^0
-  , rawset)
-
-  local f = io.open(kpse.find_file"BidiMirroring-510.txt")
-  opentype_mirroring = file:match(f:read'*a')
-  f:close()
-end
-
 local bidi_fonts = setmetatable({}, {
   __index = function(t, fid)
     local f = font.getfont(fid)
@@ -599,11 +587,6 @@ function dobidi(head, a, b, c, par_direction)
         setprev(newnext, cur)
         setnext(cur, newnext)
       end
-    elseif level % 2 == 1 and tcur == glyph_id and scur == 0 and bidi_fonts[getfont(cur)] then
-      local char = opentype_mirroring[getchar(cur)]
-      if char then
-        setchar(cur, char)
-      end
     end
   end
   return node.direct.tonode(head)
diff --git a/texmf/tex/latex-dev/luaotfload/luaotfload-bidi.lua b/texmf/tex/latex-dev/luaotfload/luaotfload-bidi.lua
index 0d5f764..2f4ec05 100644
--- a/texmf/tex/latex-dev/luaotfload/luaotfload-bidi.lua
+++ b/texmf/tex/latex-dev/luaotfload/luaotfload-bidi.lua
@@ -97,18 +97,6 @@ for k, v in pairs(bidi_brackets) do
   bidi_brackets_canonical[k] = bidi_brackets_canonical[k] or k
 end
 
-local opentype_mirroring do
-  local entry = lpeg.Cg(codepoint * '; ' * codepoint * ' ')^-1 * (1-lpeg.P'\n')^0 * '\n'
-  local file = lpeg.Cf(
-      lpeg.Ct''
-    * entry^0
-  , rawset)
-
-  local f = io.open(kpse.find_file"BidiMirroring-510.txt")
-  opentype_mirroring = file:match(f:read'*a')
-  f:close()
-end
-
 local bidi_fonts = setmetatable({}, {
   __index = function(t, fid)
     local f = font.getfont(fid)
@@ -599,11 +587,6 @@ function dobidi(head, a, b, c, par_direction)
         setprev(newnext, cur)
         setnext(cur, newnext)
       end
-    elseif level % 2 == 1 and tcur == glyph_id and scur == 0 and bidi_fonts[getfont(cur)] then
-      local char = opentype_mirroring[getchar(cur)]
-      if char then
-        setchar(cur, char)
-      end
     end
   end
   return node.direct.tonode(head)





More information about the latex3-commits mailing list