From eb40c1f48382bc95aaef5e12ceca948eb8f7ab48 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 12 May 2025 13:35:15 -0600 Subject: [PATCH] [gen-ucd-table] Update for hb-script-list.h --- src/gen-ucd-table.py | 6 +++--- src/update-unicode-tables.make | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gen-ucd-table.py b/src/gen-ucd-table.py index d85ae4faa..4e92942c8 100755 --- a/src/gen-ucd-table.py +++ b/src/gen-ucd-table.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -"""usage: ./gen-ucd-table ucd.nounihan.grouped.xml [/path/to/hb-common.h] +"""usage: ./gen-ucd-table ucd.nounihan.grouped.xml [/path/to/hb-script-list.h] Input file: * https://unicode.org/Public/UCD/latest/ucdxml/ucd.nounihan.grouped.zip @@ -21,7 +21,7 @@ logging.info('Loading UCDXML...') ucdxml = packTab.ucdxml.load_ucdxml(sys.argv[1]) ucd = packTab.ucdxml.ucdxml_get_repertoire(ucdxml) -hb_common_h = 'hb-common.h' if len (sys.argv) < 3 else sys.argv[2] +hb_script_list_h = 'hb-script-list.h' if len (sys.argv) < 3 else sys.argv[2] logging.info('Preparing data tables...') @@ -90,7 +90,7 @@ for i,v in enumerate(('Cc', 'Cf', 'Cn', 'Co', 'Cs', 'Ll', 'Lm', 'Lo', 'Lt', 'Lu' sc_order = dict() sc_array = [] sc_re = re.compile(r"\b(HB_SCRIPT_[_A-Z]*).*HB_TAG [(]'(.)','(.)','(.)','(.)'[)]") -for line in open(hb_common_h): +for line in open(hb_script_list_h): m = sc_re.search (line) if not m: continue name = m.group(1) diff --git a/src/update-unicode-tables.make b/src/update-unicode-tables.make index 6f5b490f7..64ebd475b 100755 --- a/src/update-unicode-tables.make +++ b/src/update-unicode-tables.make @@ -19,7 +19,7 @@ hb-ot-shaper-indic-table.cc: gen-indic-table.py IndicSyllabicCategory.txt IndicP ./$^ > $@ || ($(RM) $@; false) hb-ot-tag-table.hh: gen-tag-table.py languagetags language-subtag-registry ./$^ > $@ || ($(RM) $@; false) -hb-ucd-table.hh: gen-ucd-table.py ucd.nounihan.grouped.zip hb-common.h +hb-ucd-table.hh: gen-ucd-table.py ucd.nounihan.grouped.zip hb-script-list.h ./$^ > $@ || ($(RM) $@; false) hb-ot-shaper-use-table.hh: gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt ArabicShaping.txt DerivedCoreProperties.txt UnicodeData.txt Blocks.txt Scripts.txt ms-use/IndicSyllabicCategory-Additional.txt ms-use/IndicPositionalCategory-Additional.txt ./$^ > $@ || ($(RM) $@; false)