diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-09-30 22:08:36 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-09-30 22:08:36 +0000 |
commit | 883a87cde515fcdd076708f212ebb66ed32b145f (patch) | |
tree | ac0fce4c70597596bb267f760197a09232b219b1 /Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py | |
parent | 6c0fed440c27ba0d6856feeb1000320320cf8a96 (diff) |
harfbuzz 2.6.2
git-svn-id: svn://tug.org/texlive/trunk@52233 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py')
-rwxr-xr-x | Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py index cdf81fe7524..912b1d7ea2c 100755 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/gen-indic-table.py @@ -133,8 +133,8 @@ what = ["INDIC_SYLLABIC_CATEGORY", "INDIC_MATRA_CATEGORY"] what_short = ["ISC", "IMC"] print ('#pragma GCC diagnostic push') print ('#pragma GCC diagnostic ignored "-Wunused-macros"') +cat_defs = [] for i in range (2): - print () vv = sorted (values[i].keys ()) for v in vv: v_no_and = v.replace ('_And_', '_') @@ -146,10 +146,17 @@ for i in range (2): raise Exception ("Duplicate short value alias", v, all_shorts[i][s]) all_shorts[i][s] = v short[i][v] = s - print ("#define %s_%s %s_%s %s/* %3d chars; %s */" % - (what_short[i], s, what[i], v.upper (), - ' '* ((48-1 - len (what[i]) - 1 - len (v)) // 8), - values[i][v], v)) + cat_defs.append ((what_short[i] + '_' + s, what[i] + '_' + v.upper (), str (values[i][v]), v)) + +maxlen_s = max ([len (c[0]) for c in cat_defs]) +maxlen_l = max ([len (c[1]) for c in cat_defs]) +maxlen_n = max ([len (c[2]) for c in cat_defs]) +for s in what_short: + print () + for c in [c for c in cat_defs if s in c[0]]: + print ("#define %s %s /* %s chars; %s */" % + (c[0].ljust (maxlen_s), c[1].ljust (maxlen_l), c[2].rjust (maxlen_n), c[3])) +print () print ('#pragma GCC diagnostic pop') print () print ("#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M)") @@ -249,14 +256,14 @@ print ("}") print () print ("#undef _") for i in range (2): - print + print () vv = sorted (values[i].keys ()) for v in vv: print ("#undef %s_%s" % (what_short[i], short[i][v])) print () -print () print ('#endif') +print () print ("/* == End of generated table == */") # Maintain at least 30% occupancy in the table */ |