Zepman

Automated ttf-ms-win10 PKGBUILD for Windows 10 20H2 fonts

Feb 21st, 2021 (edited)
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.06 KB | None | 0 0
  1. # Maintainer: Michael Lass <bevan@bi-co.net>
  2. # Maintainer: Doug Newgard <scimmia at archlinux dot info>
  3. # Contributor: reflexing <reflexing@reflexing.ru>
  4.  
  5. # Instructions were copied from ttf-ms-win8 and slightly modified:
  6. #
  7. # BUILD INSTRUCTIONS:
  8. # -------------------
  9. #
  10. # Please note, that usage of Microsoft fonts outside running Windows
  11. # system is prohibited by EULA (although in certain countries EULA is invalid).
  12. # Please consult Microsoft license before using fonts.
  13. #
  14. # You can acquire fonts either from an installed and up-to-date Windows 10
  15. # system or the most recent install medium.
  16. #
  17. # On the installed Windows 10 system fonts are usually located in
  18. # C:\Windows\Fonts
  19. # and license file is
  20. # C:\Windows\System32\Licenses\neutral\_Default\Core\license.rtf
  21. #
  22. # How to acquire fonts from Windows 10 install medium:
  23. #
  24. # You can freely download the Windows 10 Enterprise 90-day evaluation from:
  25. #
  26. # http://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise
  27. #
  28. # Fonts are located in 'sources/install.wim' file on the ISO, which
  29. # is a 'Windows Imaging Format' (WIM) archive.
  30. #
  31. # You can extract WIM using wimextract ('wimlib' package) or 7z ('p7zip').
  32. #
  33. # Put the following script together with previously extracted
  34. # 'install.wim' and execute:
  35. #
  36. # wimextract install.wim 1 /Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} --dest-dir fonts
  37. #
  38. # Fonts and license will be located in the 'fonts' dir.
  39. #
  40. # You need all files listed in the _ttf_ms_win10[_*] arrays.Place them in the
  41. # same directory as this PKGBUILD file, then run makepkg.
  42.  
  43. pkgbase=ttf-ms-win10
  44. pkgname=($pkgbase{,-japanese,-korean,-sea,-thai,-zh_cn,-zh_tw,-other})
  45. pkgver=10.0.19042.789
  46. pkgrel=1
  47. arch=(any)
  48. url='http://www.microsoft.com/typography/fonts/product.aspx?PID=164'
  49. license=(custom)
  50. provides=(ttf-font)
  51. conflicts=(ttf-vista-fonts)
  52. makedepends=(p7zip)
  53. noextract=('19042.631.201119-0144.20h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x86FRE_en-us.iso')
  54.  
  55. _ttf_ms_win10=(
  56. #########################################################################################
  57. # Normal Bold Italic Bold+Italic # Full name #
  58. #########################################################################################
  59. arial.ttf arialbd.ttf ariali.ttf arialbi.ttf # Arial
  60. ariblk.ttf # Arial Black
  61. bahnschrift.ttf # Bahnschrift
  62. calibri.ttf calibrib.ttf calibrii.ttf calibriz.ttf # Calibri
  63. calibril.ttf calibrili.ttf # Calibri Light
  64. cambria.ttc cambriab.ttf cambriai.ttf cambriaz.ttf # Cambria
  65. Candara.ttf Candarab.ttf Candarai.ttf Candaraz.ttf # Candara
  66. Candaral.ttf Candarali.ttf # Candara Light
  67. comic.ttf comicbd.ttf comici.ttf comicz.ttf # Comic Sans MS
  68. consola.ttf consolab.ttf consolai.ttf consolaz.ttf # Consolas
  69. constan.ttf constanb.ttf constani.ttf constanz.ttf # Constantia
  70. cour.ttf courbd.ttf couri.ttf courbi.ttf # Courier New
  71. corbel.ttf corbelb.ttf corbeli.ttf corbelz.ttf # Corbel
  72. corbell.ttf corbelli.ttf # Corbel Light
  73. framd.ttf framdit.ttf # Franklin Gothic Medium
  74. Gabriola.ttf # Gabriola
  75. georgia.ttf georgiab.ttf georgiai.ttf georgiaz.ttf # Georgia
  76. #holomdl2.ttf # HoloLens MDL2 Assets
  77. impact.ttf # Impact
  78. Inkfree.ttf # Ink Free
  79. lucon.ttf # Lucida Console
  80. l_10646.ttf # Lucida Sans Unicode
  81. marlett.ttf # Marlett
  82. micross.ttf # Microsoft Sans Serifc
  83. pala.ttf palab.ttf palai.ttf palabi.ttf # Palatino Linotype
  84. segoepr.ttf segoeprb.ttf # Segoe Print
  85. segoesc.ttf segoescb.ttf # Segoe Script
  86. segmdl2.ttf # Segoe MDL2 Assets
  87. segoeui.ttf segoeuib.ttf segoeuii.ttf segoeuiz.ttf # Segoe UI
  88. seguibl.ttf seguibli.ttf # Segoe UI Black
  89. seguiemj.ttf # Segoe UI Emoji
  90. seguihis.ttf # Segoe UI Historic
  91. segoeuil.ttf seguili.ttf # Segoe UI Light
  92. seguisb.ttf seguisbi.ttf # Segoe UI Semibold
  93. segoeuisl.ttf seguisli.ttf # Segoe UI Semilight
  94. seguisym.ttf # Segoe UI Symbol
  95. Sitka.ttc SitkaB.ttc SitkaI.ttc SitkaZ.ttc # Sitka
  96. sylfaen.ttf # Sylfaen
  97. symbol.ttf # Symbol
  98. tahoma.ttf tahomabd.ttf # Tahoma
  99. times.ttf timesbd.ttf timesi.ttf timesbi.ttf # Times New Roman
  100. trebuc.ttf trebucbd.ttf trebucit.ttf trebucbi.ttf # Trebuchet MS
  101. verdana.ttf verdanab.ttf verdanai.ttf verdanaz.ttf # Verdana
  102. webdings.ttf # Webdings
  103. wingding.ttf # Wingdings
  104. )
  105.  
  106. _ttf_ms_win10_japanese=(
  107. #########################################################################################
  108. # Normal Bold Italic Bold+Italic # Full name #
  109. #########################################################################################
  110. msgothic.ttc # MS Gothic
  111. YuGothR.ttc YuGothB.ttc # Yu Gothic
  112. YuGothM.ttc # Yu Gothic Medium
  113. YuGothL.ttc # Yu Gothic Light
  114. )
  115.  
  116. _ttf_ms_win10_korean=(
  117. #########################################################################################
  118. # Normal Bold Italic Bold+Italic # Full name #
  119. #########################################################################################
  120. malgun.ttf malgunbd.ttf # Malgun Gothic
  121. malgunsl.ttf # Malgun Gothic Semilight
  122. )
  123.  
  124. _ttf_ms_win10_sea=(
  125. #########################################################################################
  126. # Normal Bold Italic Bold+Italic # Full name #
  127. #########################################################################################
  128. javatext.ttf # Javanese Text
  129. himalaya.ttf # Microsoft Himalaya
  130. ntailu.ttf ntailub.ttf # Microsoft New Tai Lue
  131. phagspa.ttf phagspab.ttf # Microsoft PhagsPa
  132. taile.ttf taileb.ttf # Microsoft Tai Le
  133. msyi.ttf # Microsoft Yi Baiti
  134. monbaiti.ttf # Mongolian Baiti
  135. mmrtext.ttf mmrtextb.ttf # Myanmar Text
  136. Nirmala.ttf NirmalaB.ttf # Nirmala UI
  137. NirmalaS.ttf # Nirmala UI Semilight
  138. )
  139.  
  140. _ttf_ms_win10_thai=(
  141. #########################################################################################
  142. # Normal Bold Italic Bold+Italic # Full name #
  143. #########################################################################################
  144. LeelawUI.ttf LeelaUIb.ttf # Leelawadee UI
  145. LeelUIsl.ttf # Leelawadee UI Semilight
  146. )
  147.  
  148. _ttf_ms_win10_zh_cn=( # Chinese (Simplified)
  149. #########################################################################################
  150. # Normal Bold Italic Bold+Italic # Full name #
  151. #########################################################################################
  152. simsun.ttc # NSimSun
  153. simsunb.ttf # SimSun-ExtB
  154. msyh.ttc msyhbd.ttc # Microsoft YaHei
  155. msyhl.ttc # Microsoft YaHei Light
  156. )
  157.  
  158. _ttf_ms_win10_zh_tw=( # Chinese (Traditional)
  159. #########################################################################################
  160. # Normal Bold Italic Bold+Italic # Full name #
  161. #########################################################################################
  162. msjh.ttc msjhbd.ttc # Microsoft JhengHei
  163. msjhl.ttc # Microsoft JhengHei Light
  164. mingliub.ttc # MingLiU_HKSCS-ExtB
  165. )
  166.  
  167. _ttf_ms_win10_other=(
  168. #########################################################################################
  169. # Normal Bold Italic Bold+Italic # Full name #
  170. #########################################################################################
  171. ebrima.ttf ebrimabd.ttf # Ebrima
  172. gadugi.ttf gadugib.ttf # Gadugi
  173. mvboli.ttf # MV Boli
  174. )
  175.  
  176. DLAGENTS=('file::/usr/bin/true'
  177. 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
  178.  
  179. source=("https://software-download.microsoft.com/download/pr/19042.631.201119-0144.20h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x86FRE_en-us.iso"
  180. ${_ttf_ms_win10[@]/#/file://}
  181. ${_ttf_ms_win10_japanese[@]/#/file://}
  182. ${_ttf_ms_win10_korean[@]/#/file://}
  183. ${_ttf_ms_win10_sea[@]/#/file://}
  184. ${_ttf_ms_win10_thai[@]/#/file://}
  185. ${_ttf_ms_win10_zh_cn[@]/#/file://}
  186. ${_ttf_ms_win10_zh_tw[@]/#/file://}
  187. ${_ttf_ms_win10_other[@]/#/file://}
  188. file://license.rtf)
  189.  
  190. sha256sums=('fd6af6c796003ad309ee34bf0d686a16fbc0ea00b44bb9e4494bbf40f82372c8'
  191. 'SKIP'
  192. 'SKIP'
  193. 'SKIP'
  194. 'SKIP'
  195. 'SKIP'
  196. 'SKIP'
  197. 'SKIP'
  198. 'SKIP'
  199. 'SKIP'
  200. 'SKIP'
  201. 'SKIP'
  202. 'SKIP'
  203. 'SKIP'
  204. 'SKIP'
  205. 'SKIP'
  206. 'SKIP'
  207. 'SKIP'
  208. 'SKIP'
  209. 'SKIP'
  210. 'SKIP'
  211. 'SKIP'
  212. 'SKIP'
  213. 'SKIP'
  214. 'SKIP'
  215. 'SKIP'
  216. 'SKIP'
  217. 'SKIP'
  218. 'SKIP'
  219. 'SKIP'
  220. 'SKIP'
  221. 'SKIP'
  222. 'SKIP'
  223. 'SKIP'
  224. 'SKIP'
  225. 'SKIP'
  226. 'SKIP'
  227. 'SKIP'
  228. 'SKIP'
  229. 'SKIP'
  230. 'SKIP'
  231. 'SKIP'
  232. 'SKIP'
  233. 'SKIP'
  234. 'SKIP'
  235. 'SKIP'
  236. 'SKIP'
  237. 'SKIP'
  238. 'SKIP'
  239. 'SKIP'
  240. 'SKIP'
  241. 'SKIP'
  242. 'SKIP'
  243. 'SKIP'
  244. 'SKIP'
  245. 'SKIP'
  246. 'SKIP'
  247. 'SKIP'
  248. 'SKIP'
  249. 'SKIP'
  250. 'SKIP'
  251. 'SKIP'
  252. 'SKIP'
  253. 'SKIP'
  254. 'SKIP'
  255. 'SKIP'
  256. 'SKIP'
  257. 'SKIP'
  258. 'SKIP'
  259. 'SKIP'
  260. 'SKIP'
  261. 'SKIP'
  262. 'SKIP'
  263. 'SKIP'
  264. 'SKIP'
  265. 'SKIP'
  266. 'SKIP'
  267. 'SKIP'
  268. 'SKIP'
  269. 'SKIP'
  270. 'SKIP'
  271. 'SKIP'
  272. 'SKIP'
  273. 'SKIP'
  274. 'SKIP'
  275. 'SKIP'
  276. 'SKIP'
  277. 'SKIP'
  278. 'SKIP'
  279. 'SKIP'
  280. 'SKIP'
  281. 'SKIP'
  282. 'SKIP'
  283. 'SKIP'
  284. 'SKIP'
  285. 'SKIP'
  286. 'SKIP'
  287. 'SKIP'
  288. 'SKIP'
  289. 'SKIP'
  290. 'SKIP'
  291. 'SKIP'
  292. 'SKIP'
  293. 'SKIP'
  294. 'SKIP'
  295. 'SKIP'
  296. 'SKIP'
  297. 'SKIP'
  298. 'SKIP'
  299. 'SKIP'
  300. 'SKIP'
  301. 'SKIP'
  302. 'SKIP'
  303. 'SKIP'
  304. 'SKIP'
  305. 'SKIP'
  306. 'SKIP'
  307. 'SKIP'
  308. 'SKIP'
  309. 'SKIP'
  310. 'SKIP'
  311. 'SKIP'
  312. 'SKIP'
  313. 'SKIP'
  314. 'SKIP'
  315. 'SKIP'
  316. 'SKIP'
  317. 'SKIP'
  318. 'SKIP'
  319. 'SKIP'
  320. 'SKIP'
  321. 'SKIP'
  322. 'SKIP'
  323. 'SKIP'
  324. 'SKIP'
  325. 'SKIP'
  326. 'SKIP'
  327. 'SKIP'
  328. 'SKIP'
  329. 'SKIP'
  330. 'SKIP'
  331. 'SKIP'
  332. 'SKIP'
  333. 'SKIP'
  334. 'SKIP')
  335.  
  336. prepare() {
  337. 7z e 19042.631.201119-0144.20h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x86FRE_en-us.iso sources/install.wim
  338. 7z e install.wim Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf}
  339. rm install.wim
  340. }
  341.  
  342. _package() {
  343. conflicts+=(${pkgname/10/8} ttf-win7-fonts${pkgname##*10})
  344.  
  345. install -Dm644 $@ -t "$pkgdir/usr/share/fonts/TTF"
  346. install -Dm644 license.rtf -t "$pkgdir/usr/share/licenses/$pkgname"
  347. }
  348.  
  349. package_ttf-ms-win10() {
  350. pkgdesc='Microsoft Windows 10 TrueType fonts'
  351. provides+=(ttf-tahoma ttf-ms-fonts)
  352. conflicts+=(ttf-tahoma ttf-ms-fonts)
  353. _package ${_ttf_ms_win10[@]}
  354. }
  355.  
  356. package_ttf-ms-win10-japanese() {
  357. pkgdesc='Microsoft Windows 10 Japanese TrueType fonts'
  358. _package ${_ttf_ms_win10_japanese[@]}
  359. }
  360.  
  361. package_ttf-ms-win10-korean() {
  362. pkgdesc='Microsoft Windows 10 Korean TrueType fonts'
  363. _package ${_ttf_ms_win10_korean[@]}
  364. }
  365.  
  366. package_ttf-ms-win10-sea() {
  367. pkgdesc='Microsoft Windows 10 Southeast Asian TrueType fonts'
  368. _package ${_ttf_ms_win10_sea[@]}
  369. }
  370.  
  371. package_ttf-ms-win10-thai() {
  372. pkgdesc='Microsoft Windows 10 Thai TrueType fonts'
  373. _package ${_ttf_ms_win10_thai[@]}
  374. }
  375.  
  376. package_ttf-ms-win10-zh_cn() {
  377. pkgdesc='Microsoft Windows 10 Simplified Chinese TrueType fonts'
  378. _package ${_ttf_ms_win10_zh_cn[@]}
  379. }
  380.  
  381. package_ttf-ms-win10-zh_tw() {
  382. pkgdesc='Microsoft Windows 10 Traditional Chinese TrueType fonts'
  383. _package ${_ttf_ms_win10_zh_tw[@]}
  384. }
  385.  
  386. package_ttf-ms-win10-other() {
  387. pkgdesc='Microsoft Windows 10 Other TrueType fonts'
  388. _package ${_ttf_ms_win10_other[@]}
  389. }
  390.  
  391. # vim: ts=4 sw=4 et
Add Comment
Please, Sign In to add comment