merge-font-noto-fix-merging-v20201206-phase3-76b29f8f8f9b.patch 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. diff --git a/nototools/merge_noto.py b/nototools/merge_noto.py
  2. index 17c07ed..029845a 100755
  3. --- a/nototools/merge_noto.py
  4. +++ b/nototools/merge_noto.py
  5. @@ -34,7 +34,7 @@ def make_puncless_font_name(script):
  6. return make_font_name(script).replace(" ", "").replace("-", "")
  7. -def make_font_file_name(script, weight, directory="individual/unhinted"):
  8. +def make_font_file_name(script, weight, directory="individual/hinted"):
  9. filename = "%s/%s-%s.ttf" % (directory, make_puncless_font_name(script), weight)
  10. return filename
  11. @@ -85,6 +85,11 @@ SCRIPT_TO_OPENTYPE_SCRIPT_TAG = {
  12. "Cuneiform": "xsux",
  13. "Cypriot": "cprt",
  14. "Yi": "yi ",
  15. + "AnatolianHieroglyphs":"hluw",
  16. + "Bamum": "bamu",
  17. + "NewTaiLue": "talu",
  18. + "Tagbanwa": "tagb",
  19. + "Thaana": "thaa",
  20. }
  21. @@ -135,96 +140,129 @@ def add_gsub_to_font(fontfile):
  22. def main():
  23. merge_table = {
  24. - "Historic": [
  25. + # Use a single file with all the fonts copied from merge_fonts.py.
  26. + "": [ # LGC,
  27. + "Adlam",
  28. + "AdlamUnjoined",
  29. + "AnatolianHieroglyphs",
  30. + "Arabic",
  31. + "ArabicUI",
  32. + "Armenian",
  33. "Avestan",
  34. - "Carian",
  35. - "Egyptian Hieroglyphs",
  36. - "Imperial Aramaic",
  37. - "Pahlavi", # Should be 'Inscriptional Pahlavi',
  38. - "Parthian", # Should be 'Inscriptional Parthian',
  39. - "Linear B",
  40. - "Lycian",
  41. - "Lydian",
  42. - "Mandaic",
  43. - "Old Persian",
  44. - "Old South Arabian",
  45. - "Old Turkic",
  46. - "Osmanya",
  47. - "Phags-Pa",
  48. - "Phoenician",
  49. - "Samaritan",
  50. - "Sumero-Akkadian Cuneiform",
  51. - "Ugaritic",
  52. - ],
  53. - "South Asian": [
  54. - "Devanagari",
  55. + "Balinese",
  56. + "Bamum",
  57. + "Batak",
  58. "Bengali",
  59. - "Gurmukhi",
  60. - "Gujarati",
  61. - "Oriya",
  62. - "Tamil",
  63. - "Telugu",
  64. - "Kannada",
  65. - "Malayalam",
  66. - "Sinhala",
  67. - "Thaana",
  68. + "BengaliUI",
  69. "Brahmi",
  70. - "Kaithi",
  71. - "Kharoshthi", # Move to Historic?
  72. - "Lepcha",
  73. - "Limbu",
  74. - "Meetei Mayek",
  75. - "Ol Chiki",
  76. - "Saurashtra",
  77. - "Syloti Nagri",
  78. - ],
  79. - "Southeast Asian": [
  80. - "Thai",
  81. - "Lao",
  82. - "Khmer",
  83. - "Batak",
  84. "Buginese",
  85. "Buhid",
  86. + "CJKjp-Regular.otf",
  87. + "CJKkr-Regular.otf",
  88. + "CJKsc-Regular.otf",
  89. + "CJKtc-Regular.otf",
  90. + "CanadianAboriginal",
  91. + "Carian",
  92. + "Chakma",
  93. "Cham",
  94. - "Hanunoo",
  95. - "Javanese",
  96. - "Kayah Li",
  97. - "New Tai Lue",
  98. - "Rejang",
  99. - "Sundanese",
  100. - "Tagalog",
  101. - "Tagbanwa",
  102. - "Tai Le",
  103. - "Tai Tham",
  104. - "Tai Viet",
  105. - ],
  106. - "": [ # LGC,
  107. - "Armenian",
  108. - "Bamum",
  109. - "Canadian Aboriginal",
  110. "Cherokee",
  111. "Coptic",
  112. - "Cypriot Syllabary",
  113. + "Cuneiform",
  114. + "Cypriot",
  115. "Deseret",
  116. + "Devanagari",
  117. + "DevanagariUI",
  118. + "Display",
  119. + "EgyptianHieroglyphs",
  120. "Ethiopic",
  121. "Georgian",
  122. "Glagolitic",
  123. "Gothic",
  124. + "Gujarati",
  125. + "GujaratiUI",
  126. + "Gurmukhi",
  127. + "GurmukhiUI",
  128. + "Hanunoo",
  129. "Hebrew",
  130. + "ImperialAramaic",
  131. + "InscriptionalPahlavi",
  132. + "InscriptionalParthian",
  133. + "Javanese",
  134. + "Kaithi",
  135. + "Kannada",
  136. + "KannadaUI",
  137. + "KayahLi",
  138. + "Kharoshthi",
  139. + "Khmer",
  140. + "KhmerUI",
  141. + "Lao",
  142. + "LaoUI",
  143. + "Lepcha",
  144. + "Limbu",
  145. + "LinearB",
  146. "Lisu",
  147. + "Lycian",
  148. + "Lydian",
  149. + "Malayalam",
  150. + "MalayalamUI",
  151. + "Mandaic",
  152. + "MeeteiMayek",
  153. + #"NotoSansMongolian",
  154. + "Mono",
  155. + "MonoCJKjp-Regular.otf",
  156. + "MonoCJKkr-Regular.otf",
  157. + "MonoCJKsc-Regular.otf",
  158. + "MonoCJKtc-Regular.otf",
  159. + "Myanmar",
  160. + "MyanmarUI",
  161. "NKo",
  162. + "NewTaiLue",
  163. "Ogham",
  164. - "Old Italic",
  165. + "OlChiki",
  166. + "OldItalic",
  167. + "OldPersian",
  168. + "OldSouthArabian",
  169. + "OldTurkic",
  170. + "Oriya",
  171. + "OriyaUI",
  172. + "Osage",
  173. + "Osmanya",
  174. + "PhagsPa",
  175. + "Phoenician",
  176. + "Rejang",
  177. "Runic",
  178. + "Samaritan",
  179. + "Saurashtra",
  180. "Shavian",
  181. + "Sinhala",
  182. + "SinhalaUI",
  183. + "Sundanese",
  184. + "SylotiNagri",
  185. + "Symbols",
  186. + "Symbols2",
  187. + "SyriacEastern",
  188. + "SyriacEstrangela",
  189. + "SyriacWestern",
  190. + "Tagalog",
  191. + "Tagbanwa",
  192. + "TaiLe",
  193. + "TaiTham",
  194. + "TaiViet",
  195. + "Tamil",
  196. + "TamilUI",
  197. + "Telugu",
  198. + "TeluguUI",
  199. + "Thaana",
  200. + "Thai",
  201. + "ThaiUI",
  202. + "Tibetan",
  203. "Tifinagh",
  204. + "Ugaritic",
  205. "Vai",
  206. + "Yi",
  207. ],
  208. }
  209. - add_ui_alternative(merge_table, "South Asian")
  210. - add_ui_alternative(merge_table, "Southeast Asian")
  211. -
  212. for merge_target in sorted(merge_table):
  213. for weight in ["Regular", "Bold"]:
  214. merger = merge.Merger()
  215. @@ -261,7 +299,7 @@ def main():
  216. name_record.string = name.encode("UTF-16BE")
  217. font.save(
  218. - make_font_file_name(merge_target, weight, directory="combined/unhinted")
  219. + make_font_file_name(merge_target, weight, directory="combined/hinted")
  220. )