fontist 1.2.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/check_google.yml +28 -0
  3. data/.github/workflows/macosx.yml +3 -0
  4. data/.github/workflows/ubuntu.yml +1 -1
  5. data/.github/workflows/windows.yml +1 -1
  6. data/.gitignore +6 -0
  7. data/.hound.yml +2 -0
  8. data/.rubocop.yml +22 -0
  9. data/README.md +224 -0
  10. data/bin/check_google +8 -0
  11. data/bin/convert_formulas +8 -0
  12. data/bin/fontist +7 -0
  13. data/bin/generate_otfinfo +8 -0
  14. data/bin/import_google +8 -0
  15. data/fontist.gemspec +16 -1
  16. data/lib/fontist.rb +23 -13
  17. data/lib/fontist/cli.rb +157 -0
  18. data/lib/fontist/errors.rb +6 -1
  19. data/lib/fontist/font.rb +165 -6
  20. data/lib/fontist/font_formula.rb +8 -4
  21. data/lib/fontist/fontist_font.rb +70 -0
  22. data/lib/fontist/formula.rb +27 -9
  23. data/lib/fontist/formula_template.rb +108 -0
  24. data/lib/fontist/formulas.rb +41 -0
  25. data/lib/fontist/import.rb +9 -0
  26. data/lib/fontist/import/convert_formulas.rb +65 -0
  27. data/lib/fontist/import/create_formula.rb +74 -0
  28. data/lib/fontist/import/extractors.rb +5 -0
  29. data/lib/fontist/import/extractors/cab_extractor.rb +37 -0
  30. data/lib/fontist/import/extractors/extractor.rb +19 -0
  31. data/lib/fontist/import/extractors/ole_extractor.rb +41 -0
  32. data/lib/fontist/import/extractors/seven_zip_extractor.rb +44 -0
  33. data/lib/fontist/import/extractors/zip_extractor.rb +31 -0
  34. data/lib/fontist/import/files/collection_file.rb +47 -0
  35. data/lib/fontist/import/formula_builder.rb +162 -0
  36. data/lib/fontist/import/formula_serializer.rb +133 -0
  37. data/lib/fontist/import/google.rb +16 -0
  38. data/lib/fontist/import/google/fonts_public.md +10 -0
  39. data/lib/fontist/import/google/fonts_public.pb.rb +71 -0
  40. data/lib/fontist/import/google/fonts_public.proto +46 -0
  41. data/lib/fontist/import/google/new_fonts_fetcher.rb +121 -0
  42. data/lib/fontist/import/google/skiplist.yml +8 -0
  43. data/lib/fontist/import/google_check.rb +34 -0
  44. data/lib/fontist/import/google_import.rb +180 -0
  45. data/lib/fontist/import/helpers/hash_helper.rb +13 -0
  46. data/lib/fontist/import/helpers/system_helper.rb +23 -0
  47. data/lib/fontist/import/otf/font_file.rb +91 -0
  48. data/lib/fontist/import/otf_parser.rb +25 -0
  49. data/lib/fontist/import/otf_style.rb +29 -0
  50. data/lib/fontist/import/otfinfo/otfinfo_requirement.rb +22 -0
  51. data/lib/fontist/import/otfinfo/template.erb +20 -0
  52. data/lib/fontist/import/otfinfo_generate.rb +45 -0
  53. data/lib/fontist/import/recursive_extraction.rb +128 -0
  54. data/lib/fontist/import/template_helper.rb +19 -0
  55. data/lib/fontist/import/text_helper.rb +30 -0
  56. data/lib/fontist/manifest.rb +2 -0
  57. data/lib/fontist/manifest/common.rb +60 -0
  58. data/lib/fontist/manifest/install.rb +36 -0
  59. data/lib/fontist/manifest/locations.rb +13 -0
  60. data/lib/fontist/registry.rb +1 -0
  61. data/lib/fontist/system.yml +4 -1
  62. data/lib/fontist/system_font.rb +62 -22
  63. data/lib/fontist/utils.rb +5 -0
  64. data/lib/fontist/utils/cache.rb +72 -0
  65. data/lib/fontist/utils/downloader.rb +22 -4
  66. data/lib/fontist/utils/dsl.rb +4 -0
  67. data/lib/fontist/utils/dsl/font.rb +37 -0
  68. data/lib/fontist/utils/exe_extractor.rb +18 -18
  69. data/lib/fontist/utils/msi_extractor.rb +31 -0
  70. data/lib/fontist/utils/seven_zip_extractor.rb +41 -0
  71. data/lib/fontist/utils/system.rb +23 -0
  72. data/lib/fontist/utils/ui.rb +23 -0
  73. data/lib/fontist/utils/zip_extractor.rb +9 -4
  74. data/lib/fontist/version.rb +1 -1
  75. metadata +186 -49
  76. data/lib/fontist/formulas/andale_font.rb +0 -79
  77. data/lib/fontist/formulas/arial_black_font.rb +0 -78
  78. data/lib/fontist/formulas/cleartype_fonts.rb +0 -226
  79. data/lib/fontist/formulas/comic_font.rb +0 -77
  80. data/lib/fontist/formulas/courier_font.rb +0 -80
  81. data/lib/fontist/formulas/euphemia_font.rb +0 -85
  82. data/lib/fontist/formulas/georgia_font.rb +0 -79
  83. data/lib/fontist/formulas/impact_font.rb +0 -77
  84. data/lib/fontist/formulas/montserrat_font.rb +0 -132
  85. data/lib/fontist/formulas/ms_truetype_fonts.rb +0 -124
  86. data/lib/fontist/formulas/open_sans_fonts.rb +0 -263
  87. data/lib/fontist/formulas/overpass_font.rb +0 -73
  88. data/lib/fontist/formulas/source_fonts.rb +0 -109
  89. data/lib/fontist/formulas/stix_fonts.rb +0 -108
  90. data/lib/fontist/formulas/tahoma_font.rb +0 -146
  91. data/lib/fontist/formulas/webding_font.rb +0 -77
  92. data/spec/fontist/font_formula_spec.rb +0 -67
  93. data/spec/fontist/font_spec.rb +0 -87
  94. data/spec/fontist/formula_spec.rb +0 -67
  95. data/spec/fontist/formulas/andale_font_spec.rb +0 -29
  96. data/spec/fontist/formulas/arial_black_font_spec.rb +0 -29
  97. data/spec/fontist/formulas/cleartype_fonts_spec.rb +0 -38
  98. data/spec/fontist/formulas/comic_font_spec.rb +0 -29
  99. data/spec/fontist/formulas/courier_font_spec.rb +0 -29
  100. data/spec/fontist/formulas/euphemia_font_spec.rb +0 -29
  101. data/spec/fontist/formulas/georgia_font_spec.rb +0 -29
  102. data/spec/fontist/formulas/impact_font_spec.rb +0 -29
  103. data/spec/fontist/formulas/montserrat_font_spec.rb +0 -29
  104. data/spec/fontist/formulas/ms_truetype_fonts_spec.rb +0 -29
  105. data/spec/fontist/formulas/open_sans_fonts_spec.rb +0 -29
  106. data/spec/fontist/formulas/overpass_font_spec.rb +0 -29
  107. data/spec/fontist/formulas/source_fonts_spec.rb +0 -31
  108. data/spec/fontist/formulas/stix_fonts_spec.rb +0 -29
  109. data/spec/fontist/formulas/tahoma_font_spec.rb +0 -29
  110. data/spec/fontist/formulas/webding_font_spec.rb +0 -29
  111. data/spec/fontist/registry_spec.rb +0 -47
  112. data/spec/fontist/system_font_spec.rb +0 -44
  113. data/spec/fontist/utils/downloader_spec.rb +0 -35
  114. data/spec/fontist_spec.rb +0 -5
  115. data/spec/spec_helper.rb +0 -22
  116. data/spec/support/fontist_helper.rb +0 -10
@@ -1,80 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class CourierFont < FontFormula
4
- desc "Microsoft TrueType Core fonts for the Web"
5
- homepage "https://www.microsoft.com"
6
-
7
- resource "courie32.exe" do
8
- urls [
9
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/courie32.exe",
10
- "http://sft.if.usp.br/msttcorefonts/courie32.exe"
11
- ]
12
- sha256 "bb511d861655dde879ae552eb86b134d6fae67cb58502e6ff73ec5d9151f3384"
13
- end
14
-
15
- provides_font("Courier", match_styles_from_file: {
16
- "Regular" => "cour.ttf",
17
- "Italic" => "couri.ttf",
18
- "Bold Italic" => "courbi.ttf",
19
- "Bold" => "courbd.ttf"
20
- })
21
-
22
- def extract
23
- resource "courie32.exe" do |resource|
24
- cab_extract(resource) do |dir|
25
- match_fonts(dir, "Courier")
26
- end
27
- end
28
- end
29
-
30
- def install
31
- case platform
32
- when :macos
33
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
34
- when :linux
35
- install_matched_fonts "/usr/share/fonts/truetype/vista"
36
- end
37
- end
38
-
39
- test do
40
- case platform
41
- when :macos
42
- assert_predicate "$HOME/Library/Fonts/Microsoft/cour.ttf", :exist?
43
- when :linux
44
- assert_predicate "/usr/share/fonts/truetype/vista/cour.ttf", :exist?
45
- end
46
- end
47
-
48
- requires_license_agreement <<~EOS
49
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
50
- TrueType core fonts for the Web EULA
51
- END-USER LICENSE AGREEMENT FOR
52
- MICROSOFT SOFTWARE
53
- IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software accompanying this EULA, which includes computer software and may include associated media, printed materials, and "on-line" or electronic documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE PRODUCT.
54
- SOFTWARE PRODUCT LICENSE
55
- The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
56
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
57
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
58
- * Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.
59
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
60
- * Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
61
- * Restrictions on Alteration. You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents.
62
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
63
- * Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
64
- 3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material.
65
- 4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
66
- LIMITED WARRANTY
67
- NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
68
- NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
69
- MISCELLANEOUS
70
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
71
- If this product was acquired outside the United States, then local laws may apply.
72
- Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399.
73
- this page was last updated 28 July 1998
74
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
75
- comments to the MST group: ttwsite@microsoft.com
76
- EOS
77
- end
78
- end
79
-
80
- end
@@ -1,85 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class EuphemiaFont < FontFormula
4
- desc "Euphemia Font"
5
- homepage "https://www.tiro.com/syllabics/resources/index.html"
6
-
7
- resource "euphemia.zip" do
8
- url "https://www.tiro.com/syllabics/resources/compiled_data_sources/Fonts/Euphemia/%202.6.6%20Euphemia%20UCAS.zip"
9
- sha256 "3a8a7181faf1a50e4cab35ad128ff11df7980c45e9c57e1f190f4355433b59f7"
10
- end
11
-
12
- provides_font("Euphemia UCAS", match_styles_from_file: {
13
- "Italic" => "Euphemia UCAS Italic 2.6.6.ttf",
14
- "Regular" => "Euphemia UCAS Regular 2.6.6.ttf",
15
- "Bold" => "Euphemia UCAS Bold 2.6.6.ttf"
16
- })
17
-
18
- def extract
19
- resource("euphemia.zip") do |resource|
20
- zip_extract(resource) do |fontdir|
21
- match_fonts(fontdir, "Euphemia UCAS")
22
- end
23
- end
24
- end
25
-
26
- def install
27
- case platform
28
- when :macos
29
- install_matched_fonts "$HOME/Library/Fonts/Euphemia"
30
- when :linux
31
- install_matched_fonts "/usr/share/fonts/truetype/euphemia"
32
- end
33
- end
34
-
35
- test do
36
- case platform
37
- when :macos
38
- assert_predicate "$HOME/Library/Fonts/Euphemia/Euphemia UCAS Italic 2.6.6.ttf", :exist?
39
- when :linux
40
- assert_predicate "/usr/share/fonts/truetype/euphemia/Euphemia UCAS Italic 2.6.6.ttf", :exist?
41
- end
42
- end
43
-
44
- license_url "https://www.tiro.com/syllabics/resources/euphemia_EULA.html"
45
-
46
- open_license <<~EOS
47
- FONT SOFTWARE PRODUCT LICENSE
48
- The FONT SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The FONT SOFTWARE is licensed, not sold.
49
-
50
- Subject to the foregoing, Tiro Typeworks grants you a perpetual non-exclusive license to use the Font Software with the following terms and conditions:
51
-
52
- 1. ACCEPTANCE OF TERMS
53
- Installation and use of this software constitutes acceptance of the terms of this licence agreement.
54
-
55
- 2. GRANT OF LICENSE. This document grants you the following rights:
56
- - Installation and Use. You may install and use the Font Software on up to 100 computers or users, provided that you agree to inform your employees or any other person having access to the Font Software and copies thereof, of the terms and conditions of this Font Software License Agreement and to ensure that they shall strictly abide by these terms and conditions. A Distribution Agreement must be purchased to in any form re-distribute the Font Software. Tiro Typeworks and its Licensed Distributors has the right to terminate your license immediately if you fail to comply with any term of this Agreement. Upon termination, you must destroy the original and any and all copies of the Font Software.
57
-
58
- 2.1 You acknowledge that the Font Software is the intellectual property of Tiro Typeworks and/or its several licensors. The term Font Software shall also include any updates, upgrades, additions, modified versions, and work copies of the Font Software licensed to you by Tiro Typeworks. The media itself is and shall remain the property of Tiro Typeworks. Expanded versions, subsets or other derivatives of this design may also exist under other names and be distributed by Tiro Typeworks or other licensed Distributors.
59
-
60
- 2.2 Modification. You are not allowed to without written approval granted by Tiro Typeworks:
61
- - modify, reverse compile or merge or ship the Font Software with other software programs,
62
- - adapt modules, produce sub-sets or supersets or alter any internal font data thereof for your own developments, or
63
- - put the software solutions embodied in the Font Software to any commercial use other than operating your own computer or output device.
64
- - modify and/or recompile the Font Software: this includes generating or re-compiling the Font Software from any font design program. (where a 'font design' program is any piece of software capable of reading and re-compiling any standard font format)
65
-
66
- PLEASE CONTACT TIRO TYPEWORKS OR A LICENSED DISTRIBUTOR IF THERE ARE SPECIFIC MODIFICATIONS THAT YOU REQUIRE.
67
-
68
- 2.3 You are only allowed to transfer or assign the Font-Software to a third party if such transfer complies with all of the following conditions:
69
- - The recipient confirms their consent to all terms and conditions of this Font-Software License Agreement.
70
-
71
- 2.4 Only for the purpose of outputting particular files may you take a copy of the font(s) you have used for such files to a commercial printer or other service bureau, and only if such service bureau has informed you that it has purchased or has been granted a license to use the respective Font-Software. As this font is distributed under a free license, any service bureau or commercial printer may also obtain a license with no cost associated with acquiring a license to the font(s). Only those parties specifically granted 'Distribution Rights' may distribute and grant licenses to the Font Software. Such Distribution Rights may be obtained by contacting Tiro Typeworks.
72
-
73
- 2.5 Portable Documents. You may "embed" the Font Software within PostScript-Language files, .PDF files, and .EVY files for distribution, viewing, and imaging to other parties.
74
-
75
- 3. Disclaimer and Limited Warranty.
76
- AS ALLOWED BY LAW, THE SOFTWARE AND ACCOMPANYING WRITTEN MATERIALS ARE PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, AND TIRO TYPEWORKS AND ASSOCIATIONS OR COMPANIES DISTRIBUTING THE FONT SOFTWARE DISCLAIMS THE WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY. IN ADDITION, TIRO TYPEWORKS AND ASSOCIATIONS OR COMPANIES DISTRIBUTING THE FONT SOFTWARE DOES NOT MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SOFTWARE OR THE WRITTEN MATERIALS IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK AS A RESULT OF THE PERFORMANCE OF THE SOFTWARE IS ASSUMED BY THE USER.
77
-
78
- 4. Without limiting the generality of the foregoing, you agree that you will not distribute or disseminate all or any part of the Font Software through any on-line service and you further agree that any such intentional distribution shall constitute a theft by you of a valuable property of Tiro Typeworks and/or its suppliers.
79
-
80
- 5. Governing Law
81
- This agreement is governed by the laws of the Canada. In the event that any provision of this agreement is held to be illegal or otherwise unenforceable, such provision shall be deemed to have been deleted from this agreement, while the remaining provisions of this agreement shall be unaffected and shall continue in full force and effect.
82
- EOS
83
- end
84
- end
85
- end
@@ -1,79 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class GeorgiaFont < FontFormula
4
- desc "Microsoft TrueType Core fonts for the Web"
5
- homepage "https://www.microsoft.com"
6
-
7
- resource "georgi32.exe" do
8
- urls [
9
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/georgi32.exe",
10
- "http://sft.if.usp.br/msttcorefonts/georgi32.exe"
11
- ]
12
- sha256 "2c2c7dcda6606ea5cf08918fb7cd3f3359e9e84338dc690013f20cd42e930301"
13
- end
14
-
15
- provides_font("Georgia", match_styles_from_file: {
16
- "Regular" => "Georgia.TTF",
17
- "Italic" => "Georgiai.TTF",
18
- "Bold Italic" => "Georgiaz.TTF",
19
- "Bold" => "Georgiab.TTF"
20
- })
21
-
22
- def extract
23
- resource "georgi32.exe" do |resource|
24
- cab_extract(resource) do |dir|
25
- match_fonts(dir, "Georgia")
26
- end
27
- end
28
- end
29
-
30
- def install
31
- case platform
32
- when :macos
33
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
34
- when :linux
35
- install_matched_fonts "/usr/share/fonts/truetype/vista"
36
- end
37
- end
38
-
39
- test do
40
- case platform
41
- when :macos
42
- assert_predicate "$HOME/Library/Fonts/Microsoft/Georgia.ttf", :exist?
43
- when :linux
44
- assert_predicate "/usr/share/fonts/truetype/vista/Georgia.ttf", :exist?
45
- end
46
- end
47
-
48
- requires_license_agreement <<~EOS
49
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
50
- TrueType core fonts for the Web EULA
51
- END-USER LICENSE AGREEMENT FOR
52
- MICROSOFT SOFTWARE
53
- IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software accompanying this EULA, which includes computer software and may include associated media, printed materials, and "on-line" or electronic documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE PRODUCT.
54
- SOFTWARE PRODUCT LICENSE
55
- The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
56
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
57
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
58
- * Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.
59
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
60
- * Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
61
- * Restrictions on Alteration. You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents.
62
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
63
- * Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
64
- 3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material.
65
- 4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
66
- LIMITED WARRANTY
67
- NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
68
- NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
69
- MISCELLANEOUS
70
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
71
- If this product was acquired outside the United States, then local laws may apply.
72
- Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399.
73
- this page was last updated 28 July 1998
74
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
75
- comments to the MST group: ttwsite@microsoft.com
76
- EOS
77
- end
78
- end
79
- end
@@ -1,77 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class ImpactFont < FontFormula
4
- desc "Microsoft TrueType Core fonts for the Web"
5
- homepage "https://www.microsoft.com"
6
-
7
- resource "impact32.exe" do
8
- urls [
9
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/impact32.exe",
10
- "http://sft.if.usp.br/msttcorefonts/impact32.exe"
11
- ]
12
- sha256 "6061ef3b7401d9642f5dfdb5f2b376aa14663f6275e60a51207ad4facf2fccfb"
13
- end
14
-
15
- provides_font("Impact", match_styles_from_file: {
16
- "Regular" => "Impact.TTF"
17
- })
18
-
19
- def extract
20
- resource "impact32.exe" do |resource|
21
- cab_extract(resource) do |dir|
22
- match_fonts(dir, "Impact")
23
- end
24
- end
25
- end
26
-
27
- def install
28
- case platform
29
- when :macos
30
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
31
- when :linux
32
- install_matched_fonts "/usr/share/fonts/truetype/vista"
33
- end
34
- end
35
-
36
- test do
37
- case platform
38
- when :macos
39
- assert_predicate "$HOME/Library/Fonts/Microsoft/Impact.ttf", :exist?
40
- when :linux
41
- assert_predicate "/usr/share/fonts/truetype/vista/Impact.ttf", :exist?
42
- end
43
- end
44
-
45
- requires_license_agreement <<~EOS
46
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
47
- TrueType core fonts for the Web EULA
48
- END-USER LICENSE AGREEMENT FOR
49
- MICROSOFT SOFTWARE
50
- IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software accompanying this EULA, which includes computer software and may include associated media, printed materials, and "on-line" or electronic documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE PRODUCT.
51
- SOFTWARE PRODUCT LICENSE
52
- The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
53
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
54
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
55
- * Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA. Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.
56
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
57
- * Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
58
- * Restrictions on Alteration. You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents.
59
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
60
- * Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
61
- 3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material.
62
- 4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
63
- LIMITED WARRANTY
64
- NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
65
- NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
66
- MISCELLANEOUS
67
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
68
- If this product was acquired outside the United States, then local laws may apply.
69
- Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399.
70
- this page was last updated 28 July 1998
71
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
72
- comments to the MST group: ttwsite@microsoft.com
73
- EOS
74
- end
75
- end
76
-
77
- end
@@ -1,132 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class MontserratFont < FontFormula
4
- desc "Montserrat Font"
5
- homepage "https://github.com/JulietaUla/Montserrat"
6
-
7
- resource "montserrat.zip" do
8
- url "https://www.fontsquirrel.com/fonts/download/montserrat"
9
-
10
- # Same issue here
11
- # sha256 "ea1d3721cba61e4de81f4425dee191c904e44129c07d825082d70ee4e168c437"
12
- end
13
-
14
- provides_font("Montserrat", match_styles_from_file: {
15
- "Thin" => "Montserrat-Thin.otf",
16
- "ThinItalic" => "Montserrat-ThinItalic.otf",
17
- "ExtraLight" => "Montserrat-ExtraLight.otf",
18
- "ExtraLight Italic" => "Montserrat-ExtraLightItalic.otf",
19
- "Light" => "Montserrat-Light.otf",
20
- "Light Italic" => "Montserrat-LightItalic.otf",
21
- "Regular" => "Montserrat-Regular.otf",
22
- "Italic" => "Montserrat-Italic.otf",
23
- "Medium" => "Montserrat-Medium.otf",
24
- "Medium Italic" => "Montserrat-MediumItalic.otf",
25
- "SemiBold" => "Montserrat-SemiBold.otf",
26
- "SemiBold Italic" => "Montserrat-SemiBoldItalic.otf",
27
- "Bold" => "Montserrat-Bold.otf",
28
- "Bold Italic" => "Montserrat-BoldItalic.otf",
29
- "ExtraBold" => "Montserrat-ExtraBold.otf",
30
- "ExtraBold Italic" => "Montserrat-ExtraBoldItalic.otf",
31
- "Black" => "Montserrat-Black.otf",
32
- "Black Italic" => "Montserrat-BlackItalic.otf"
33
- })
34
-
35
- provides_font("Montserrat Alternates", match_styles_from_file: {
36
- "Thin" => "MontserratAlternates-Thin.otf",
37
- "Thin Italic" => "MontserratAlternates-ThinItalic.otf",
38
- "ExtraLight" => "MontserratAlternates-ExtraLight.otf",
39
- "ExtraLight Italic" => "MontserratAlternates-ExtraLightItalic.otf",
40
- "Light" => "MontserratAlternates-Light.otf",
41
- "Light Italic" => "MontserratAlternates-LightItalic.otf",
42
- "Regular" => "MontserratAlternates-Regular.otf",
43
- "Italic" => "MontserratAlternates-Italic.otf",
44
- "Medium" => "MontserratAlternates-Medium.otf",
45
- "Medium Italic" => "MontserratAlternates-MediumItalic.otf",
46
- "SemiBold" => "MontserratAlternates-SemiBold.otf",
47
- "SemiBold Italic" => "MontserratAlternates-SemiBoldItalic.otf",
48
- "Bold" => "MontserratAlternates-Bold.otf",
49
- "Bold Italic" => "MontserratAlternates-BoldItalic.otf",
50
- "ExtraBold" => "MontserratAlternates-ExtraBold.otf",
51
- "ExtraBold Italic" => "MontserratAlternates-ExtraBoldItalic.otf",
52
- "Black" => "MontserratAlternates-Black.otf",
53
- "Black Italic" => "MontserratAlternates-BlackItalic.otf",
54
- })
55
-
56
- def extract
57
- resource("montserrat.zip") do |resource|
58
- zip_extract(resource) do |fontdir|
59
- match_fonts(fontdir, "Montserrat")
60
- match_fonts(fontdir, "Montserrat Alternates")
61
- end
62
- end
63
- end
64
-
65
- def install
66
- case platform
67
- when :macos
68
- install_matched_fonts "$HOME/Library/Fonts/Montserrat"
69
- when :linux
70
- install_matched_fonts "/usr/share/fonts/truetype/montserrat"
71
- end
72
- end
73
-
74
- test do
75
- case platform
76
- when :macos
77
- assert_predicate "$HOME/Library/Fonts/Montserrat/MontserratAlternates-Thin.otf", :exist?
78
- when :linux
79
- assert_predicate "/usr/share/fonts/truetype/montserrat/MontserratAlternates-Thin.otf", :exist?
80
- end
81
- end
82
-
83
- open_license <<~EOS
84
- Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat)
85
-
86
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
87
- This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
88
-
89
- -----------------------------------------------------------
90
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
91
- -----------------------------------------------------------
92
-
93
- PREAMBLE
94
- The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
95
-
96
- The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
97
-
98
- DEFINITIONS
99
- "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
100
-
101
- "Reserved Font Name" refers to any names specified as such after the copyright statement(s).
102
-
103
- "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
104
-
105
- "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
106
-
107
- "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
108
-
109
- PERMISSION & CONDITIONS
110
- Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
111
-
112
- 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
113
-
114
- 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
115
-
116
- 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
117
-
118
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
119
-
120
- 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
121
-
122
- TERMINATION
123
- This license becomes null and void if any of the above conditions are not met.
124
-
125
- DISCLAIMER
126
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
127
-
128
- EOS
129
-
130
- end
131
- end
132
- end