[latex3-commits] [git/LaTeX3-latex3-luaotfload] nfc: NFC normalize node list for node shaper by default (98703b8)

Marcel Fabian Krüger tex at 2krueger.de
Mon Jul 5 16:06:49 CEST 2021


Repository : https://github.com/latex3/luaotfload
On branch  : nfc
Link       : https://github.com/latex3/luaotfload/commit/98703b8bcf1c015d33713db018790f73a04264ca

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

commit 98703b8bcf1c015d33713db018790f73a04264ca
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Jul 5 15:10:46 2021 +0200

    NFC normalize node list for node shaper by default


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

98703b8bcf1c015d33713db018790f73a04264ca
 src/luaotfload-features.lua | 13 +++++++++++++
 testfiles/arab1.tlg         |  2 +-
 testfiles/arab2.tlg         |  4 ++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 550fe12..3630ba0 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -831,6 +831,19 @@ do
     }
 end
 
+local uni_normalize = require'lua-uni-normalize'.direct.NFC
+fonts.constructors.features.otf.register {
+    name = 'nfc',
+    default = true,
+    description = 'Normalize text to NFC before shaping',
+    processors = {
+      node = function(head, f, _, _, _)
+          return uni_normalize(head, f, font.getfont(f).characters, true)
+      end,
+    },
+}
+
+
 return function ()
     if not fonts and fonts.handlers then
         report ("log", 0, "features",
diff --git a/testfiles/arab1.tlg b/testfiles/arab1.tlg
index ea8a42f..255f342 100644
--- a/testfiles/arab1.tlg
+++ b/testfiles/arab1.tlg
@@ -1,7 +1,7 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
 [9:?]<+TLT><+TRT>[0:3]<984508><1615><985942><1614><983384>[12:13]<1608><1614><986340><1616><986358><1614><983384><1585><1615><1607><1615><-TRT>[14:2][12:15]
-[9:?]<+TLT><+TRT>[0:3]<1571><987341><986421><1614><986492>[12:13]<983743><1614><983521><1616><983446><983716><1612>[12:13]<1573><983282><986478><1614><986492>[12:13]<984508><1615><985942><1614><983384>[12:13]<983446><1614><983789><983692><1615><983431><1615>[12:13]<983700><1616><983497><983615><1615>[12:13]<986340><1616><986358><1614><983384><1585><1614><1607><1615>[12:13]<983686><1616><984676><1614><984717>[13:0]<983646><1614><983494><1614><983615><1615>[12:13]<986460><1616><986498>[12:13]<983762><1614><983555><983731><1614><1577><1613>[12:13]<983541><1614><983748><1616><984676><984717><1614><1577><1613>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615><58>[12:13]<983762><1614><983805><1601><1614>[12:13]<1571><983280><983406><1616><983487><983521><1615><1607><1615>[12:13]<1573><983282><983686><1614><983487><983628><1614>[12:13]<986460><1616><986498>[12:13]<1575><984361><984365><1614><983773><1614><983388><1569><1616>[12:13]<1608><1614><1571><987341><1583><983542><1614><983399><1615>[12:13]<986714><1614><986734><1614>[12:13]<1571><983280><985355><985380><1614><1577><1611><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<984508><1615><985942><1614><983384><58>[12:13]<1571><987341><985923><1614><983384>[12:13]<1570><983762><1616><983531><1612>[12:13]<985745><1616><983521><1617><983277><1575>[12:13]<1571><987341><986418><1617><1616><986498>[12:13]<984368><1614><984373>[12:13]<1571><987341><983762><983500><1614><983789><1616><983487><983399><1615>[12:13]<1571><987341><1606>[12:13]<1571><983280><983582><1614><983554><1617><1616><983716><1614>[12:13]<986714><1614><986734><1614>[12:13]<1585><1614><983401><983494><1614><983500><1614><983628><1614>[12:13]<983542><1614><983384><984384><984389><1616><984405><1614><983384><1585><1615>[12:13]<983686><1614><985860><983751><1614>[12:13]<983620><1615><983497><1614><983384>[12:13]<1575><983686><983487><1614><983805><1605><1614><983276>[12:13]<1608><1614><983541><1614><983494><983680><1614>[12:13]<1571><987341><1606>[12:13]<983446><1615><983997><1616><984012><1617><983278>[12:13]<984508><1615><985942><1614><983384>[12:13]<986042><1614><986118><1614><984939><983700><1614><983615><1615>[12:13]<984086><1614><984113><1614><1571><987341>[12:13]<1575><984384><984389><1616><984405><1614><983384><1585><1615>[12:13]<987680><1614><986684><986702><1614><983716><1615>[12:13]<986460><1616><986498>[12:13]<1573><983282><983743><983789><1614><983494><986260><1616><986264><1616><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615>[12:13]<983743><1614><983521><1616><983446><983554><1615><983615><1615><58>[12:13]<1573><983282><986418><1617><1616><986498>[12:13]<1571><987341><986361><986376><1614><983399><1615>[12:13]<986340><1616><986358><1614><983384><1585><1614><1603><1614>[12:13]<985913><1614><983384>[12:13]<984508><1615><985942><1614><983384>[12:13]<987680><1614><986684><986702><1614><983716><1615><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615>[12:13]<984508><1615><985942><1614><983384><58>[12:13]<983401><1614><984470>[13:0]<1616><985111><985156><1612>[12:13]<1571><987341><984455><984470><1615><1603><1614>[12:13]<985913><1614><983384>[12:13]<983743><1614><983521><1616><983446><983916><1616><983940>[12:13]<1571><987341><983459><1615><983748><1614><983521><1617><1616><1602><1615>[12:13]<1575><984384><984389><1616><984405><1614><983384><1585><1614>[12:13]<1608><1614><983459><1615><986219><1614><986243><1617><1616><984200><1614><984244><1616><984276><1567><-TRT>[14:2][12:15]
+[9:?]<+TLT><+TRT>[0:3]<1571><987341><986421><1614><986492>[12:13]<983743><1614><983521><1616><983446><983716><1612>[12:13]<1573><983282><986478><1614><986492>[12:13]<984508><1615><985942><1614><983384>[12:13]<983446><1614><983789><983692><1615><983431><1615>[12:13]<983700><1616><983497><983615><1615>[12:13]<986340><1616><986358><1614><983384><1585><1614><1607><1615>[12:13]<983686><1616><984676><1614><984717>[13:0]<983646><1614><983494><1614><983615><1615>[12:13]<986460><1616><986498>[12:13]<983762><1614><983555><983731><1614><1577><1613>[12:13]<983541><1614><983748><1616><984676><984717><1614><1577><1613>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615><58>[12:13]<983762><1614><983805><1601><1614>[12:13]<1571><983280><983406><1616><983487><983521><1615><1607><1615>[12:13]<1573><983282><983686><1614><983487><983628><1614>[12:13]<986460><1616><986498>[12:13]<1575><984361><984365><1614><983773><1614><983388><1569><1616>[12:13]<1608><1614><1571><987341><1583><983542><1614><983399><1615>[12:13]<986714><1614><986734><1614>[12:13]<1571><983280><985355><985380><1614><1577><1611><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<984508><1615><985942><1614><983384><58>[12:13]<1571><987341><985923><1614><983384>[12:13]<1570><983762><1616><983531><1612>[12:13]<985745><1616><983521><1617><983277><1575>[12:13]<1571><987341><986418><1616><1617><986498>[12:13]<984368><1614><984373>[12:13]<1571><987341><983762><983500><1614><983789><1616><983487><983399><1615>[12:13]<1571><987341><1606>[12:13]<1571><983280><983582><1614><983554><1616><1617><983716><1614>[12:13]<986714><1614><986734><1614>[12:13]<1585><1614><983401><983494><1614><983500><1614><983628><1614>[12:13]<983542><1614><983384><984384><984389><1616><984405><1614><983384><1585><1615>[12:13]<983686><1614><985860><983751><1614>[12:13]<983620><1615><983497><1614><983384>[12:13]<1575><983686><983487><1614><983805><1605><1614><983276>[12:13]<1608><1614><983541><1614><983494><983680><1614>[12:13]<1571><987341><1606>[12:13]<983446><1615><983997><1616><984012><1617><983278>[12:13]<984508><1615><985942><1614><983384>[12:13]<986042><1614><986118><1614><984939><983700><1614><983615><1615>[12:13]<984086><1614><984113><1614><1571><987341>[12:13]<1575><984384><984389><1616><984405><1614><983384><1585><1615>[12:13]<987680><1614><986684><986702><1614><983716><1615>[12:13]<986460><1616><986498>[12:13]<1573><983282><983743><983789><1614><983494><986260><1616><986264><1616><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615>[12:13]<983743><1614><983521><1616><983446><983554><1615><983615><1615><58>[12:13]<1573><983282><986418><1616><1617><986498>[12:13]<1571><987341><986361><986376><1614><983399><1615>[12:13]<986340><1616><986358><1614><983384><1585><1614><1603><1614>[12:13]<985913><1614><983384>[12:13]<984508><1615><985942><1614><983384>[12:13]<987680><1614><986684><986702><1614><983716><1615><983276>[12:13]<983542><1614><983554><1614><983384><1604><1614>[12:13]<986254><1614><986264><1615>[12:13]<984508><1615><985942><1614><983384><58>[12:13]<983401><1614><984470>[13:0]<1616><985111><985156><1612>[12:13]<1571><987341><984455><984470><1615><1603><1614>[12:13]<985913><1614><983384>[12:13]<983743><1614><983521><1616><983446><983916><1616><983940>[12:13]<1571><987341><983459><1615><983748><1614><983521><1616><1617><1602><1615>[12:13]<1575><984384><984389><1616><984405><1614><983384><1585><1614>[12:13]<1608><1614><983459><1615><986219><1614><986243><1616><1617><984200><1614><984244><1616><984276><1567><-TRT>[14:2][12:15]
 [2:0]
 [0:2]
 [0:2]
diff --git a/testfiles/arab2.tlg b/testfiles/arab2.tlg
index e7e7b40..42119d5 100644
--- a/testfiles/arab2.tlg
+++ b/testfiles/arab2.tlg
@@ -1,8 +1,8 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-[9:?]<+TLT><+TRT>[0:3]<983700><1616><983705>[12:13]<983762><1615><983805><1585><1614><1577><1616>[12:13]<1575><983686><985870><1617><1616><983773><1614><983388><1569><1616><58><-TRT>[14:2][12:15]
+[9:?]<+TLT><+TRT>[0:3]<983700><1616><983705>[12:13]<983762><1615><983805><1585><1614><1577><1616>[12:13]<1575><983686><985870><1616><1617><983773><1614><983388><1569><1616><58><-TRT>[14:2][12:15]
 [9:?]<+TLT><+TRT>[0:3]<65021><-TRT>[14:2][12:15]
-[9:?]<+TLT><+TRT>[0:3]<985913><1648><983387><987341><986633><1617><983280><986702><1614><983384>[12:13]<1649><986254><1617><983278><986274><1616><984555><984583><1614>[12:13]<1570><983700><1614><983497><1615><983805><1575>[12:13]<984368><1614><984373>[12:13]<985624><1614><985413><1616><983680><1617><983280>[12:13]<983686><987352><1614><984596><1615><987349><1618>[12:13]<1571><987341><1606><1618>[12:13]<983855><1614><983883><1616><983462><1615><983805><1575>[12:13]<1649><983686><985870><1617><1616><983773><1614><983388><1569><1614>[12:13]<984837><1614><984864><1618><983620><1611><983384><1750>[12:13]<1608><1614><984368><1614><984373>[12:13]<983459><1614><983413><1618><983746><1615><983888><1615><983906><983620><1615><983705><1617><983278>[12:13]<983686><1616><983500><1614><983520><1618><983620><1614><983494><1615><983805><1575>[12:13]<985118><1616><984426><1614><983413><1618><983736><1616>[12:13]<983700><1614><983384>[12:13]<1570><985832><1614><985860><1618><983500><1615><983703><1615><983805><983620><1615><983705><1617><983278>[12:13]<1573><983282><984368><1617><983278><984373>[12:13]<1571><987341><1606>[12:13]<985913><1617><983278><983387><983281><983459><1616><985313><985341><1614>[12:13]<983453><1616><983555><1614><983384><983582><1616><983776><1614><983619><1613>[12:13]<983700><1617><983280><983494><1614><985860><1617><1616><983497><1614><983619><1613><1754>[12:13]<1608><1614><985739><1614><983384><985779><1616><985551><1615><1608><983620><1615><983705><1617><983278>[12:13]<985920><1616><983392><984361><1618><985975><1614><983413><1618><983731><1615><1608><1601><1616><1754>[12:13]<983542><1614><983383><983282><1606><1618>[12:13]<984837><1614><984864><1616><983620><1618><983500><1615><983703><1615><983805><983620><1615><983705><1617><983278>[12:13]<983542><1614><983413><1614><985787><1614><985562><1648>[12:13]<1571><987341><1606><1618>[12:13]<983459><1614><984724><1618><984751><1614><983620><1615><983805><1575>[12:13]<983765><1614><983487><1618><987314><1611><983384>[12:13]<1608>[13:0]<1617><983278><985624><1614><985417><1618><983413><1614><983680><1614>[12:13]<1649><983184><983185><1617><1648><983186><1615>[12:13]<983542><1616><983487><983615><1616>[12:13]<985740><1614><984676><1618><984717><1611><1575>[12:13]<983646><1614><983503><1616><984676><984717><1611><1575>[12:13]<987326>[13:0][13:0]<987318>[13:0]<1757><-TRT>[14:2][12:15]
+[9:?]<+TLT><+TRT>[0:3]<985913><1648><983387><987341><986633><1617><983280><986702><1614><983384>[12:13]<1649><986254><1617><983278><986274><1616><984555><984583><1614>[12:13]<1570><983700><1614><983497><1615><983805><1575>[12:13]<984368><1614><984373>[12:13]<985624><1614><985413><1616><983680><1617><983280>[12:13]<983686><987352><1614><984596><1615><987349><1618>[12:13]<1571><987341><1606><1618>[12:13]<983855><1614><983883><1616><983462><1615><983805><1575>[12:13]<1649><983686><985870><1616><1617><983773><1614><983388><1569><1614>[12:13]<984837><1614><984864><1618><983620><1611><983384><1750>[12:13]<1608><1614><984368><1614><984373>[12:13]<983459><1614><983413><1618><983746><1615><983888><1615><983906><983620><1615><983705><1617><983278>[12:13]<983686><1616><983500><1614><983520><1618><983620><1614><983494><1615><983805><1575>[12:13]<985118><1616><984426><1614><983413><1618><983736><1616>[12:13]<983700><1614><983384>[12:13]<1570><985832><1614><985860><1618><983500><1615><983703><1615><983805><983620><1615><983705><1617><983278>[12:13]<1573><983282><984368><1617><983278><984373>[12:13]<1571><987341><1606>[12:13]<985913><1617><983278><983387><983281><983459><1616><985313><985341><1614>[12:13]<983453><1616><983555><1614><983384><983582><1616><983776><1614><983619><1613>[12:13]<983700><1617><983280><983494><1614><985860><1616><1617><983497><1614><983619><1613><1754>[12:13]<1608><1614><985739><1614><983384><985779><1616><985551><1615><1608><983620><1615><983705><1617><983278>[12:13]<985920><1616><983392><984361><1618><985975><1614><983413><1618><983731><1615><1608><1601><1616><1754>[12:13]<983542><1614><983383><983282><1606><1618>[12:13]<984837><1614><984864><1616><983620><1618><983500><1615><983703><1615><983805><983620><1615><983705><1617><983278>[12:13]<983542><1614><983413><1614><985787><1614><985562><1648>[12:13]<1571><987341><1606><1618>[12:13]<983459><1614><984724><1618><984751><1614><983620><1615><983805><1575>[12:13]<983765><1614><983487><1618><987314><1611><983384>[12:13]<1608>[13:0]<1617><983278><985624><1614><985417><1618><983413><1614><983680><1614>[12:13]<1649><983184><983185><1617><1648><983186><1615>[12:13]<983542><1616><983487><983615><1616>[12:13]<985740><1614><984676><1618><984717><1611><1575>[12:13]<983646><1614><983503><1616><984676><984717><1611><1575>[12:13]<987326>[13:0][13:0]<987318>[13:0]<1757><-TRT>[14:2][12:15]
 [2:0]
 [0:2]
 [0:2]





More information about the latex3-commits mailing list.