From 69cbd365cc0e5e5d90d510cc3407e4056d2a1734 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 14 Aug 2021 02:39:46 +0200 Subject: [PATCH] WIP: manually add data entries for PUA ligatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just a test, I’m not entirely convinced we should do this. --- src/gen-arabic-table.py | 9 ++++++++- src/hb-ot-shaper-arabic-table.hh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py index 3ea2b850d..7bb49693b 100755 --- a/src/gen-arabic-table.py +++ b/src/gen-arabic-table.py @@ -161,6 +161,7 @@ LIGATURES = ( 0xFCB0, 0xFCC9, 0xFCCA, 0xFCCB, 0xFCCC, 0xFCCD, 0xFCCE, 0xFCCF, 0xFCD0, 0xFCD1, 0xFCD2, 0xFCD3, 0xFCD5, 0xFCDA, 0xFCDB, 0xFCDC, 0xFCDD, 0xFD30, 0xFD88, 0xFEF5, 0xFEF6, 0xFEF7, 0xFEF8, 0xFEF9, 0xFEFA, 0xFEFB, 0xFEFC, + 0xF201, 0xF211, 0xF2EE, ) def print_shaping_table(f): @@ -168,7 +169,13 @@ def print_shaping_table(f): shapes = {} ligatures = {} names = {} - for line in f: + lines = f.readlines() + lines += [ + "F201;PUA ARABIC LIGATURE LELLAH ISOLATED FORM;Lo;0;AL; 0644 0644 0647;;;;N;;;;;", + "F211;PUA ARABIC LIGATURE LAM WITH MEEM WITH JEEM INITIAL FORM;Lo;0;AL; 0644 0645 062C;;;;N;;;;;", + "F2EE;PUA ARABIC LIGATURE SHADDA WITH FATHATAN ISOLATED FORM;Lo;0;AL; 0020 064B 0651;;;;N;;;;;", + ] + for line in lines: fields = [x.strip () for x in line.split (';')] if fields[5][0:1] != '<': diff --git a/src/hb-ot-shaper-arabic-table.hh b/src/hb-ot-shaper-arabic-table.hh index 4c6aecfd8..b0b65e0a3 100644 --- a/src/hb-ot-shaper-arabic-table.hh +++ b/src/hb-ot-shaper-arabic-table.hh @@ -426,6 +426,7 @@ static const struct ligature_set_t { { 0x064Eu, 0xFC60u }, /* ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM */ { 0x064Fu, 0xFC61u }, /* ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM */ { 0x0650u, 0xFC62u }, /* ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM */ + { 0x064Bu, 0xF2EEu }, /* PUA ARABIC LIGATURE SHADDA WITH FATHATAN ISOLATED FORM */ }}, { 0xFE91u, { { 0xFEE2u, 0xFC08u }, /* ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM */