fontist 1.1.0 → 1.5.0

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 +8 -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 +156 -0
  18. data/lib/fontist/errors.rb +7 -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 +156 -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 +6 -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 +89 -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 +101 -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 +69 -0
  65. data/lib/fontist/utils/downloader.rb +24 -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 +12 -19
  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 -147
  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,79 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class AndaleFont < FontFormula
4
- key :andale_font
5
- desc "Microsoft TrueType Core fonts for the Web"
6
- homepage "https://www.microsoft.com"
7
-
8
- resource "andale32.exe" do
9
- urls [
10
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/andale32.exe",
11
- "http://sft.if.usp.br/msttcorefonts/andale32.exe"
12
- ]
13
- sha256 "0524fe42951adc3a7eb870e32f0920313c71f170c859b5f770d82b4ee111e970"
14
- end
15
-
16
- provides_font("Andale Mono", match_styles_from_file: {
17
- "Regular" => "AndaleMo.TTF"
18
- })
19
-
20
- def extract
21
- resource "andale32.exe" do |resource|
22
- cab_extract(resource) do |dir|
23
- match_fonts(dir, "Andale Mono")
24
- end
25
- end
26
-
27
- end
28
-
29
- def install
30
- case platform
31
- when :macos
32
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
33
- when :linux
34
- install_matched_fonts "/usr/share/fonts/truetype/vista"
35
- end
36
- end
37
-
38
- test do
39
- case platform
40
- when :macos
41
- assert_predicate "$HOME/Library/Fonts/Microsoft/AndaleMo.ttf", :exist?
42
- when :linux
43
- assert_predicate "/usr/share/fonts/truetype/vista/AndaleMo.ttf", :exist?
44
- end
45
- end
46
-
47
- requires_license_agreement <<~EOS
48
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
49
- TrueType core fonts for the Web EULA
50
- END-USER LICENSE AGREEMENT FOR
51
- MICROSOFT SOFTWARE
52
- 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.
53
- SOFTWARE PRODUCT LICENSE
54
- 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.
55
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
56
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
57
- * 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.
58
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
59
- * 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.
60
- * 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.
61
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
62
- * 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.
63
- 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.
64
- 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.
65
- LIMITED WARRANTY
66
- 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.
67
- 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.
68
- MISCELLANEOUS
69
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
70
- If this product was acquired outside the United States, then local laws may apply.
71
- 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.
72
- this page was last updated 28 July 1998
73
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
74
- comments to the MST group: ttwsite@microsoft.com
75
- EOS
76
- end
77
- end
78
-
79
- end
@@ -1,78 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class ArialBlackFont < FontFormula
4
- key :arial_black
5
- desc "Microsoft TrueType Core fonts for the Web"
6
- homepage "https://www.microsoft.com"
7
-
8
- resource "arialb32.exe" do
9
- urls [
10
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/arialb32.exe",
11
- "http://sft.if.usp.br/msttcorefonts/arialb32.exe"
12
- ]
13
- sha256 "a425f0ffb6a1a5ede5b979ed6177f4f4f4fdef6ae7c302a7b7720ef332fec0a8"
14
- end
15
-
16
- provides_font("Arial Black", match_styles_from_file: {
17
- "Regular" => "AriBlk.TTF"
18
- })
19
-
20
- def extract
21
- resource "arialb32.exe" do |resource|
22
- cab_extract(resource) do |dir|
23
- match_fonts(dir, "Arial Black")
24
- end
25
- end
26
- end
27
-
28
- def install
29
- case platform
30
- when :macos
31
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
32
- when :linux
33
- install_matched_fonts "/usr/share/fonts/truetype/vista"
34
- end
35
- end
36
-
37
- test do
38
- case platform
39
- when :macos
40
- assert_predicate "$HOME/Library/Fonts/Microsoft/AriBlk.ttf", :exist?
41
- when :linux
42
- assert_predicate "/usr/share/fonts/truetype/vista/AriBlk.ttf", :exist?
43
- end
44
- end
45
-
46
- requires_license_agreement <<~EOS
47
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
48
- TrueType core fonts for the Web EULA
49
- END-USER LICENSE AGREEMENT FOR
50
- MICROSOFT SOFTWARE
51
- 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.
52
- SOFTWARE PRODUCT LICENSE
53
- 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.
54
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
55
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
56
- * 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.
57
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
58
- * 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.
59
- * 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.
60
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
61
- * 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.
62
- 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.
63
- 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.
64
- LIMITED WARRANTY
65
- 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.
66
- 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.
67
- MISCELLANEOUS
68
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
69
- If this product was acquired outside the United States, then local laws may apply.
70
- 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.
71
- this page was last updated 28 July 1998
72
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
73
- comments to the MST group: ttwsite@microsoft.com
74
- EOS
75
- end
76
- end
77
-
78
- end
@@ -1,226 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class ClearTypeFonts < Fontist::FontFormula
4
- key :cleartype
5
- desc "Microsoft ClearType Fonts"
6
- homepage "https://www.microsoft.com"
7
-
8
- display_progress_bar(true)
9
- resource "PowerPointViewer.exe" do
10
- urls [
11
- "https://nchc.dl.sourceforge.net/project/mscorefonts2/cabs/PowerPointViewer.exe",
12
- "https://sourceforge.net/projects/mscorefonts2/files/cabs/PowerPointViewer.exe/download",
13
- "https://web.archive.org/web/20171225132744/http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe",
14
- "https://archive.org/download/PowerPointViewer_201801/PowerPointViewer.exe"
15
- ]
16
-
17
- sha256 [
18
- "249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423",
19
- "c4e753548d3092ffd7dd3849105e0a26d9b5a1afe46e6e667fe7c6887893701f",
20
- ]
21
-
22
- file_size "62914560"
23
- end
24
-
25
- provides_font_collection do |coll|
26
- filename "CAMBRIA.TTC"
27
- provides_font "Cambria", extract_styles_from_collection: {
28
- "Regular" => "Cambria"
29
- }
30
- provides_font "Cambria Math"
31
- end
32
-
33
- provides_font_collection do |coll|
34
- filename "MEIRYO.TTC"
35
- provides_font "Meiryo", extract_styles_from_collection: {
36
- "Regular" => "Meiryo",
37
- "Italic" => "Meiryo Italic"
38
- }
39
-
40
- provides_font "Meiryo UI", extract_styles_from_collection: {
41
- "Regular" => "Meiryo UI",
42
- "Italic" => "Meiryo UI Italic"
43
- }
44
- end
45
-
46
- provides_font_collection("Meiryo Bold") do |coll|
47
- filename "MEIRYOB.TTC"
48
- provides_font "Meiryo", extract_styles_from_collection: {
49
- "Bold" => "Meiryo Bold",
50
- "Bold Italic" => "Meiryo Bold Italic"
51
- }
52
-
53
- provides_font "Meiryo UI", extract_styles_from_collection: {
54
- "Bold" => "Meiryo UI Bold",
55
- "Bold Italic" => "Meiryo UI Bold Italic"
56
- }
57
- end
58
-
59
- provides_font("Cambria", match_styles_from_file: {
60
- "Bold" => "CAMBRIAB.TTF",
61
- "Italic" => "CAMBRIAI.TTF",
62
- "Bold Italic" => "CAMBRIAZ.TTF",
63
- })
64
-
65
- provides_font("Calibri", match_styles_from_file: {
66
- "Regular" => "CALIBRI.TTF",
67
- "Bold" => "CALIBRIB.TTF",
68
- "Italic" => "CALIBRII.TTF",
69
- "Bold Italic" => "CALIBRIZ.TTF"
70
- })
71
-
72
- provides_font("Candara", match_styles_from_file: {
73
- "Regular" => "CANDARA.TTF",
74
- "Bold" => "CANDARAB.TTF",
75
- "Italic" => "CANDARAI.TTF",
76
- "Bold Italic" => "CANDARAZ.TTF"
77
- })
78
-
79
- provides_font("Consola", match_styles_from_file: {
80
- "Regular" => "CONSOLA.TTF",
81
- "Bold" => "CONSOLAB.TTF",
82
- "Italic" => "CONSOLAI.TTF",
83
- "Bold Italic" => "CONSOLAZ.TTF"
84
- })
85
-
86
- provides_font("Constantia", match_styles_from_file: {
87
- "Regular" => "CONSTAN.TTF",
88
- "Bold" => "CONSTANB.TTF",
89
- "Italic" => "CONSTANI.TTF",
90
- "Bold Italic" => "CONSTANZ.TTF"
91
- })
92
-
93
- provides_font("Corbel", match_styles_from_file: {
94
- "Regular" => "CORBEL.TTF",
95
- "Bold" => "CORBELB.TTF",
96
- "Italic" => "CORBELI.TTF",
97
- "Bold Italic" => "CORBELZ.TTF"
98
- })
99
-
100
- def extract
101
- resource("PowerPointViewer.exe") do |resource|
102
- exe_extract(resource) do |dir|
103
- cab_extract(dir["ppviewer.cab"]) do |fontdir|
104
- match_fonts(fontdir, "Calibri")
105
- match_fonts(fontdir, "Cambria")
106
- match_fonts(fontdir, "Candara")
107
- match_fonts(fontdir, "Consola")
108
- match_fonts(fontdir, "Constantia")
109
- match_fonts(fontdir, "Corbel")
110
- match_fonts(fontdir, "Meiryo")
111
- match_fonts(fontdir, "Meiryo UI")
112
- end
113
- end
114
- end
115
- end
116
-
117
- def install
118
- case platform
119
- when :macos
120
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
121
- when :linux
122
- install_matched_fonts "/usr/share/fonts/truetype/cleartype"
123
- end
124
- end
125
-
126
- def caveats
127
- "Show caveats here"
128
- end
129
-
130
- test do
131
- case platform
132
- when :macos
133
- assert_predicate "$HOME/Library/Fonts/Microsoft/candarab.ttf", :exist?
134
- when :linux
135
- assert_predicate "/usr/share/fonts/truetype/cleartype/candarab.ttf", :exist?
136
- end
137
- end
138
-
139
- requires_license_agreement <<~EOS
140
- MICROSOFT SOFTWARE LICENSE TERMS
141
- MICROSOFT POWERPOINT VIEWER
142
- These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
143
-
144
- * updates,
145
- * supplements,
146
- * Internet-based services, and
147
- * support services
148
-
149
- for this software, unless other terms accompany those items. If so, those terms apply.
150
-
151
- BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
152
-
153
- If you comply with these license terms, you have the rights below.
154
-
155
- 1. INSTALLATION AND USE RIGHTS.
156
-
157
- a. General. You may install and use any number of copies of the software on your devices. You may use the software only to view and print files created with Microsoft Office software. You may not use the software for any other purpose.
158
-
159
- b. Distribution. You may copy and distribute the software, provided that:
160
-
161
- * each copy is complete and unmodified, including presentation of this agreement for each user's acceptance; and
162
- * you indemnify, defend, and hold harmless Microsoft and its affiliates and suppliers from any claims, including attorneys fees, related to your distribution of the software.
163
-
164
- You may not:
165
-
166
- * distribute the software with any non-Microsoft software that may use the software to enhance its functionality,
167
- * alter any copyright, trademark or patent notices in the software,
168
- * use Microsoft s or affiliates or suppliers name, logo or trademarks to market your products or services,
169
- * distribute the software with malicious, deceptive or unlawful programs, or
170
- * modify or distribute the software so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
171
- * the code be disclosed or distributed in source code form; or
172
- * others have the right to modify it.
173
-
174
- 2. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
175
-
176
- * work around any technical limitations in the software;
177
- * reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
178
- * make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
179
- * publish the software for others to copy;
180
- * rent, lease or lend the software; or
181
- * use the software for commercial software hosting services.
182
-
183
- 3. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
184
-
185
- 4. FONT COMPONENTS. While the software is running, you may use its fonts to display and print content. You may only
186
-
187
- * embed fonts in content as permitted by the embedding restrictions in the fonts; and
188
- * temporarily download them to a printer or other output device to print content.
189
-
190
- 5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
191
-
192
- 6. TRANSFER TO ANOTHER DEVICE. You may uninstall the software and install it on another device for your use. You may not do so to share this license between devices.
193
-
194
- 7. TRANSFER TO A THIRD PARTY. The first user of the software may transfer it and this agreement directly to a third party. Before the transfer, that party must agree that this agreement applies to the transfer and use of the software. The first user must uninstall the software before transferring it separately from the device. The first user may not retain any copies.
195
-
196
- 8. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
197
-
198
- 9. SUPPORT SERVICES. Because this software is as is, we may not provide support services for it.
199
-
200
- 10. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
201
-
202
- 11. APPLICABLE LAW.
203
-
204
- a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
205
-
206
- b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
207
-
208
- 12. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
209
-
210
- 13. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED AS-IS. YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
211
-
212
- 14. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
213
-
214
- This limitation applies to
215
-
216
- * anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
217
- * claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
218
-
219
- It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
220
-
221
- EULAID:O14_RTM_PPV.1_RTM_EN
222
-
223
- EOS
224
- end
225
- end
226
- end
@@ -1,77 +0,0 @@
1
- module Fontist
2
- module Formulas
3
- class ComicFont < FontFormula
4
- desc "Microsoft TrueType Core fonts for the Web"
5
- homepage "https://www.microsoft.com"
6
-
7
- resource "comic32.exe" do
8
- urls [
9
- "https://nchc.dl.sourceforge.net/project/corefonts/the%20fonts/final/comic32.exe",
10
- "http://sft.if.usp.br/msttcorefonts/comic32.exe"
11
- ]
12
- sha256 "9c6df3feefde26d4e41d4a4fe5db2a89f9123a772594d7f59afd062625cd204e"
13
- end
14
-
15
- provides_font("Comic Sans", match_styles_from_file: {
16
- "Regular" => "Comic.TTF",
17
- "Bold" => "Comicbd.TTF"
18
- })
19
-
20
- def extract
21
- resource "comic32.exe" do |resource|
22
- cab_extract(resource) do |dir|
23
- match_fonts(dir, "Comic Sans")
24
- end
25
- end
26
- end
27
-
28
- def install
29
- case platform
30
- when :macos
31
- install_matched_fonts "$HOME/Library/Fonts/Microsoft"
32
- when :linux
33
- install_matched_fonts "/usr/share/fonts/truetype/vista"
34
- end
35
- end
36
-
37
- test do
38
- case platform
39
- when :macos
40
- assert_predicate "$HOME/Library/Fonts/Microsoft/Comic.ttf", :exist?
41
- when :linux
42
- assert_predicate "/usr/share/fonts/truetype/vista/Comic.ttf", :exist?
43
- end
44
- end
45
-
46
- requires_license_agreement <<~EOS
47
- (from http://web.archive.org/web/20011222020409/http://www.microsoft.com/typography/fontpack/eula.htm)
48
- TrueType core fonts for the Web EULA
49
- END-USER LICENSE AGREEMENT FOR
50
- MICROSOFT SOFTWARE
51
- 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.
52
- SOFTWARE PRODUCT LICENSE
53
- 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.
54
- 1. GRANT OF LICENSE. This EULA grants you the following rights:
55
- * Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
56
- * 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.
57
- 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
58
- * 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.
59
- * 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.
60
- * Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
61
- * 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.
62
- 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.
63
- 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.
64
- LIMITED WARRANTY
65
- 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.
66
- 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.
67
- MISCELLANEOUS
68
- If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
69
- If this product was acquired outside the United States, then local laws may apply.
70
- 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.
71
- this page was last updated 28 July 1998
72
- © 1997 Microsoft Corporation. All rights reserved. Terms of use.
73
- comments to the MST group: ttwsite@microsoft.com
74
- EOS
75
- end
76
- end
77
- end