[latex3-commits] [git/LaTeX3-latex3-luaotfload] ignorable: Make invisible chars invisible by default (c30fea4)
Marcel Fabian Krüger
tex at 2krueger.de
Sat Aug 17 17:15:25 CEST 2019
Repository : https://github.com/latex3/luaotfload
On branch : ignorable
Link : https://github.com/latex3/luaotfload/commit/c30fea48d76b183deba2926b814316a3b0a96588
>---------------------------------------------------------------
commit c30fea48d76b183deba2926b814316a3b0a96588
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sat Aug 17 16:51:07 2019 +0200
Make invisible chars invisible by default
>---------------------------------------------------------------
c30fea48d76b183deba2926b814316a3b0a96588
src/luaotfload-notdef.lua | 2 +-
texmf/tex/latex-dev/luaotfload/luaotfload-notdef.lua | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/luaotfload-notdef.lua b/src/luaotfload-notdef.lua
index 2d97777..29162da 100644
--- a/src/luaotfload-notdef.lua
+++ b/src/luaotfload-notdef.lua
@@ -187,7 +187,7 @@ end
otfregister {
name = 'invisible',
description = 'Remove invisible control characters',
- default = false,
+ default = true,
initializers = {
node = invisibleinitialiser,
},
diff --git a/texmf/tex/latex-dev/luaotfload/luaotfload-notdef.lua b/texmf/tex/latex-dev/luaotfload/luaotfload-notdef.lua
index e8356bf..29162da 100644
--- a/texmf/tex/latex-dev/luaotfload/luaotfload-notdef.lua
+++ b/texmf/tex/latex-dev/luaotfload/luaotfload-notdef.lua
@@ -30,6 +30,18 @@ local remove = node.direct.remove
local setfont = node.direct.setfont
local traverse_char = node.direct.traverse_char
+-- According to DerivedCoreProperties.txt, Default_Ignorable_Code_Point
+-- is generated from:
+-- Other_Default_Ignorable_Code_Point
+-- + Cf (Format characters)
+-- + Variation_Selector
+-- - White_Space
+-- - FFF9..FFFB (Interlinear annotation format characters)
+-- - 13430..13438 (Egyptian hieroglyph format characters)
+-- - Prepended_Concatenation_Mark (Exceptional format characters that should be visible)
+-- Based on HarfBuzz, we add the exclusion
+-- - Lo (Letter, Other)
+-- This affects Hangul fillers.
local ignorable_codepoints do
local sep = lpeg.P' '^0 * ';' * lpeg.P' '^0
local codepoint = lpeg.S'0123456789ABCDEF'^4/function(c)return tonumber(c, 16)end
@@ -52,7 +64,7 @@ local ignorable_codepoints do
+ 'Variation_Selector' * lpeg.Cc(true)
+ 'White_Space' * lpeg.Cc(nil)
+ 'Prepended_Concatenation_Mark' * lpeg.Cc(nil)
- ) * lpeg.P' '^0 * '#')^-1 * (1-lpeg.P'\n')^0 * '\n'
+ ) * ' # ' * (1-lpeg.P'Lo'))^-1 * (1-lpeg.P'\n')^0 * '\n'
file = lpeg.Cf(
lpeg.Carg(1)
* entry^0
@@ -175,7 +187,7 @@ end
otfregister {
name = 'invisible',
description = 'Remove invisible control characters',
- default = false,
+ default = true,
initializers = {
node = invisibleinitialiser,
},
More information about the latex3-commits
mailing list