You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/build/merge-font-noto-fix-merging...

230 lines
6.2 KiB

diff --git a/nototools/merge_noto.py b/nototools/merge_noto.py
index 17c07ed..029845a 100755
--- a/nototools/merge_noto.py
+++ b/nototools/merge_noto.py
@@ -34,7 +34,7 @@ def make_puncless_font_name(script):
return make_font_name(script).replace(" ", "").replace("-", "")
-def make_font_file_name(script, weight, directory="individual/unhinted"):
+def make_font_file_name(script, weight, directory="individual/hinted"):
filename = "%s/%s-%s.ttf" % (directory, make_puncless_font_name(script), weight)
return filename
@@ -85,6 +85,11 @@ SCRIPT_TO_OPENTYPE_SCRIPT_TAG = {
"Cuneiform": "xsux",
"Cypriot": "cprt",
"Yi": "yi ",
+ "AnatolianHieroglyphs":"hluw",
+ "Bamum": "bamu",
+ "NewTaiLue": "talu",
+ "Tagbanwa": "tagb",
+ "Thaana": "thaa",
}
@@ -135,96 +140,129 @@ def add_gsub_to_font(fontfile):
def main():
merge_table = {
- "Historic": [
+ # Use a single file with all the fonts copied from merge_fonts.py.
+ "": [ # LGC,
+ "Adlam",
+ "AdlamUnjoined",
+ "AnatolianHieroglyphs",
+ "Arabic",
+ "ArabicUI",
+ "Armenian",
"Avestan",
- "Carian",
- "Egyptian Hieroglyphs",
- "Imperial Aramaic",
- "Pahlavi", # Should be 'Inscriptional Pahlavi',
- "Parthian", # Should be 'Inscriptional Parthian',
- "Linear B",
- "Lycian",
- "Lydian",
- "Mandaic",
- "Old Persian",
- "Old South Arabian",
- "Old Turkic",
- "Osmanya",
- "Phags-Pa",
- "Phoenician",
- "Samaritan",
- "Sumero-Akkadian Cuneiform",
- "Ugaritic",
- ],
- "South Asian": [
- "Devanagari",
+ "Balinese",
+ "Bamum",
+ "Batak",
"Bengali",
- "Gurmukhi",
- "Gujarati",
- "Oriya",
- "Tamil",
- "Telugu",
- "Kannada",
- "Malayalam",
- "Sinhala",
- "Thaana",
+ "BengaliUI",
"Brahmi",
- "Kaithi",
- "Kharoshthi", # Move to Historic?
- "Lepcha",
- "Limbu",
- "Meetei Mayek",
- "Ol Chiki",
- "Saurashtra",
- "Syloti Nagri",
- ],
- "Southeast Asian": [
- "Thai",
- "Lao",
- "Khmer",
- "Batak",
"Buginese",
"Buhid",
+ "CJKjp-Regular.otf",
+ "CJKkr-Regular.otf",
+ "CJKsc-Regular.otf",
+ "CJKtc-Regular.otf",
+ "CanadianAboriginal",
+ "Carian",
+ "Chakma",
"Cham",
- "Hanunoo",
- "Javanese",
- "Kayah Li",
- "New Tai Lue",
- "Rejang",
- "Sundanese",
- "Tagalog",
- "Tagbanwa",
- "Tai Le",
- "Tai Tham",
- "Tai Viet",
- ],
- "": [ # LGC,
- "Armenian",
- "Bamum",
- "Canadian Aboriginal",
"Cherokee",
"Coptic",
- "Cypriot Syllabary",
+ "Cuneiform",
+ "Cypriot",
"Deseret",
+ "Devanagari",
+ "DevanagariUI",
+ "Display",
+ "EgyptianHieroglyphs",
"Ethiopic",
"Georgian",
"Glagolitic",
"Gothic",
+ "Gujarati",
+ "GujaratiUI",
+ "Gurmukhi",
+ "GurmukhiUI",
+ "Hanunoo",
"Hebrew",
+ "ImperialAramaic",
+ "InscriptionalPahlavi",
+ "InscriptionalParthian",
+ "Javanese",
+ "Kaithi",
+ "Kannada",
+ "KannadaUI",
+ "KayahLi",
+ "Kharoshthi",
+ "Khmer",
+ "KhmerUI",
+ "Lao",
+ "LaoUI",
+ "Lepcha",
+ "Limbu",
+ "LinearB",
"Lisu",
+ "Lycian",
+ "Lydian",
+ "Malayalam",
+ "MalayalamUI",
+ "Mandaic",
+ "MeeteiMayek",
+ #"NotoSansMongolian",
+ "Mono",
+ "MonoCJKjp-Regular.otf",
+ "MonoCJKkr-Regular.otf",
+ "MonoCJKsc-Regular.otf",
+ "MonoCJKtc-Regular.otf",
+ "Myanmar",
+ "MyanmarUI",
"NKo",
+ "NewTaiLue",
"Ogham",
- "Old Italic",
+ "OlChiki",
+ "OldItalic",
+ "OldPersian",
+ "OldSouthArabian",
+ "OldTurkic",
+ "Oriya",
+ "OriyaUI",
+ "Osage",
+ "Osmanya",
+ "PhagsPa",
+ "Phoenician",
+ "Rejang",
"Runic",
+ "Samaritan",
+ "Saurashtra",
"Shavian",
+ "Sinhala",
+ "SinhalaUI",
+ "Sundanese",
+ "SylotiNagri",
+ "Symbols",
+ "Symbols2",
+ "SyriacEastern",
+ "SyriacEstrangela",
+ "SyriacWestern",
+ "Tagalog",
+ "Tagbanwa",
+ "TaiLe",
+ "TaiTham",
+ "TaiViet",
+ "Tamil",
+ "TamilUI",
+ "Telugu",
+ "TeluguUI",
+ "Thaana",
+ "Thai",
+ "ThaiUI",
+ "Tibetan",
"Tifinagh",
+ "Ugaritic",
"Vai",
+ "Yi",
],
}
- add_ui_alternative(merge_table, "South Asian")
- add_ui_alternative(merge_table, "Southeast Asian")
-
for merge_target in sorted(merge_table):
for weight in ["Regular", "Bold"]:
merger = merge.Merger()
@@ -261,7 +299,7 @@ def main():
name_record.string = name.encode("UTF-16BE")
font.save(
- make_font_file_name(merge_target, weight, directory="combined/unhinted")
+ make_font_file_name(merge_target, weight, directory="combined/hinted")
)