Showing
62 changed files
with
4099 additions
and
111 deletions
Too many changes to show.
To preserve performance only 62 of 62+ files are displayed.
No preview for this file type
No preview for this file type
1 | +Apache License | |
2 | + | |
3 | +Version 2.0, January 2004 | |
4 | + | |
5 | +http://www.apache.org/licenses/ | |
6 | + | |
7 | +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
8 | + | |
9 | +1. Definitions. | |
10 | + | |
11 | +"License" shall mean the terms and conditions for use, reproduction, | |
12 | +and distribution as defined by Sections 1 through 9 of this document. | |
13 | + | |
14 | +"Licensor" shall mean the copyright owner or entity authorized by the | |
15 | +copyright owner that is granting the License. | |
16 | + | |
17 | +"Legal Entity" shall mean the union of the acting entity and all other | |
18 | +entities that control, are controlled by, or are under common control | |
19 | +with that entity. For the purposes of this definition, "control" means | |
20 | +(i) the power, direct or indirect, to cause the direction or | |
21 | +management of such entity, whether by contract or otherwise, or (ii) | |
22 | +ownership of fifty percent (50%) or more of the outstanding shares, or | |
23 | +(iii) beneficial ownership of such entity. | |
24 | + | |
25 | +"You" (or "Your") shall mean an individual or Legal Entity exercising | |
26 | +permissions granted by this License. | |
27 | + | |
28 | +"Source" form shall mean the preferred form for making modifications, | |
29 | +including but not limited to software source code, documentation | |
30 | +source, and configuration files. | |
31 | + | |
32 | +"Object" form shall mean any form resulting from mechanical | |
33 | +transformation or translation of a Source form, including but not | |
34 | +limited to compiled object code, generated documentation, and | |
35 | +conversions to other media types. | |
36 | + | |
37 | +"Work" shall mean the work of authorship, whether in Source or Object | |
38 | +form, made available under the License, as indicated by a copyright | |
39 | +notice that is included in or attached to the work (an example is | |
40 | +provided in the Appendix below). | |
41 | + | |
42 | +"Derivative Works" shall mean any work, whether in Source or Object | |
43 | +form, that is based on (or derived from) the Work and for which the | |
44 | +editorial revisions, annotations, elaborations, or other modifications | |
45 | +represent, as a whole, an original work of authorship. For the | |
46 | +purposes of this License, Derivative Works shall not include works | |
47 | +that remain separable from, or merely link (or bind by name) to the | |
48 | +interfaces of, the Work and Derivative Works thereof. | |
49 | + | |
50 | +"Contribution" shall mean any work of authorship, including the | |
51 | +original version of the Work and any modifications or additions to | |
52 | +that Work or Derivative Works thereof, that is intentionally submitted | |
53 | +to Licensor for inclusion in the Work by the copyright owner or by an | |
54 | +individual or Legal Entity authorized to submit on behalf of the | |
55 | +copyright owner. For the purposes of this definition, "submitted" | |
56 | +means any form of electronic, verbal, or written communication sent to | |
57 | +the Licensor or its representatives, including but not limited to | |
58 | +communication on electronic mailing lists, source code control | |
59 | +systems, and issue tracking systems that are managed by, or on behalf | |
60 | +of, the Licensor for the purpose of discussing and improving the Work, | |
61 | +but excluding communication that is conspicuously marked or otherwise | |
62 | +designated in writing by the copyright owner as "Not a Contribution." | |
63 | + | |
64 | +"Contributor" shall mean Licensor and any individual or Legal Entity | |
65 | +on behalf of whom a Contribution has been received by Licensor and | |
66 | +subsequently incorporated within the Work. | |
67 | + | |
68 | +2. Grant of Copyright License. Subject to the terms and conditions of | |
69 | +this License, each Contributor hereby grants to You a perpetual, | |
70 | +worldwide, non-exclusive, no-charge, royalty-free, irrevocable | |
71 | +copyright license to reproduce, prepare Derivative Works of, publicly | |
72 | +display, publicly perform, sublicense, and distribute the Work and | |
73 | +such Derivative Works in Source or Object form. | |
74 | + | |
75 | +3. Grant of Patent License. Subject to the terms and conditions of | |
76 | +this License, each Contributor hereby grants to You a perpetual, | |
77 | +worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except | |
78 | +as stated in this section) patent license to make, have made, use, | |
79 | +offer to sell, sell, import, and otherwise transfer the Work, where | |
80 | +such license applies only to those patent claims licensable by such | |
81 | +Contributor that are necessarily infringed by their Contribution(s) | |
82 | +alone or by combination of their Contribution(s) with the Work to | |
83 | +which such Contribution(s) was submitted. If You institute patent | |
84 | +litigation against any entity (including a cross-claim or counterclaim | |
85 | +in a lawsuit) alleging that the Work or a Contribution incorporated | |
86 | +within the Work constitutes direct or contributory patent | |
87 | +infringement, then any patent licenses granted to You under this | |
88 | +License for that Work shall terminate as of the date such litigation | |
89 | +is filed. | |
90 | + | |
91 | +4. Redistribution. You may reproduce and distribute copies of the Work | |
92 | +or Derivative Works thereof in any medium, with or without | |
93 | +modifications, and in Source or Object form, provided that You meet | |
94 | +the following conditions: | |
95 | + | |
96 | +You must give any other recipients of the Work or Derivative Works a | |
97 | +copy of this License; and | |
98 | + | |
99 | +You must cause any modified files to carry prominent notices stating | |
100 | +that You changed the files; and | |
101 | + | |
102 | +You must retain, in the Source form of any Derivative Works that You | |
103 | +distribute, all copyright, patent, trademark, and attribution notices | |
104 | +from the Source form of the Work, excluding those notices that do not | |
105 | +pertain to any part of the Derivative Works; and | |
106 | + | |
107 | +If the Work includes a "NOTICE" text file as part of its distribution, | |
108 | +then any Derivative Works that You distribute must include a readable | |
109 | +copy of the attribution notices contained within such NOTICE file, | |
110 | +excluding those notices that do not pertain to any part of the | |
111 | +Derivative Works, in at least one of the following places: within a | |
112 | +NOTICE text file distributed as part of the Derivative Works; within | |
113 | +the Source form or documentation, if provided along with the | |
114 | +Derivative Works; or, within a display generated by the Derivative | |
115 | +Works, if and wherever such third-party notices normally appear. The | |
116 | +contents of the NOTICE file are for informational purposes only and do | |
117 | +not modify the License. You may add Your own attribution notices | |
118 | +within Derivative Works that You distribute, alongside or as an | |
119 | +addendum to the NOTICE text from the Work, provided that such | |
120 | +additional attribution notices cannot be construed as modifying the | |
121 | +License. | |
122 | + | |
123 | +You may add Your own copyright statement to Your modifications and may | |
124 | +provide additional or different license terms and conditions for use, | |
125 | +reproduction, or distribution of Your modifications, or for any such | |
126 | +Derivative Works as a whole, provided Your use, reproduction, and | |
127 | +distribution of the Work otherwise complies with the conditions stated | |
128 | +in this License. | |
129 | + | |
130 | +5. Submission of Contributions. Unless You explicitly state otherwise, | |
131 | +any Contribution intentionally submitted for inclusion in the Work by | |
132 | +You to the Licensor shall be under the terms and conditions of this | |
133 | +License, without any additional terms or conditions. Notwithstanding | |
134 | +the above, nothing herein shall supersede or modify the terms of any | |
135 | +separate license agreement you may have executed with Licensor | |
136 | +regarding such Contributions. | |
137 | + | |
138 | +6. Trademarks. This License does not grant permission to use the trade | |
139 | +names, trademarks, service marks, or product names of the Licensor, | |
140 | +except as required for reasonable and customary use in describing the | |
141 | +origin of the Work and reproducing the content of the NOTICE file. | |
142 | + | |
143 | +7. Disclaimer of Warranty. Unless required by applicable law or agreed | |
144 | +to in writing, Licensor provides the Work (and each Contributor | |
145 | +provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR | |
146 | +CONDITIONS OF ANY KIND, either express or implied, including, without | |
147 | +limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, | |
148 | +MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely | |
149 | +responsible for determining the appropriateness of using or | |
150 | +redistributing the Work and assume any risks associated with Your | |
151 | +exercise of permissions under this License. | |
152 | + | |
153 | +8. Limitation of Liability. In no event and under no legal theory, | |
154 | +whether in tort (including negligence), contract, or otherwise, unless | |
155 | +required by applicable law (such as deliberate and grossly negligent | |
156 | +acts) or agreed to in writing, shall any Contributor be liable to You | |
157 | +for damages, including any direct, indirect, special, incidental, or | |
158 | +consequential damages of any character arising as a result of this | |
159 | +License or out of the use or inability to use the Work (including but | |
160 | +not limited to damages for loss of goodwill, work stoppage, computer | |
161 | +failure or malfunction, or any and all other commercial damages or | |
162 | +losses), even if such Contributor has been advised of the possibility | |
163 | +of such damages. | |
164 | + | |
165 | +9. Accepting Warranty or Additional Liability. While redistributing | |
166 | +the Work or Derivative Works thereof, You may choose to offer, and | |
167 | +charge a fee for, acceptance of support, warranty, indemnity, or other | |
168 | +liability obligations and/or rights consistent with this | |
169 | +License. However, in accepting such obligations, You may act only on | |
170 | +Your own behalf and on Your sole responsibility, not on behalf of any | |
171 | +other Contributor, and only if You agree to indemnify, defend, and | |
172 | +hold each Contributor harmless for any liability incurred by, or | |
173 | +claims asserted against, such Contributor by reason of your accepting | |
174 | +any such warranty or additional liability. | ... | ... |
1 | +M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT | |
2 | + | |
3 | +- | |
4 | + | |
5 | +LICENSE_E | |
6 | + | |
7 | + | |
8 | + | |
9 | + | |
10 | +These fonts are free software. | |
11 | +Unlimited permission is granted to use, copy, and distribute them, with | |
12 | +or without modification, either commercially or noncommercially. | |
13 | +THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY. | |
14 | + | |
15 | + | |
16 | +http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/ | ... | ... |
No preview for this file type
1 | +NatuMono(ナツ モノ)フォント | |
2 | +version 2014.0812 | |
3 | + | |
4 | +源真ゴシック (げんしんゴシック)等幅 Regular | |
5 | +Version 1.000.20140807 | |
6 | +に以下の改変を加えました。 | |
7 | + | |
8 | +・濁点文字・半濁点文字を区別できるよう、半濁点を大きくする | |
9 | +・0O(数字ゼロ・大文字オー)を区別できるよう、数字ゼロにスラッシュを入れる | |
10 | +・大文字アイIの横棒が長すぎて半角カタカナのエに見えるので短くする。 | |
11 | +・カ力 エ工 ロ口 ー一 ニ二 タ夕 ト卜(カタカナ・漢字)を区別できるよう、漢字の字形を加工する | |
12 | +・へヘ(ひらがな・カタカナ)を区別できるよう、カタカナの字形を加工する | |
13 | +・~〜(FULLWIDTH TILDE U+FF5E・WAVE DASH U+301C)を区別できるよう、U+301CをUnicode字形にする | |
14 | + | |
15 | +現時点ではウェイトはRegularのみです。Boldはありません。 | |
16 | + | |
17 | + | |
18 | +作成環境 | |
19 | +・Windows 7 64bit | |
20 | +・unofficial fontforge-cygwin 2014_01_04 (FontForge 2.0.20140101+縦書きパッチ) | |
21 | +・源真ゴシック等幅 Regular Version 1.000.20140807 http://mm.xvs.jp/ | |
22 | + | |
23 | + | |
24 | +ライセンス | |
25 | +・NatuMonoフォントのフォントファイルは、源ノ角ゴシックと同じ Apache 2.0 License のもとで使用することができます。 | |
26 | +・フォントデータに含まれる、源ノ角ゴシック由来の文字グリフの著作権は Adobe が所有しています。 | |
27 | + 源真ゴシック等幅の半角等幅字形は、源ノ角ゴシックに含まれていたものだそうです。 | |
28 | +・フォントデータに含まれる、M+ OUTLINE FONTS 由来の文字グリフの著作権は M+ FONTS PROJECT が所有しています。 | |
29 | + | |
30 | + Apache 2.0 License の日本語訳は、以下から参照することができます。 | |
31 | + http://sourceforge.jp/projects/opensource/wiki/licenses%2FApache_License_2.0 | |
32 | + | |
33 | +-- | |
34 | +Itou Hiroki <itouhiro at users sourceforge dot jp> | |
\ No newline at end of file | ... | ... |
1 | +M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT | |
2 | + | |
3 | +- | |
4 | + | |
5 | +LICENSE_E | |
6 | + | |
7 | + | |
8 | + | |
9 | + | |
10 | +These fonts are free software. | |
11 | +Unlimited permission is granted to use, copy, and distribute them, with | |
12 | +or without modification, either commercially or noncommercially. | |
13 | +THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY. | |
14 | + | |
15 | + | |
16 | +http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/ | ... | ... |
1 | +M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT | |
2 | + | |
3 | +- | |
4 | + | |
5 | +README_E | |
6 | + | |
7 | + | |
8 | + | |
9 | + | |
10 | +M+ TESTFLIGHT | |
11 | + | |
12 | +The M+ OUTLINE FONTS are distributed with proportional Latin (4 variations), fixed-halfwidth Latin (3 variations) and fixed-fullwidth Japanese (2 Kana variations) character set. 7 weights from Thin to Black are included, but fixed-halfwidth Latin with 5 weights from Thin to Bold. | |
13 | + | |
14 | + | |
15 | +PROPORTIONAL FONTS (proportional Latin and fixed-fullwidth Japanese) | |
16 | + | |
17 | +M+ 1P mplus-1p-thin.ttf | |
18 | + mplus-1p-light.ttf | |
19 | + mplus-1p-regular.ttf | |
20 | + mplus-1p-medium.ttf | |
21 | + mplus-1p-bold.ttf | |
22 | + mplus-1p-heavy.ttf | |
23 | + mplus-1p-black.ttf | |
24 | + | |
25 | +M+ 2P mplus-2p-thin.ttf | |
26 | + mplus-2p-light.ttf | |
27 | + mplus-2p-regular.ttf | |
28 | + mplus-2p-medium.ttf | |
29 | + mplus-2p-bold.ttf | |
30 | + mplus-2p-heavy.ttf | |
31 | + mplus-2p-black.ttf | |
32 | + | |
33 | +M+ 1C mplus-1c-thin.ttf | |
34 | + mplus-1c-light.ttf | |
35 | + mplus-1c-regular.ttf | |
36 | + mplus-1c-medium.ttf | |
37 | + mplus-1c-bold.ttf | |
38 | + mplus-1c-heavy.ttf | |
39 | + mplus-1c-black.ttf | |
40 | + | |
41 | +M+ 2C mplus-2c-thin.ttf | |
42 | + mplus-2c-light.ttf | |
43 | + mplus-2c-regular.ttf | |
44 | + mplus-2c-medium.ttf | |
45 | + mplus-2c-bold.ttf | |
46 | + mplus-2c-heavy.ttf | |
47 | + mplus-2c-black.ttf | |
48 | + | |
49 | + | |
50 | +FIXED-WIDTH FONTS (fixed-halfwidth Latin and fixed-fullwidth Japanese) | |
51 | + | |
52 | +M+ 1M mplus-1m-thin.ttf | |
53 | + mplus-1m-light.ttf | |
54 | + mplus-1m-regular.ttf | |
55 | + mplus-1m-medium.ttf | |
56 | + mplus-1m-bold.ttf | |
57 | + | |
58 | +M+ 2M mplus-2m-thin.ttf | |
59 | + mplus-2m-light.ttf | |
60 | + mplus-2m-regular.ttf | |
61 | + mplus-2m-medium.ttf | |
62 | + mplus-2m-bold.ttf | |
63 | + | |
64 | +M+ 1MN mplus-1mn-thin.ttf | |
65 | + mplus-1mn-light.ttf | |
66 | + mplus-1mn-regular.ttf | |
67 | + mplus-1mn-medium.ttf | |
68 | + mplus-1mn-bold.ttf | |
69 | + | |
70 | + | |
71 | + | |
72 | + | |
73 | +- | |
74 | + | |
75 | +M+ OUTLINE FONTS | |
76 | +http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/ | |
77 | + | |
78 | +mplus-fonts-dev ML | |
79 | +http://lists.sourceforge.jp/mailman/listinfo/mplus-fonts-dev | |
80 | + | |
81 | +M+ FONTS open forum | |
82 | +http://sourceforge.jp/forum/forum.php?forum_id=3403 | ... | ... |
1 | +M+ FONTS Copyright (C) 2002-2014 M+ FONTS PROJECT | |
2 | + | |
3 | +- | |
4 | + | |
5 | +README_J | |
6 | + | |
7 | + | |
8 | + | |
9 | + | |
10 | +M+ TESTFLIGHT | |
11 | + | |
12 | +M+ OUTLINE FONTS は 2 種類のかな文字を持つ固定幅和文フォントと 4 種類の | |
13 | +プロポーショナル欧文フォント、3 種類の半角固定幅欧文フォントの組み合わせから | |
14 | +構成され、それぞれ Thin から Black まで 7 種類(半角固定幅フォントは Bold | |
15 | +まで 5 種類)のウエイトバリエーションがあります。 | |
16 | + | |
17 | + | |
18 | +プロポーショナルフォント(和文は全角固定幅、欧文・数字はプロポーショナル) | |
19 | + | |
20 | +M+ 1P mplus-1p-thin.ttf | |
21 | + mplus-1p-light.ttf | |
22 | + mplus-1p-regular.ttf | |
23 | + mplus-1p-medium.ttf | |
24 | + mplus-1p-bold.ttf | |
25 | + mplus-1p-heavy.ttf | |
26 | + mplus-1p-black.ttf | |
27 | + | |
28 | +M+ 2P mplus-2p-thin.ttf | |
29 | + mplus-2p-light.ttf | |
30 | + mplus-2p-regular.ttf | |
31 | + mplus-2p-medium.ttf | |
32 | + mplus-2p-bold.ttf | |
33 | + mplus-2p-heavy.ttf | |
34 | + mplus-2p-black.ttf | |
35 | + | |
36 | +M+ 1C mplus-1c-thin.ttf | |
37 | + mplus-1c-light.ttf | |
38 | + mplus-1c-regular.ttf | |
39 | + mplus-1c-medium.ttf | |
40 | + mplus-1c-bold.ttf | |
41 | + mplus-1c-heavy.ttf | |
42 | + mplus-1c-black.ttf | |
43 | + | |
44 | +M+ 2C mplus-2c-thin.ttf | |
45 | + mplus-2c-light.ttf | |
46 | + mplus-2c-regular.ttf | |
47 | + mplus-2c-medium.ttf | |
48 | + mplus-2c-bold.ttf | |
49 | + mplus-2c-heavy.ttf | |
50 | + mplus-2c-black.ttf | |
51 | + | |
52 | + | |
53 | +固定幅フォント(和文は全角、欧文・数字は半角の固定幅) | |
54 | + | |
55 | +M+ 1M mplus-1m-thin.ttf | |
56 | + mplus-1m-light.ttf | |
57 | + mplus-1m-regular.ttf | |
58 | + mplus-1m-medium.ttf | |
59 | + mplus-1m-bold.ttf | |
60 | + | |
61 | +M+ 2M mplus-2m-thin.ttf | |
62 | + mplus-2m-light.ttf | |
63 | + mplus-2m-regular.ttf | |
64 | + mplus-2m-medium.ttf | |
65 | + mplus-2m-bold.ttf | |
66 | + | |
67 | +M+ 1MN mplus-1mn-thin.ttf | |
68 | + mplus-1mn-light.ttf | |
69 | + mplus-1mn-regular.ttf | |
70 | + mplus-1mn-medium.ttf | |
71 | + mplus-1mn-bold.ttf | |
72 | + | |
73 | + | |
74 | + | |
75 | + | |
76 | +かな文字と常用漢字、基本的な欧文グリフが揃い、一般的な文章の大半の文字を表示 | |
77 | +できるようになりました。不足している文字は他のフォントからの自動補完、 | |
78 | +IPAG フォントとの合成などで補うことができます。 | |
79 | +M+ OUTLINE FONTS の詳細、お問い合わせなどは以下の URL からお願いします。 | |
80 | + | |
81 | +- | |
82 | + | |
83 | +M+ OUTLINE FONTS | |
84 | +http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/ | |
85 | + | |
86 | +mplus-fonts-dev ML | |
87 | +http://lists.sourceforge.jp/mailman/listinfo/mplus-fonts-dev | |
88 | + | |
89 | +M+ FONTS open forum | |
90 | +http://sourceforge.jp/forum/forum.php?forum_id=3403 | ... | ... |
1 | +XANO明朝フォント Ver. 0.2004.0229 について | |
2 | + | |
3 | +2004年2月29日 | |
4 | +内田明 | |
5 | +<uchida@happy.email.ne.jp> | |
6 | + | |
7 | + | |
8 | +■XANO明朝フォントとは何か | |
9 | + | |
10 | +株式会社日立製作所と株式会社タイプバンクが共同開発した「日立明朝 | |
11 | +体 32x32ドット ウエイト3 フォント」(以下「日立明朝Mフォント」) に | |
12 | +関する「フォント権利使用許諾契約」(以下「HPS内田契約」)に基づき、 | |
13 | +内田明が開発・製作、配布を行うフォントの1つを、XANO明朝フォントと | |
14 | +呼びます。 | |
15 | + | |
16 | +内田は、HPS内田契約に基づいて、株式会社日立製作所と株式会社タイプ | |
17 | +バンクが保有する日立明朝Mフォントの利用権——すなわち、日立明朝M | |
18 | +フォントに表現されている文字の骨格、文字間のデザイン統一に関わる | |
19 | +仕様、文字を構成する要素のデザイン・組み合わせ方・バランス等を派 | |
20 | +生フォントにおいて再現し利用する権利——を使用し、XANO明朝フォン | |
21 | +トの開発・製作、配布を行っています。 | |
22 | + | |
23 | +まず、ビットマップフォントである日立明朝Mフォントのうち、JIS C | |
24 | +6226-1983 (通称「83JIS」) にある漢字グリフを機械的に平滑化・アウ | |
25 | +トライン化して得たTrueTypeフォントを、「ANO明朝フォント」と呼ん | |
26 | +でおきます。 | |
27 | +また、HPS内田契約によりANO明朝フォントを改造・拡張して得た漢字グ | |
28 | +リフ集合を、「拡張ANOグリフ集合」と呼んでおきます。拡張ANOグリフ | |
29 | +集合には、2004年2月29日現在、JIS X 0213:2004(以下「2004JIS」)の | |
30 | +1面漢字の全てと、2面漢字の一部が含まれています。 | |
31 | + | |
32 | +XANO明朝フォントとは、内田が独自に製作した2004JISの非漢字等を実装 | |
33 | +するフォント「ORADANO明朝フォント」と、拡張ANOグリフ集合、そして、 | |
34 | +和田研漢字分科会により製作・配布されている「和田研明朝フォント」 | |
35 | +の補助漢字版から得た漢字グリフ集合とを結合して製作された、2004JIS | |
36 | +実装水準4のTrueTypeフォントです。 | |
37 | + | |
38 | + | |
39 | +■XANO明朝フォントの利用 | |
40 | + | |
41 | +このフォントは、印刷・表示、電子文書への埋め込み等の目的で、誰も | |
42 | +が自由に無償で用いることができます。 | |
43 | +このフォントの配布・再配布は、自由に無償で行うことができます。 | |
44 | +このフォントを、より大きな規模のソフトウエアパッケージの一部とし | |
45 | +て販売するなどしても構いません。 | |
46 | +このフォントを、フォント単独商品として販売してはなりません。 | |
47 | +このフォントは自由に拡張・改造等を行うことができますが、このフォ | |
48 | +ントのうち前述の「拡張ANOグリフ集合」を用いて新たなフォントの開 | |
49 | +発・製作およびその配布を行おうとする場合、そのフォントをフォント | |
50 | +単独商品として販売してはならず、またその説明書等の文書に《株式会 | |
51 | +社日立製作所と株式会社タイプバンクが保有する、「日立明朝体 32x32 | |
52 | +ドット ウエイト3 フォント」の派生フォント利用権を使用している》 | |
53 | +旨の明記を要します。 | |
54 | + | |
55 | + | |
56 | +■XANO明朝フォントの免責事項 | |
57 | + | |
58 | +XANO明朝フォントは、「あるがまま」で提供される物であり、製作者お | |
59 | +よび再配布者は、公的・私的な規格や言語慣習への適合性、何らかの用 | |
60 | +途への有用性などの、品質に関する保証を一切行いません。 | |
61 | +このフォントの利用に起因する損害に対し、その責任はすべて利用者が | |
62 | +負うものとします。損害の起こる可能性が知られていた場合でも、製作 | |
63 | +者および再配布者は、法的・道義的な責任を負うことはありません。 | |
64 | +製作者および再配布者は、このフォントに不具合が発見されたときに、 | |
65 | +それを修正・告知する義務を負いません。 | |
66 | + | ... | ... |
No preview for this file type
1 | +Copyright (c) 2003 Hitachi, Ltd. and TypeBank Co., Ltd. | |
2 | +Copyright (c) 2003 UCHIDA Akira | |
3 | + | |
4 | +Permission is hereby granted, free of charge, to any person obtaining a | |
5 | +copy of the fonts accompanying this license ("Fonts") and associated | |
6 | +documentation files (the "Font Software"), to reproduce and distribute | |
7 | +the Font Software, including without limitation the rights to use, copy, | |
8 | +modify, merge, publish, distribute, and/or sell copies of the Font | |
9 | +Software, and to permit persons to whom the Font Software is furnished | |
10 | +to do so, subject to the following conditions: | |
11 | + | |
12 | +The above copyright notice and this permission notice shall be included | |
13 | +in all copies of one or more of the Font Software typefaces. | |
14 | + | |
15 | +The Font Software may be sold as part of a larger software package but | |
16 | +no copy of one or more of the Font Software typefaces may be sold by | |
17 | +itself. | |
18 | + | |
19 | +The end-user documentation included with the derived work, if any, must | |
20 | +include the following acknowledgment: | |
21 | + This product is derived by using the right to use "Hitachi-Mincho | |
22 | + 32x32-dot weight 3 Font" possessed by Hitachi, Ltd. and TypeBank | |
23 | + Co., Ltd. | |
24 | +Alternately, this acknowledgment may appear in the Font Software itself, | |
25 | +if and wherever such third-party acknowledgments normally appear. | |
26 | + | |
27 | +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
28 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | |
29 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF | |
30 | +COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | |
31 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
32 | +LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR | |
33 | +CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
34 | +OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT | |
35 | +SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. | |
36 | + | ... | ... |
1 | +XANO明朝フォント Ver. 0.2004.0229 について | |
2 | + | |
3 | +2004年2月29日 | |
4 | +内田明 | |
5 | +<uchida@happy.email.ne.jp> | |
6 | + | |
7 | + | |
8 | +■XANO明朝フォントとは何か | |
9 | + | |
10 | +株式会社日立製作所と株式会社タイプバンクが共同開発した「日立明朝 | |
11 | +体 32x32ドット ウエイト3 フォント」(以下「日立明朝Mフォント」) に | |
12 | +関する「フォント権利使用許諾契約」(以下「HPS内田契約」)に基づき、 | |
13 | +内田明が開発・製作、配布を行うフォントの1つを、XANO明朝フォントと | |
14 | +呼びます。 | |
15 | + | |
16 | +内田は、HPS内田契約に基づいて、株式会社日立製作所と株式会社タイプ | |
17 | +バンクが保有する日立明朝Mフォントの利用権——すなわち、日立明朝M | |
18 | +フォントに表現されている文字の骨格、文字間のデザイン統一に関わる | |
19 | +仕様、文字を構成する要素のデザイン・組み合わせ方・バランス等を派 | |
20 | +生フォントにおいて再現し利用する権利——を使用し、XANO明朝フォン | |
21 | +トの開発・製作、配布を行っています。 | |
22 | + | |
23 | +まず、ビットマップフォントである日立明朝Mフォントのうち、JIS C | |
24 | +6226-1983 (通称「83JIS」) にある漢字グリフを機械的に平滑化・アウ | |
25 | +トライン化して得たTrueTypeフォントを、「ANO明朝フォント」と呼ん | |
26 | +でおきます。 | |
27 | +また、HPS内田契約によりANO明朝フォントを改造・拡張して得た漢字グ | |
28 | +リフ集合を、「拡張ANOグリフ集合」と呼んでおきます。拡張ANOグリフ | |
29 | +集合には、2004年2月29日現在、JIS X 0213:2004(以下「2004JIS」)の | |
30 | +1面漢字の全てと、2面漢字の一部が含まれています。 | |
31 | + | |
32 | +XANO明朝フォントとは、内田が独自に製作した2004JISの非漢字等を実装 | |
33 | +するフォント「ORADANO明朝フォント」と、拡張ANOグリフ集合、そして、 | |
34 | +和田研漢字分科会により製作・配布されている「和田研明朝フォント」 | |
35 | +の補助漢字版から得た漢字グリフ集合とを結合して製作された、2004JIS | |
36 | +実装水準4のTrueTypeフォントです。 | |
37 | + | |
38 | + | |
39 | +■XANO明朝フォントの利用 | |
40 | + | |
41 | +このフォントは、印刷・表示、電子文書への埋め込み等の目的で、誰も | |
42 | +が自由に無償で用いることができます。 | |
43 | +このフォントの配布・再配布は、自由に無償で行うことができます。 | |
44 | +このフォントを、より大きな規模のソフトウエアパッケージの一部とし | |
45 | +て販売するなどしても構いません。 | |
46 | +このフォントを、フォント単独商品として販売してはなりません。 | |
47 | +このフォントは自由に拡張・改造等を行うことができますが、このフォ | |
48 | +ントのうち前述の「拡張ANOグリフ集合」を用いて新たなフォントの開 | |
49 | +発・製作およびその配布を行おうとする場合、そのフォントをフォント | |
50 | +単独商品として販売してはならず、またその説明書等の文書に《株式会 | |
51 | +社日立製作所と株式会社タイプバンクが保有する、「日立明朝体 32x32 | |
52 | +ドット ウエイト3 フォント」の派生フォント利用権を使用している》 | |
53 | +旨の明記を要します。 | |
54 | + | |
55 | + | |
56 | +■XANO明朝フォントの免責事項 | |
57 | + | |
58 | +XANO明朝フォントは、「あるがまま」で提供される物であり、製作者お | |
59 | +よび再配布者は、公的・私的な規格や言語慣習への適合性、何らかの用 | |
60 | +途への有用性などの、品質に関する保証を一切行いません。 | |
61 | +このフォントの利用に起因する損害に対し、その責任はすべて利用者が | |
62 | +負うものとします。損害の起こる可能性が知られていた場合でも、製作 | |
63 | +者および再配布者は、法的・道義的な責任を負うことはありません。 | |
64 | +製作者および再配布者は、このフォントに不具合が発見されたときに、 | |
65 | +それを修正・告知する義務を負いません。 | |
66 | + | ... | ... |
No preview for this file type
1 | +Copyright (c) 2003 Hitachi, Ltd. and TypeBank Co., Ltd. | |
2 | +Copyright (c) 2003 UCHIDA Akira | |
3 | + | |
4 | +Permission is hereby granted, free of charge, to any person obtaining a | |
5 | +copy of the fonts accompanying this license ("Fonts") and associated | |
6 | +documentation files (the "Font Software"), to reproduce and distribute | |
7 | +the Font Software, including without limitation the rights to use, copy, | |
8 | +modify, merge, publish, distribute, and/or sell copies of the Font | |
9 | +Software, and to permit persons to whom the Font Software is furnished | |
10 | +to do so, subject to the following conditions: | |
11 | + | |
12 | +The above copyright notice and this permission notice shall be included | |
13 | +in all copies of one or more of the Font Software typefaces. | |
14 | + | |
15 | +The Font Software may be sold as part of a larger software package but | |
16 | +no copy of one or more of the Font Software typefaces may be sold by | |
17 | +itself. | |
18 | + | |
19 | +The end-user documentation included with the derived work, if any, must | |
20 | +include the following acknowledgment: | |
21 | + This product is derived by using the right to use "Hitachi-Mincho | |
22 | + 32x32-dot weight 3 Font" possessed by Hitachi, Ltd. and TypeBank | |
23 | + Co., Ltd. | |
24 | +Alternately, this acknowledgment may appear in the Font Software itself, | |
25 | +if and wherever such third-party acknowledgments normally appear. | |
26 | + | |
27 | +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
28 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | |
29 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF | |
30 | +COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | |
31 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
32 | +LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR | |
33 | +CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
34 | +OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT | |
35 | +SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. | |
36 | + | ... | ... |
1 | +Copyright (c) 2015, NAVER Corporation (http://www.navercorp.com), with Reserved Font Name D2Coding. | |
2 | + | |
3 | +Copyright (c) 2015, NAVER Corporation (http://www.navercorp.com), with Reserved Font Name D2Coding-Bold. | |
4 | + | |
5 | +This Font Software is licensed under the SIL Open Font License, Version 1.1. | |
6 | + | |
7 | +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL | |
8 | + | |
9 | +SIL OPEN FONT LICENSE | |
10 | +Version 1.1 - 26 February 2007 | |
11 | + | |
12 | +PREAMBLE | |
13 | +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. | |
14 | + | |
15 | +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. | |
16 | + | |
17 | +DEFINITIONS | |
18 | +"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. | |
19 | + | |
20 | +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). | |
21 | + | |
22 | +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). | |
23 | + | |
24 | +"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. | |
25 | + | |
26 | +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. | |
27 | + | |
28 | +PERMISSION & CONDITIONS | |
29 | +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: | |
30 | + | |
31 | +Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. | |
32 | + | |
33 | +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. | |
34 | + | |
35 | +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. | |
36 | + | |
37 | +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. | |
38 | + | |
39 | +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. | |
40 | + | |
41 | +##TERMINATION This license becomes null and void if any of the above conditions are not met. | |
42 | + | |
43 | +##DISCLAIMER 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. | |
\ No newline at end of file | ... | ... |
No preview for this file type
No preview for this file type
1 | +KR : INSULA__ -> songgang-gasa-regular | |
2 | +https://www.oning.co.kr/license | |
3 | + | |
4 | +KR : Unquiet Spirits -> yoonbongil_GS | |
5 | +https://gscaltexmediahub.com/campaign/the-energy-of-independence-fighters/ | |
6 | + | |
7 | +KR : mainframe-opto -> NEXONFootballGothicL | |
8 | +http://levelup.nexon.com/font/index.aspx?page=4 | |
\ No newline at end of file | ... | ... |
No preview for this file type
... | ... | @@ -67,16 +67,49 @@ newPackage{ id = "fantasy", name = "Fantasy", weight = 100, |
67 | 67 | |
68 | 68 | |
69 | 69 | newPackage{ id = "chinese", name = "Chinese", weight = 100, |
70 | - small = {font="/data/font/WenQuanYiMicroHei.ttf", normal=12, small=10, big=14}, | |
71 | - default = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, | |
72 | - bold = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, | |
73 | - mono = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=16, small=12, big=18}, | |
74 | - mono_small = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, | |
75 | - flyer = {font="/data/font/WenQuanYiMicroHei.ttf", normal=14, small=12, big=16}, | |
76 | - bignews = {font="/data/font/WenQuanYiMicroHei.ttf", normal=30}, | |
77 | - resources_normal = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16}, | |
78 | - resources_small = {font="/data/font/WenQuanYiMicroHei.ttf", normal=14}, | |
79 | - classic = {font="/data/font/WenQuanYiMicroHei.ttf", normal=16, small=14, big=18}, | |
80 | - classic_mono = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, | |
81 | - terminal = {font="/data/font/WenQuanYiMicroHeiMono.ttf", normal=12, small=10, big=14}, | |
70 | + small = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=12, small=10, big=14}, | |
71 | + default = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, | |
72 | + bold = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=16, small=12, big=18}, | |
73 | + mono = {font="/data/font/zh_hans/WenQuanYiMicroHeiMono.ttf", normal=16, small=12, big=18}, | |
74 | + mono_small = {font="/data/font/zh_hans/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, | |
75 | + flyer = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=14, small=12, big=16}, | |
76 | + bignews = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=30}, | |
77 | + resources_normal = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=16}, | |
78 | + resources_small = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=14}, | |
79 | + classic = {font="/data/font/zh_hans/WenQuanYiMicroHei.ttf", normal=16, small=14, big=18}, | |
80 | + classic_mono = {font="/data/font/zh_hans/WenQuanYiMicroHeiMono.ttf", normal=14, small=10, big=16}, | |
81 | + insular = {font="/data/font/zh_hans/MaShanZheng-Regular.ttf", normal=14, small=12, big=16}, | |
82 | + terminal = {font="/data/font/zh_hans/WenQuanYiMicroHeiMono.ttf", normal=12, small=10, big=14}, | |
82 | 83 | } |
84 | + | |
85 | +newPackage{ id = "japanese", name = "Japanese", weight = 100, | |
86 | + small = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=11, small=9, big=13}, | |
87 | + default = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=15, small=13, big=17}, | |
88 | + bold = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=15, small=13, big=17}, | |
89 | + mono = {font="/data/font/ja_JP/NatuMono/NatuMono-Regular-20140812.ttf", normal=14, small=12, big=16}, | |
90 | + mono_small = {font="/data/font/ja_JP/NatuMono/NatuMono-Regular-20140812.ttf", normal=14, small=10, big=16}, | |
91 | + flyer = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=14, small=12, big=16}, | |
92 | + bignews = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=30}, | |
93 | + resources_normal = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=15}, | |
94 | + resources_small = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=13}, | |
95 | + classic = {font="/data/font/ja_JP/HigashiOme/HigashiOme-Gothic-1.3i.ttf", normal=14, small=12, big=16}, | |
96 | + classic_mono = {font="/data/font/ja_JP/NatuMono/NatuMono-Regular-20140812.ttf", normal=14, small=10, big=16}, | |
97 | + insular = {font="/data/font/ja_JP/XANO-U32-2004-0509/XANO-mincho-U32.ttf", normal=14, small=12, big=16}, | |
98 | + terminal = {font="/data/font/ja_JP/NatuMono/NatuMono-Regular-20140812.ttf", normal=12, small=10, big=14}, | |
99 | +} | |
100 | + | |
101 | +newPackage{ id = "korean", name = "Korean", weight = 100, | |
102 | + small = {font="/data/font/ko_KR/JejuGothic.ttf", normal=11, small=9, big=13}, | |
103 | + default = {font="/data/font/ko_KR/JejuGothic.ttf", normal=15, small=13, big=17}, | |
104 | + bold = {font="/data/font/ko_KR/JejuGothic.ttf", normal=15, small=13, big=17}, | |
105 | + mono = {font="/data/font/ko_KR/D2Coding.ttf", normal=16, small=12, big=16}, | |
106 | + mono_small = {font="/data/font/ko_KR/D2Coding.ttf", normal=14, small=10, big=16}, | |
107 | + flyer = {font="/data/font/ko_KR/JejuGothic.ttf", normal=14, small=12, big=16}, | |
108 | + bignews = {font="/data/font/ko_KR/JejuGothic.ttf", normal=30}, | |
109 | + resources_normal = {font="/data/font/ko_KR/JejuGothic.ttf", normal=15}, | |
110 | + resources_small = {font="/data/font/ko_KR/JejuGothic.ttf", normal=13}, | |
111 | + classic = {font="/data/font/ko_KR/D2Coding.ttf", normal=14, small=12, big=16}, | |
112 | + classic_mono = {font="/data/font/ko_KR/D2Coding.ttf", normal=14, small=10, big=16}, | |
113 | + insular = {font="/data/font/ko_KR/songgang-gasa-regular.ttf", normal=14, small=12, big=16}, | |
114 | + terminal = {font="/data/font/ko_KR/D2Coding.ttf", normal=12, small=10, big=14}, | |
115 | +} | |
\ No newline at end of file | ... | ... |
No preview for this file type
1 | +Copyright 2018 The Ma Shan Zheng Project Authors (https://github.com/googlefonts/mashanzheng) | |
2 | + | |
3 | +This Font Software is licensed under the SIL Open Font License, Version 1.1. | |
4 | +This license is copied below, and is also available with a FAQ at: | |
5 | +http://scripts.sil.org/OFL | |
6 | + | |
7 | + | |
8 | +----------------------------------------------------------- | |
9 | +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 | |
10 | +----------------------------------------------------------- | |
11 | + | |
12 | +PREAMBLE | |
13 | +The goals of the Open Font License (OFL) are to stimulate worldwide | |
14 | +development of collaborative font projects, to support the font creation | |
15 | +efforts of academic and linguistic communities, and to provide a free and | |
16 | +open framework in which fonts may be shared and improved in partnership | |
17 | +with others. | |
18 | + | |
19 | +The OFL allows the licensed fonts to be used, studied, modified and | |
20 | +redistributed freely as long as they are not sold by themselves. The | |
21 | +fonts, including any derivative works, can be bundled, embedded, | |
22 | +redistributed and/or sold with any software provided that any reserved | |
23 | +names are not used by derivative works. The fonts and derivatives, | |
24 | +however, cannot be released under any other type of license. The | |
25 | +requirement for fonts to remain under this license does not apply | |
26 | +to any document created using the fonts or their derivatives. | |
27 | + | |
28 | +DEFINITIONS | |
29 | +"Font Software" refers to the set of files released by the Copyright | |
30 | +Holder(s) under this license and clearly marked as such. This may | |
31 | +include source files, build scripts and documentation. | |
32 | + | |
33 | +"Reserved Font Name" refers to any names specified as such after the | |
34 | +copyright statement(s). | |
35 | + | |
36 | +"Original Version" refers to the collection of Font Software components as | |
37 | +distributed by the Copyright Holder(s). | |
38 | + | |
39 | +"Modified Version" refers to any derivative made by adding to, deleting, | |
40 | +or substituting -- in part or in whole -- any of the components of the | |
41 | +Original Version, by changing formats or by porting the Font Software to a | |
42 | +new environment. | |
43 | + | |
44 | +"Author" refers to any designer, engineer, programmer, technical | |
45 | +writer or other person who contributed to the Font Software. | |
46 | + | |
47 | +PERMISSION & CONDITIONS | |
48 | +Permission is hereby granted, free of charge, to any person obtaining | |
49 | +a copy of the Font Software, to use, study, copy, merge, embed, modify, | |
50 | +redistribute, and sell modified and unmodified copies of the Font | |
51 | +Software, subject to the following conditions: | |
52 | + | |
53 | +1) Neither the Font Software nor any of its individual components, | |
54 | +in Original or Modified Versions, may be sold by itself. | |
55 | + | |
56 | +2) Original or Modified Versions of the Font Software may be bundled, | |
57 | +redistributed and/or sold with any software, provided that each copy | |
58 | +contains the above copyright notice and this license. These can be | |
59 | +included either as stand-alone text files, human-readable headers or | |
60 | +in the appropriate machine-readable metadata fields within text or | |
61 | +binary files as long as those fields can be easily viewed by the user. | |
62 | + | |
63 | +3) No Modified Version of the Font Software may use the Reserved Font | |
64 | +Name(s) unless explicit written permission is granted by the corresponding | |
65 | +Copyright Holder. This restriction only applies to the primary font name as | |
66 | +presented to the users. | |
67 | + | |
68 | +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font | |
69 | +Software shall not be used to promote, endorse or advertise any | |
70 | +Modified Version, except to acknowledge the contribution(s) of the | |
71 | +Copyright Holder(s) and the Author(s) or with their explicit written | |
72 | +permission. | |
73 | + | |
74 | +5) The Font Software, modified or unmodified, in part or in whole, | |
75 | +must be distributed entirely under this license, and must not be | |
76 | +distributed under any other license. The requirement for fonts to | |
77 | +remain under this license does not apply to any document created | |
78 | +using the Font Software. | |
79 | + | |
80 | +TERMINATION | |
81 | +This license becomes null and void if any of the above conditions are | |
82 | +not met. | |
83 | + | |
84 | +DISCLAIMER | |
85 | +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
86 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | |
87 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT | |
88 | +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | |
89 | +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
90 | +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | |
91 | +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
92 | +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM | |
93 | +OTHER DEALINGS IN THE FONT SOFTWARE. | ... | ... |
No preview for this file type
1 | +Copyright (c) 2007, Google Corp.; Copyright (c) 2008,2009 WenQuanYi Board of Trustees and Qianqian Fang. This font is dual-licensed under Apache License 2.0 or GNU General Public License v3] with font embedding exceptions. | ... | ... |
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... | ... | @@ -519,18 +519,18 @@ function _M:lineFOV(tx, ty, extra_block, block, sx, sy) |
519 | 519 | (game.level.map.lites(tx, ty) or act and self:canSee(act)) |
520 | 520 | |
521 | 521 | extra_block = type(extra_block) == "function" and extra_block |
522 | - or type(extra_block) == "string" and function(_, x, y) return game.level.map:checkAllEntities(x, y, extra_block) end | |
522 | + or type(extra_block) == "string" and function(self, x, y) return game.level.map:checkAllEntities(x, y, extra_block, self) end | |
523 | 523 | |
524 | 524 | block = block |
525 | 525 | or sees_target and function(_, x, y) |
526 | - return game.level.map:checkAllEntities(x, y, "block_sight") or | |
527 | - game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move") and not game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "pass_projectile") or | |
526 | + return game.level.map:checkAllEntities(x, y, "block_sight", self) or | |
527 | + game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move", self) and not game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "pass_projectile") or | |
528 | 528 | extra_block and extra_block(self, x, y) |
529 | 529 | end |
530 | 530 | or function(_, x, y) |
531 | 531 | if (self.sight and core.fov.distance(sx, sy, x, y) <= self.sight or not self.sight) and game.level.map.lites(x, y) then |
532 | - return game.level.map:checkEntity(x, y, Map.TERRAIN, "block_sight") or | |
533 | - game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move") and not game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "pass_projectile") or | |
532 | + return game.level.map:checkEntity(x, y, Map.TERRAIN, "block_sight", self) or | |
533 | + game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move", self) and not game.level.map:checkEntity(x, y, engine.Map.TERRAIN, "pass_projectile") or | |
534 | 534 | extra_block and extra_block(self, x, y) |
535 | 535 | else |
536 | 536 | return true |
... | ... | @@ -613,5 +613,5 @@ function _M:him_her() return string.him_her(self) end |
613 | 613 | function _M:his_her_self() return string.his_her_self(self) end |
614 | 614 | |
615 | 615 | function _M:getName() |
616 | - return _t(self.name) | |
616 | + return _t(self.name, "entity name") | |
617 | 617 | end |
\ No newline at end of file | ... | ... |
... | ... | @@ -44,7 +44,7 @@ DAY_START = HOUR * 6 |
44 | 44 | -- @param start_day defaults to 1 |
45 | 45 | -- @param start_hour defaults to 8 |
46 | 46 | function _M:init(definition, datestring, start_year, start_day, start_hour) |
47 | - local data = dofile(definition) | |
47 | + local data, c_dts = dofile(definition) | |
48 | 48 | self.calendar = {} |
49 | 49 | local days = 0 |
50 | 50 | for _, e in ipairs(data) do |
... | ... | @@ -54,7 +54,7 @@ function _M:init(definition, datestring, start_year, start_day, start_hour) |
54 | 54 | end |
55 | 55 | assert(days == 365, "Calendar incomplete, days ends at "..days.." instead of 365") |
56 | 56 | |
57 | - self.datestring = datestring | |
57 | + self.datestring = c_dts or datestring | |
58 | 58 | self.start_year = start_year |
59 | 59 | self.start_day = start_day or 1 |
60 | 60 | self.start_hour = start_hour or 8 | ... | ... |
... | ... | @@ -18,13 +18,14 @@ |
18 | 18 | -- darkgod@te4.org |
19 | 19 | |
20 | 20 | require "engine.class" |
21 | -require "engine.dialogs.Chat" | |
21 | +require "Json2" | |
22 | 22 | local slt2 = require "slt2" |
23 | 23 | |
24 | 24 | --- Handle chats between the player and NPCs |
25 | 25 | -- @classmod engine.Chat |
26 | 26 | module(..., package.seeall, class.make) |
27 | 27 | |
28 | +_M.chat_dialog = "engine.dialogs.Chat" | |
28 | 29 | _M.chat_context_strings = {"#{italic}##LIGHT_GREEN#", "#LAST##{normal}#"} |
29 | 30 | _M.chat_bold_strings = {"#{bold}#", "#{normal}#"} |
30 | 31 | |
... | ... | @@ -34,6 +35,7 @@ _M.chat_bold_strings = {"#{bold}#", "#{normal}#"} |
34 | 35 | -- @param[type=Actor] player the player |
35 | 36 | -- @param[type=table] data |
36 | 37 | function _M:init(name, npc, player, data) |
38 | + self.chat_env = {} | |
37 | 39 | self.quick_replies = 0 |
38 | 40 | self.chats = {} |
39 | 41 | self.npc = npc |
... | ... | @@ -44,17 +46,22 @@ function _M:init(name, npc, player, data) |
44 | 46 | if not data.player then data.player = player end |
45 | 47 | if not data.npc then data.npc = npc end |
46 | 48 | |
47 | - local f, err = loadfile(self:getChatFile(name)) | |
48 | - if not f and err then error(err) end | |
49 | - local env = setmetatable({ | |
50 | - cur_chat = self, | |
51 | - setDialogWidth = function(w) self.force_dialog_width = w end, | |
52 | - newChat = function(c) self:addChat(c) end, | |
53 | - setTextFont = function(font, size) self.dialog_text_font = {font, size} end, | |
54 | - setAnswerFont = function(font, size) self.dialog_answer_font = {font, size} end, | |
55 | - }, {__index=data}) | |
56 | - setfenv(f, env) | |
57 | - self.default_id = f() | |
49 | + local filepath, is_chat_format = self:getChatFile(name) | |
50 | + if not is_chat_format then | |
51 | + local f, err = loadfile(filepath) | |
52 | + if not f and err then error(err) end | |
53 | + local env = setmetatable({ | |
54 | + cur_chat = self, | |
55 | + setDialogWidth = function(w) self.force_dialog_width = w end, | |
56 | + newChat = function(c) self:addChat(c) end, | |
57 | + setTextFont = function(font, size) self.dialog_text_font = {font, size} end, | |
58 | + setAnswerFont = function(font, size) self.dialog_answer_font = {font, size} end, | |
59 | + }, {__index=data}) | |
60 | + setfenv(f, env) | |
61 | + self.default_id = f() | |
62 | + else | |
63 | + self:loadChatFormat(filepath) | |
64 | + end | |
58 | 65 | |
59 | 66 | self:triggerHook{"Chat:load", data=data, env=env} |
60 | 67 | end |
... | ... | @@ -65,17 +72,308 @@ end |
65 | 72 | function _M:getChatFile(file) |
66 | 73 | local _, _, addon, rfile = file:find("^([^+]+)%+(.+)$") |
67 | 74 | if addon and rfile then |
75 | + if fs.exists("/data-"..addon.."/chats/"..rfile..".chat") then return "/data-"..addon.."/chats/"..rfile..".chat", true end | |
68 | 76 | return "/data-"..addon.."/chats/"..rfile..".lua" |
69 | 77 | end |
78 | + if fs.exists("/data/chats/"..file..".chat") then return "/data/chats/"..file..".chat", true end | |
70 | 79 | return "/data/chats/"..file..".lua" |
71 | 80 | end |
72 | 81 | |
82 | +function _M:setFunctionEnv(fct) | |
83 | + local env = setmetatable({ | |
84 | + self = self, | |
85 | + chat_env = self.chat_env, | |
86 | + newChat = function(c) self:addChat(c) end, | |
87 | + }, {__index=_G}) | |
88 | + setfenv(fct, env) | |
89 | +end | |
90 | + | |
91 | +--- Build up an answer from various nodes | |
92 | +-- Note to future code divers, this is a recursive method and on long chats can recurse a log, but it only use tailcalls so it's fine. Lua rocks | |
93 | +function _M:chatFormatActions(nodes, answer, node, stop_at) | |
94 | + if not node or node == stop_at then return end | |
95 | + local function getnext() | |
96 | + -- Find out if we have actions to take, conditions to apply and where to jump to | |
97 | + if table.sget(node, 'outputs', 'output_1', "connections", 1, "node") then | |
98 | + return nodes[table.sget(node, 'outputs', 'output_1', "connections", 1, "node")] | |
99 | + end | |
100 | + end | |
101 | + | |
102 | + local function add_action(node, action) | |
103 | + self:setFunctionEnv(action) | |
104 | + if answer.action then | |
105 | + local old = answer.action | |
106 | + answer.action = function(npc, player) | |
107 | + local r1 = old(npc, player) | |
108 | + local r2 = action(npc, player) | |
109 | + return r2 or r1 | |
110 | + end | |
111 | + else | |
112 | + answer.action = action | |
113 | + end | |
114 | + end | |
115 | + local function add_cond(node, cond) | |
116 | + if node.data['not'] then local oc = cond cond = function(npc, player) return not oc(npc, player) end end | |
117 | + self:setFunctionEnv(cond) | |
118 | + if answer.cond then | |
119 | + local old = answer.cond | |
120 | + answer.cond = function(npc, player) | |
121 | + return old(npc, player) and cond(npc, player) | |
122 | + end | |
123 | + else | |
124 | + answer.cond = cond | |
125 | + end | |
126 | + end | |
127 | + | |
128 | + --------------------------------------------------------------------------- | |
129 | + if node.name == "chat" or node.name == "entry-selector" then | |
130 | + answer.jump = node.data.chatid | |
131 | + --------------------------------------------------------------------------- | |
132 | + elseif node.name == "lua-code" then | |
133 | + local action, err = loadstring("return function(npc, player) "..node.data.code.." end") | |
134 | + if not action and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
135 | + action = action() | |
136 | + add_action(node, action) | |
137 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
138 | + --------------------------------------------------------------------------- | |
139 | + elseif node.name == "lua-cond" then | |
140 | + if not node.data.code:find("return ") then node.data.code = "return "..node.data.code end | |
141 | + local cond, err = loadstring("return function(npc, player) "..node.data.code.." end") | |
142 | + if not cond and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
143 | + cond = cond() | |
144 | + add_cond(node, cond) | |
145 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
146 | + --------------------------------------------------------------------------- | |
147 | + elseif node.name == "quest-set" then | |
148 | + local Quest = require "engine.Quest" | |
149 | + local sub = nil | |
150 | + if node.data.sub ~= "" then sub = node.data.sub end | |
151 | + add_action(node, function(npc, player) if player:hasQuest(node.data.quest) then player:setQuestStatus(node.data.quest, Quest[node.data.status], sub) end end) | |
152 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
153 | + --------------------------------------------------------------------------- | |
154 | + elseif node.name == "quest-give" then | |
155 | + local Quest = require "engine.Quest" | |
156 | + add_action(node, function(npc, player) player:grantQuest(node.data.quest) end) | |
157 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
158 | + --------------------------------------------------------------------------- | |
159 | + elseif node.name == "quest-cond" then | |
160 | + local Quest = require "engine.Quest" | |
161 | + local sub = nil | |
162 | + if node.data.sub ~= "" then sub = node.data.sub end | |
163 | + add_cond(node, function(npc, player) return player:hasQuest(node.data.quest) and player:isQuestStatus(node.data.quest, Quest[node.data.status], sub) end) | |
164 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
165 | + --------------------------------------------------------------------------- | |
166 | + elseif node.name == "quest-has" then | |
167 | + if node.data.state == "has" then | |
168 | + add_cond(node, function(npc, player) return player:hasQuest(node.data.quest) end) | |
169 | + else | |
170 | + add_cond(node, function(npc, player) return not player:hasQuest(node.data.quest) end) | |
171 | + end | |
172 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
173 | + --------------------------------------------------------------------------- | |
174 | + elseif node.name == "birth-descriptor" then | |
175 | + add_cond(node, function(npc, player) return player.descriptor and player.descriptor[node.data.what] == node.data.value end) | |
176 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
177 | + --------------------------------------------------------------------------- | |
178 | + elseif node.name == "object-has" then | |
179 | + add_cond(node, function(npc, player) | |
180 | + local actor = node.data.who == "player" and player or npc | |
181 | + if node.data['in'] == "all-inventories" then | |
182 | + return actor:findInAllInventoriesBy(node.data.search_by, node.data.search) | |
183 | + elseif node.data['in'] == "worn-inventories" then | |
184 | + return actor:findInAllWornInventoriesBy(true, node.data.search_by, node.data.search) | |
185 | + elseif node.data['in'] == "nonworn-inventories" then | |
186 | + return actor:findInAllWornInventoriesBy(false, node.data.search_by, node.data.search) | |
187 | + else | |
188 | + return actor:findInInventoryBy(actor:getInven(node.data['in']), node.data.search_by, node.data.search) | |
189 | + end | |
190 | + return | |
191 | + end) | |
192 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
193 | + --------------------------------------------------------------------------- | |
194 | + elseif node.name == "attr-inc" then | |
195 | + if not node.data.value:find("return ") then node.data.value = "return "..node.data.value end | |
196 | + local a, err = loadstring(node.data.value) | |
197 | + if not a and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
198 | + a = a() | |
199 | + local is_player = node.data.who == "player" | |
200 | + add_action(node, function(npc, player) return (is_player and player or npc):attr(node.data.attr, a) end) | |
201 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
202 | + --------------------------------------------------------------------------- | |
203 | + elseif node.name == "attr-get" then | |
204 | + if node.data.value == "" and node.data.test ~= "?" and node.data.test ~= "!" then error("[Chat] chatFormatActions ERROR: no value for a non existance test") end | |
205 | + if not node.data.value:find("return ") then node.data.value = "return "..node.data.value end | |
206 | + local a, err = loadstring(node.data.value) | |
207 | + if not a and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
208 | + a = a() | |
209 | + local is_player = node.data.who == "player" | |
210 | + add_cond(node, function(npc, player) | |
211 | + local actor = (is_player and player or npc) | |
212 | + local v = actor:attr(node.data.attr) | |
213 | + if node.data.test == "?" then return v and true or false | |
214 | + elseif node.data.test == "!" then return not v and true or false | |
215 | + elseif node.data.test == "=" then return v == a | |
216 | + elseif node.data.test == ">" then return v > a | |
217 | + elseif node.data.test == "<" then return v < a | |
218 | + elseif node.data.test == ">=" then return v >= a | |
219 | + elseif node.data.test == "<=" then return v <= a | |
220 | + end | |
221 | + end) | |
222 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
223 | + --------------------------------------------------------------------------- | |
224 | + elseif node.name == "swap-actor" then | |
225 | + if node.data.custom == "id" then | |
226 | + local e | |
227 | + if node.data.id == "player" then e = self.player | |
228 | + else e = game.level:findEntity{define_as = node.data.id} | |
229 | + end | |
230 | + if e then | |
231 | + answer.switch_npc = e | |
232 | + if node.data.move_camera == true then answer.switch_npc_move_camera = true end | |
233 | + end | |
234 | + elseif node.data.custom == "true" then | |
235 | + if not node.data.def:find("return ") then node.data.def = "return "..node.data.def end | |
236 | + local a, err = loadstring(node.data.def) | |
237 | + if not a and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
238 | + answer.switch_npc = engine.Entity.new(a()) | |
239 | + else | |
240 | + local Map = require "engine.Map" | |
241 | + local is_tall = false | |
242 | + if Map.tiles then | |
243 | + local _, _, _, w, h = Map.tiles:get('', 0, 0, 0, 0, 0, 0, node.data.image) | |
244 | + is_tall = h > w | |
245 | + end | |
246 | + answer.switch_npc = engine.Entity.new{name=node.data.name, image=node.data.image, dislpay_y=is_tall and -1 or 0, display_h=is_tall and 2 or 1} | |
247 | + end | |
248 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
249 | + --------------------------------------------------------------------------- | |
250 | + elseif node.name == "change-zone" then | |
251 | + local zone = nil | |
252 | + if node.data.zone ~= "--" then zone = node.data.zone end | |
253 | + add_action(node, function() game:changeLevel(tonumber(node.data.level), zone) end) | |
254 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
255 | + --------------------------------------------------------------------------- | |
256 | + elseif node.name == "set-faction-reaction" then | |
257 | + add_action(node, function(npc, player) | |
258 | + local f1 = node.data.f1 | |
259 | + if f1 == "--player--" then f1 = player.faction end | |
260 | + local f2 = node.data.f2 | |
261 | + if f2 == "--npc--" then f2 = npc.faction end | |
262 | + engine.Faction:setFactionReaction(f1, f2, tonumber(node.data.reaction), true) | |
263 | + end) | |
264 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
265 | + --------------------------------------------------------------------------- | |
266 | + elseif node.name == "unique" then | |
267 | + local getstore = function(npc, player) | |
268 | + local store = {} | |
269 | + if node.data.store == "player" then player.__chat_uniqueness = player.__chat_uniqueness or {} store = player.__chat_uniqueness end | |
270 | + if node.data.store == "npc" then npc.__chat_uniqueness = npc.__chat_uniqueness or {} store = npc.__chat_uniqueness end | |
271 | + if node.data.store == "game" then game.state.__chat_uniqueness = game.state.__chat_uniqueness or {} store = game.state.__chat_uniqueness end | |
272 | + return store | |
273 | + end | |
274 | + add_cond(node, function(npc, player) local store = getstore(npc, player) return not store[node.data.id] end) | |
275 | + add_action(node, function(npc, player) local store = getstore(npc, player) store[node.data.id] = true end) | |
276 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
277 | + --------------------------------------------------------------------------- | |
278 | + elseif node.name == "not" then | |
279 | + if answer.cond then local old = answer.cond answer.cond = function(npc, player) return not old(npc, player) end | |
280 | + else answer.cond = function() return false end end | |
281 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
282 | + --------------------------------------------------------------------------- | |
283 | + elseif node.name == "or" then | |
284 | + -- Recurse back to the star of the condition chains of both input2 and input3, then walk them the usual way until we reach us again | |
285 | + local conds = {} | |
286 | + local function walk_chain(chainnode) | |
287 | + local fakeanswer = {} | |
288 | + local function walk(n) | |
289 | + local tid = table.sget(n, 'inputs', 'input_1', "connections", 1, "node") | |
290 | + -- If we have a parent, follow it | |
291 | + if tid then | |
292 | + return walk(nodes[tid]) | |
293 | + -- No parent, we are the start of the chain, that building the cond | |
294 | + else | |
295 | + self:chatFormatActions(nodes, fakeanswer, getnext(), node) | |
296 | + end | |
297 | + end | |
298 | + walk(chainnode) | |
299 | + conds[#conds+1] = fakeanswer.cond | |
300 | + end | |
301 | + | |
302 | + for i, d in ipairs(table.sget(node, 'inputs', 'input_2', "connections") or {}) do walk_chain(nodes[d.node]) end | |
303 | + for i, d in ipairs(table.sget(node, 'inputs', 'input_3', "connections") or {}) do walk_chain(nodes[d.node]) end | |
304 | + | |
305 | + add_cond(node, function(npc, player) for i, cond in ipairs(conds) do if cond(npc, player) then return true end end end) | |
306 | + return self:chatFormatActions(nodes, answer, getnext(), stop_at) | |
307 | + else | |
308 | + return self:triggerHook{"Chat:chatFormatActions", nodes=node, answer=answer, node=node, add_action=add_action, add_cond=add_cond, getnext=getnext, stop_at=stop_at} | |
309 | + end | |
310 | +end | |
311 | + | |
312 | +function _M:loadChatFormat(filepath) | |
313 | + local fdata = fs.readAll(filepath) | |
314 | + if not fdata then print("[Chat] loadChatFormat: error reading file") return end | |
315 | + local data = json.decode(fdata) | |
316 | + | |
317 | + -- Fix chatids to ensure uniqueness | |
318 | + local chatids = {} | |
319 | + for nodeid, node in pairs(data) do | |
320 | + if node.name == "chat" then | |
321 | + local chatid = node.data.chatid | |
322 | + while chatids[node.data.chatid] do node.data.chatid = chatid..rng.range(1, 99999) end | |
323 | + chatids[node.data.chatid] = node | |
324 | + end | |
325 | + end | |
326 | + | |
327 | + for nodeid, node in pairs(data) do | |
328 | + if node.name == "chat" then | |
329 | + local answers = {} | |
330 | + local i = 1 | |
331 | + while node.data["answer"..i] do | |
332 | + answers[i] = {_t(node.data["answer"..i])} | |
333 | + -- Find out if we have actions to take, conditions to apply and where to jump to | |
334 | + if table.sget(node, 'outputs', 'output_'..i, "connections", 1, "node") then | |
335 | + local tn = data[table.sget(node, 'outputs', 'output_'..i, "connections", 1, "node")] | |
336 | + self:chatFormatActions(data, answers[i], tn) | |
337 | + end | |
338 | + i = i + 1 | |
339 | + end | |
340 | + self:addChat{ id = node.data.chatid, | |
341 | + text = _t(node.data.chat), | |
342 | + answers = answers, | |
343 | + } | |
344 | + elseif node.name == "entry-selector" then | |
345 | + local answers = {} | |
346 | + local i = 1 | |
347 | + while table.sget(node, 'outputs', 'output_'..i, "connections", 1, "node") do | |
348 | + answers[i] = {""} | |
349 | + -- Find out if we have actions to take, conditions to apply and where to jump to | |
350 | + local tn = data[table.sget(node, 'outputs', 'output_'..i, "connections", 1, "node")] | |
351 | + self:chatFormatActions(data, answers[i], tn) | |
352 | + i = i + 1 | |
353 | + end | |
354 | + local auto, err = loadstring("return function(npc, player) "..node.data.code.." end") | |
355 | + if not auto and err then error("[Chat] chatFormatActions ERROR: "..err) end | |
356 | + auto = auto() | |
357 | + self:setFunctionEnv(auto) | |
358 | + self:addChat{ id = node.data.chatid, | |
359 | + text = "", | |
360 | + auto = auto, | |
361 | + answers = answers, | |
362 | + } | |
363 | + end | |
364 | + end | |
365 | + self.default_id = "welcome" | |
366 | +end | |
367 | + | |
73 | 368 | --- Switch the NPC talking |
74 | 369 | -- @param[type=Actor] npc |
75 | 370 | -- @return NPC we switched from |
76 | -function _M:switchNPC(npc) | |
371 | +function _M:switchNPC(npc, pan_camera) | |
77 | 372 | local old = self.npc |
78 | 373 | self.npc = npc |
374 | + if pan_camera and game.level and game.level.map and npc.x and npc.y then | |
375 | + game.level.map:centerViewAround(npc.x, npc.y) | |
376 | + end | |
79 | 377 | return old |
80 | 378 | end |
81 | 379 | |
... | ... | @@ -115,7 +413,7 @@ function _M:invoke(id) |
115 | 413 | local hd = {"Chat:invoke", id = id or self.default_id } |
116 | 414 | self:triggerHook(hd) |
117 | 415 | |
118 | - local d = engine.dialogs.Chat.new(self, hd.id, self.force_dialog_width or 500) | |
416 | + local d = require(self.chat_dialog).new(self, hd.id, self.force_dialog_width or 500) | |
119 | 417 | game:registerDialog(d) |
120 | 418 | return d |
121 | 419 | end |
... | ... | @@ -135,7 +433,16 @@ end |
135 | 433 | --- Replace some keywords in the given text |
136 | 434 | -- @string text @playername@, @npcname@, @playerdescriptor.(.-)@ |
137 | 435 | function _M:replace(text) |
138 | - text = text:noun_sub("@playername@", self.player:getName()):noun_sub("@npcname@", self.npc. |