This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

ttf-win7-fonts

By: a guest on Apr 20th, 2012  |  syntax: Bash  |  size: 8.85 KB  |  views: 861  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Martin Schmölzer <mschmoelzer@gmail.com>
  2.  
  3. # BUILD INSTRUCTIONS:
  4. # ----------------------
  5. # This package is intended as a more up-to-date replacement for the AUR
  6. # 'ttf-ms-fonts' and 'ttf-vista-fonts' packages. It provides newer versions of
  7. # the fonts in these packages, but due to license issues cannot automatically
  8. # download the fonts.
  9. #
  10. # Instead, you must acquire them from a Windows 7 system or install media:
  11. #  - Running Windows 7 system: fonts are located in C:\Windows\Fonts
  12. #  - Windows 7 install media: fonts are located in sources/install.wim, which
  13. #    is a "Windows Imaging Format" archive. This archive can be extracted with
  14. #    7-zip (p7zip package): "7z x install.wim 1/Windows/Fonts"
  15. #    Alternatively, you can use GNOME's File Roller (and maybe other archive
  16. #    managers) to extract the files if the p7zip package is installed.
  17. #
  18. # You need the files listed in the source=() array. Place them in the same
  19. # directory as this PKGBUILD file, then run makepkg.
  20. #
  21. # It is possible that the checksums don't match. This is due to the fact that
  22. # different Windows releases may have older or newer fonts than the ones I used
  23. # to create the package. In this case, makepkg will refuse to build the package.
  24. # To fix this, you have to replace the sha256sums=(...) entry in this PKGBUILD:
  25. #  - Run "makepkg -g". It will generate the correct checksums for your files
  26. #    and print them to the console
  27. #  - Copy and paste them into this file, replacing the existing sha256sums=(...)
  28. #    entry.
  29. #
  30. # Windows 7 SP1 has newer versions of the following fonts:
  31. #  - Arial
  32. #  - Cambria
  33. #  - Gabriola
  34. #  - Mangal
  35. #  - Times New Roman
  36. #  - Verdana
  37. #
  38. # These fonts can be extracted from the Windows 7 SP1 updater with the following
  39. # commands:
  40. #  $ cd ~/Downloads  # (or any other working directory)
  41. #  $ wget http://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe
  42. #  $ cabextract -F *.tt[fc] -d win7_sp1 windows6.1-KB976932-X64.exe
  43. #  $ mkdir sp1-fonts
  44. #  $ find win7_sp1 -name *.tt[fc] -exec cp '{}' ./sp1-fonts/ \;
  45. #
  46. # This will copy the fonts to the "sp1-fonts" directory.
  47.  
  48. pkgname=ttf-win7-fonts
  49. pkgver=7.1
  50. pkgrel=3
  51. pkgdesc="Microsoft Windows 7 TrueType Fonts"
  52. arch=('any')
  53. url="http://www.microsoft.com"
  54. license=('custom')
  55. depends=('fontconfig')
  56. makedepends=('fontforge')
  57. provides=('ttf-vista-fonts' 'ttf-ms-fonts')
  58. conflicts=('ttf-vista-fonts' 'ttf-ms-fonts')
  59. install=$pkgname.install
  60.  
  61. ###################################################################
  62. #        Normal        Bold           Italic         Bold+Italic  #
  63. ###################################################################
  64. source=('ariblk.ttf'
  65.         'arial.ttf'   'arialbd.ttf'  'ariali.ttf'   'arialbi.ttf'
  66.         'comic.ttf'   'comicbd.ttf'
  67.         'cour.ttf'    'courbd.ttf'   'couri.ttf'    'courbi.ttf'
  68.         'gabriola.ttf'
  69.         'georgia.ttf' 'georgiab.ttf' 'georgiai.ttf' 'georgiaz.ttf'
  70.         'impact.ttf'
  71.         'mangal.ttf'  'mangalb.ttf'
  72.         'times.ttf'   'timesbd.ttf'  'timesi.ttf'   'timesbi.ttf'
  73.         'trebuc.ttf'  'trebucbd.ttf' 'trebucit.ttf' 'trebucbi.ttf'
  74.         'verdana.ttf' 'verdanab.ttf' 'verdanai.ttf' 'verdanaz.ttf'
  75.         'webdings.ttf'
  76.         'wingding.ttf'
  77.         'calibri.ttf' 'calibrib.ttf' 'calibrii.ttf' 'calibriz.ttf'
  78.         'cambria.ttc' 'cambriab.ttf' 'cambriai.ttf' 'cambriaz.ttf'
  79.         'Candara.ttf' 'Candarab.ttf' 'Candarai.ttf' 'Candaraz.ttf'
  80.         'consola.ttf' 'consolab.ttf' 'consolai.ttf' 'consolaz.ttf'
  81.         'constan.ttf' 'constanb.ttf' 'constani.ttf' 'constanz.ttf'
  82.         'corbel.ttf'  'corbelb.ttf'  'corbeli.ttf'  'corbelz.ttf'
  83.         'license.rtf')
  84. sha256sums=('6dab274b36928bc76b5002eac90a52f2450d07b9327be95acf2bea1e56e4e1da'
  85.             'ca8c3f3b7608a6e8712b027ccbf584818f78e750da1240fcb5d8fa89a0b92747'
  86.             '4033d5cfc2e1acb737c95b1a1bbada6ab7ea98933d67b254cb898fde433fa81d'
  87.             'dee6a6959f9178752c56c3090a947c2fc3621dc265e4bf9e1a009ef56c44cf59'
  88.             '29ce82c87cc7988ca642e01093c4606b2c5bdd6c860daf414b4ee7b17b5e002a'
  89.             'da6bd53ea1f8259e41b198d75e187676c6355086ea8cb3cb0e1690d5237f82a4'
  90.             '8f5d4ac83aeee7dc1361585883ef59304edcfc57f4996be51e74aa3a07c5aa30'
  91.             'c5e7cee4b77caf5ed5f1ffd7510fdb66d32109c6861b4a481b93b9166df03534'
  92.             '89cff1ff9e59a661ba947500e9c242506e2dbf36c0417783dea8b762e13da704'
  93.             'd9c60f6e55128b775b25f8e26b20b486c1a4de56f1d55348d5ab6200d9471b06'
  94.             '5d51cebc9151f377f52b39cd34da80f9179236b1ba4f261ae4023c077114e27b'
  95.             'e46bf2ea19f9f416123f32c79eefdedc90f49c92d3606833afa6176a0bea903d'
  96.             '46a57e3971f92d2359759f1cf0cc6706def7010a145786cf15c199e44ef9b061'
  97.             '0537ac91f425795dda88d1a8ea66ae59f7357e5eb0c37309621003770c6ae160'
  98.             'd691381f2476ed5ee1e80475a430b4864bf31fd46132b270eec1ce2672b4f8a2'
  99.             '15f287c3345c2e64c2a2da053789dc0eef09ae0fc82a193ca64164b41d3565fe'
  100.             'd9d7f0b973c131b0b7923a726f6f1de964b1073ec982106a027c3db53cf02633'
  101.             '56b633b3690d7e078b4a3da999c4f12b2e583df70699f72807d344d3e42c89b4'
  102.             'c04365a4a5accd570deae0877f579bd3bccb3395cd7553e3f412b370a1013c26'
  103.             '84f9d249dbd5597b67ce487a730ae25d844d6f4968dd088f57cb2769082dd9cd'
  104.             '8ec6b7088e954e52443f8c131133a594580fe06c083f82da7a87c4c6216a547e'
  105.             '98187f2a8e9b0e232dfb59efb7d42335237abb122bac090862ce8a19aa82494e'
  106.             'fce4048011d32e66c4265d0acad4fea69077c6463bc03930546deada5fddec45'
  107.             'b69a5b33e997c3bc55f35dde8267cb93fe5fbdc3ecbc23b1d987602a9fd2b1f2'
  108.             '7fea7f91f1140721bd7837a36ed2b1c856215f3ac08e6d2eb29c1afe235d0900'
  109.             '3f1d76cbf72de8cf7afbb6c4f3fcce5e5e89b92c8647310908aa42c44bd29b5c'
  110.             'd374f4cc7819ad7a57204543b5ab01aa1580725bf2571eb66a25155216d90f3b'
  111.             '7568b5a1a38aa5c2e5c486c3ac2e9a7ecd229e81dda726a2266bc935fb5af2fa'
  112.             'bba4571a7cc83c0ccc8b96035e2b165526946b1d45baf73d1b402c65ed48de62'
  113.             'ff503224a9c81914bfedbafe4d79246bd133ebcfad5b0ffc0cd9ebe18e96f9fb'
  114.             '51644512b8e60d007c5c9fd17b9114364722124433bd3c6bb6166916aa9f863b'
  115.             '1161ce511c44eb5464a4f8144aaf3eb965a50ed66957ad7d38e497ab9d958e5a'
  116.             'd7c38355bd52f52e043ed904f3463d476925300d1bdca9e842b28077ca3549b8'
  117.             '436cb479a8f9eff517016868323bdfbca1a053bba4cc55c8753859b64d041c5c'
  118.             'ce7dd6ba37e7b8dff865b6ce334ef773b9ad86d8a9d495c309ced108856bed54'
  119.             'd9f13268dca6e828cb9ed5827dc99d188cf0d7c55349f92802fd6532926bdfbf'
  120.             'b5e3f6b9fcdf4b3a89ed182d4ade810d45cfef17f57b4bbc5cd6be1e83de40ab'
  121.             'ba3bef63a5f397f893b27d3e5be020b966bf96b5ed9064241a24805c288ea79e'
  122.             '85377e39b6987b338795ecd08b18ca5077867585cd18c431438854374441e952'
  123.             '6ca040031a8387ad3a7fb815f896fdbd21fa181ad6fe19e5a193a72bf6a7d396'
  124.             '9cbc78f6fe5ffec33ca9240e64f48ae2c5b158cfacb0a1f6a40521e8d06045b6'
  125.             'f4cc0c11780a2d94cd6b74ed54fa657f26677013028c956ecb40da81c6b59b9e'
  126.             'f959e0709a770094814199e49b0441b13e2bb075475b7ed2125ead7841ff2215'
  127.             'da786a0df49cd2f45a9a8dc67120ec534e4624bf168829947bb08c4f937c21ad'
  128.             'c2017a26bbd51775376baa93ba63095ba90a955c0eb93bbe44b9e73e0958fd73'
  129.             '45c14a49e0ba2edc00b72afad9a930cad5c1b9a93323b239a8c308efc5a65e8e'
  130.             '5c27a540c51a0e60b2caa4e9f6c9164fde89a9fdc560747bfa1658f6e556cf61'
  131.             '18db132c539323badaf0e1c9ceffa497e1996946a8faac26cc5fbe6fc8233314'
  132.             'fc9e9f0b6ae6d068b01e1511e475b508e15799529f53679f1e927f5418040c3f'
  133.             '28401ef53647e4e68f2c2bda54856fe90d9afb1cf4072bf4ea9cf6b380c09d4c'
  134.             '11a7a1c6b1b4028cd7e55f60a9773ecc7d39b66b8f82f5b7c6fbf8a4fdfcf94e'
  135.             'be0306e2040aeeed8bf228524071f4b941d28cbdd3ff413a9db07d1da9213ec9'
  136.             '6bf361ae27d2f67e05d9ad0fa6e0bc4e16c2ada6926d6c24b557e2547f4f242e'
  137.             '83f5b36107f7ea50fd5c52b1c3e8d64de3edc5d0f2c2e2e9f634fbbcfd7abd74'
  138.             '2d3fb4d471e9669a5ab2bc8aa9b359639e17af321510f3b878bae03bc259b056'
  139.             '7e9cd651666dce6dd3ad37b8199c7798b226b8995d35e6b672b53ce0bbec59cb'
  140.             '9c68522951940ad49354f4fce56b528414a7e83c44474ceea0582a5434693066'
  141.             '096cdd18e26b2b3d8cf0b3ec6a1ffb5b0eaae0fcc2105e3c145f19037a42d467')
  142.  
  143. build() {
  144.   cd ${srcdir}
  145.  
  146.   # cambria.ttc is a TrueType Collection (TTC) which causes problems with
  147.   # LibreOffice (Cambria Reguar cannot be selected) so we need to convert
  148.   # the TTC into a TrueType Font (TTF).
  149.   FONTFORGE_LANGUAGE=ff fontforge -c 'Open("cambria.ttc(Cambria)"); Generate("cambria.ttf")'
  150. }
  151.  
  152. package() {
  153.   cd ${srcdir}
  154.  
  155.   # Prepare destination directory
  156.   install -d -m 755 "${pkgdir}/usr/share/fonts/TTF"
  157.  
  158.   # Install fonts and license
  159.   install -m 644 *.ttf "${pkgdir}/usr/share/fonts/TTF"
  160.   install -D -m 644 "license.rtf" "${pkgdir}/usr/share/licenses/${pkgname}/license.rtf"
  161. }
  162.  
  163. # vim: set ts=2 sw=2 ft=sh noet:
clone this paste RAW Paste Data