Revisión | 51 (tree) |
---|---|
Tiempo | 2015-01-10 13:34:04 |
Autor | mm-rounded |
Rounded M+ CVS最新版の漢字を追加
スクリプトの修正
Limited 生成後、ウェブフォントのための修正を行うようにした
@@ -172,8 +172,8 @@ | ||
172 | 172 | MoveArchives(){ |
173 | 173 | |
174 | 174 | cd $WORKPATH/archives |
175 | -mkdir $DATE | |
176 | -mv -f *$DATE.* $DATE | |
175 | +mkdir rounded-mplus-$DATE | |
176 | +mv -f *$DATE.* rounded-mplus-$DATE | |
177 | 177 | |
178 | 178 | } |
179 | 179 |
@@ -219,4 +219,4 @@ | ||
219 | 219 | MoveArchives |
220 | 220 | |
221 | 221 | # コンピュータをスリープする |
222 | -ShutDownNow | |
222 | +# ShutDownNow |
@@ -1,5 +1,5 @@ | ||
1 | 1 | 自家製 Rounded M+ フォント |
2 | -Rounded M+ 1.059.20150109 (M+ FONTS TESTFLIGHT-059+α ベース) | |
2 | +Rounded M+ 1.059.20150110 (M+ FONTS TESTFLIGHT-059+α ベース) | |
3 | 3 | |
4 | 4 | |
5 | 5 | Rounded M+ は、M+ OUTLINE FONTS をベースに丸ゴシック処理を施した |
@@ -10,9 +10,9 @@ | ||
10 | 10 | |
11 | 11 | こちらで公開されている Rounded M+ は、 |
12 | 12 | 伊藤ひろ氏のサイト (http://d.hatena.ne.jp/itouhiro/20120226) に掲載された |
13 | -手順を用いて、2015 年 1 月 9 日時点での M+ OUTLINE FONTS の最新版をベースに | |
13 | +手順を用いて、2015 年 1 月 10 日時点での M+ OUTLINE FONTS の最新版をベースに | |
14 | 14 | 新たに作成したものとなります。 |
15 | -(漢字グリフ 4,906 文字収録) | |
15 | +(漢字グリフ 4,908 文字収録) | |
16 | 16 | |
17 | 17 | M+ FONTS、および 本家 Rounded M+ の制作に関わる全ての方に深くお礼申し上げます。 |
18 | 18 |
@@ -29,7 +29,7 @@ | ||
29 | 29 | |
30 | 30 | |
31 | 31 | このバージョンで更新された内容については、以下のサイトをご覧ください。 |
32 | -http://jikasei.me/news/20150110.html | |
32 | +http://jikasei.me/news/20150111.html | |
33 | 33 | |
34 | 34 | |
35 | 35 | 自家製 Rounded M+ は今後も M+ OUTLINE FONTS の更新に追従して |
@@ -1,5 +1,5 @@ | ||
1 | 1 | cd "%~dp0" |
2 | -emd archives | |
2 | +md archives | |
3 | 3 | copy "%~dp0..\genshin\output\*.ttf" "%~dp0genshin\" |
4 | 4 | call "%~dp0genshin\release.bat" |
5 | 5 | call "%~dp0genshin\releasezip.bat" |
@@ -1,2 +1,4 @@ | ||
1 | 1 | #!/bin/sh |
2 | +rm limited-*.ttf | |
2 | 3 | for F in *ttf; do fontforge limited.pe $F; done |
4 | +./limited-webfontfix.py . |
@@ -0,0 +1,81 @@ | ||
1 | +#!/usr/bin/python | |
2 | +# -*- coding: utf-8 -*- | |
3 | +import sys | |
4 | +import shutil | |
5 | +import struct | |
6 | +import os | |
7 | +import argparse | |
8 | + | |
9 | +# ****************************************************************** | |
10 | +# generate_webfont_fix.py | |
11 | +# 指定パスにある *.ttf ファイルから、WebFont として使う際に | |
12 | +# 差し支えがあるデータの修正を行います。 | |
13 | +# 書き換えた場合はバックアップファイル *.old を生成します。 | |
14 | +# 修正済みなどで書き換える必要がない場合は、書き換えません。 | |
15 | +# ----------------------------------------------------------------- | |
16 | +# [使用方法] generate_webfont_fix.py path | |
17 | +# path : 対象のディレクトリパス | |
18 | +# ****************************************************************** | |
19 | + | |
20 | +path = u'./output' | |
21 | + | |
22 | +def remove_file(file_name): | |
23 | + try: | |
24 | + os.remove(file_name) | |
25 | + except: | |
26 | + pass | |
27 | + | |
28 | +def process_file(file_name): | |
29 | + print file_name | |
30 | + infile = open(file_name, 'r') | |
31 | + pos = 0 | |
32 | + | |
33 | + print file_name | |
34 | + | |
35 | + for r in iter(lambda: infile.read(4), ""): | |
36 | + if r == 'cmap' : | |
37 | + checksumpos = infile.tell() | |
38 | + checksum = struct.unpack('>I', infile.read(4))[0] | |
39 | + print "checksum = %08x [%08x]" % (checksum, checksumpos) | |
40 | + pos = struct.unpack('>I', infile.read(4))[0] | |
41 | + break | |
42 | + | |
43 | + if pos == 0 : exit | |
44 | + | |
45 | + print "pos = %08x" % pos | |
46 | + infile.seek(pos + 12) | |
47 | + dat = struct.unpack('>I', infile.read(4)) | |
48 | + print "dat = %08x" % dat[0] | |
49 | + if dat[0] == 0xa: | |
50 | + infile.close() | |
51 | + remove_file(file_name[:-4] + ".ttx") | |
52 | + # remove_file(file_name + ".old") | |
53 | + | |
54 | + # shutil.copyfile(file_name, file_name + '.old') | |
55 | + # modify cmap table | |
56 | + infile = open(file_name, 'r+') | |
57 | + infile.seek(pos + 12) | |
58 | + infile.write(struct.pack('>I', 0x4)) | |
59 | + | |
60 | + # fix checksum | |
61 | + checksum -= 0xa - 0x4 | |
62 | + if checksum < 0: | |
63 | + checksum += 0x100000000 | |
64 | + infile.seek(checksumpos) | |
65 | + infile.write(struct.pack('>I', checksum)) | |
66 | + infile.close() | |
67 | + print "done." | |
68 | + | |
69 | +def webfont_fix(path): | |
70 | + for root, dirs, files in os.walk(path): | |
71 | + for file_ in files: | |
72 | + if os.path.splitext(file_)[1] == u'.ttf': | |
73 | + process_file(path + '/' + file_); | |
74 | + | |
75 | +if __name__ == '__main__': | |
76 | + parser = argparse.ArgumentParser(description='Make unicode-range from font.') | |
77 | + parser.add_argument('path', nargs=1, help='path') | |
78 | + args = parser.parse_args() | |
79 | + path = args.path[0] | |
80 | + | |
81 | + webfont_fix(path) |
@@ -1,5 +1,5 @@ | ||
1 | 1 | Limited 版フォントについて |
2 | -https://sites.google.com/site/roundedmplus/ | |
2 | +https://jikasei.me/ | |
3 | 3 | |
4 | 4 | Limited 版フォントは、古い Adobe 製ソフト (Adobe Illustrator 7/8/9/10、 |
5 | 5 | Adobe Photoshop 5/5.5/6) で全ての文字が空白で表示され使用できないという問題を |
@@ -17,6 +17,6 @@ | ||
17 | 17 | |
18 | 18 | ライセンスは M+ FONT LICENSE のまま変わりませんので、いかなる用途にも |
19 | 19 | ご自由にお使い頂けます。しかし、Limited 版ではない通常のフォントが正常に |
20 | -使用できる環境で使用するメリットは特にありませんし、編集ツールの都合上 | |
21 | -Web フォントとして正常に機能しなくなっています。使用に問題がない環境においては、 | |
22 | -Limited ではない通常のフォントをお使いいただくことをおすすめします。 | |
20 | +使用できる環境で使用するメリットは特にありません。 | |
21 | +使用に問題がない環境においては、Limited ではない通常のフォントを | |
22 | +お使いいただくことをおすすめします。 |
@@ -1,5 +1,5 @@ | ||
1 | 1 | Rounded M+ FONTS |
2 | -Rounded M+ 1.059.20150109 (based on M+ FONTS TESTFLIGHT-059) | |
2 | +Rounded M+ 1.059.20150110 (based on M+ FONTS TESTFLIGHT-059) | |
3 | 3 | |
4 | 4 | |
5 | 5 | 'Rounded M+ FONTS' is a modification of 'M+ OUTLINE FONTS' |
@@ -8,7 +8,7 @@ | ||
8 | 8 | The license of this font is the same as 'M+ OUTLINE FONTS'. |
9 | 9 | |
10 | 10 | This release is built with the source of |
11 | -'M+ OUTLINE FONTS' on 2015-01-09T00:00:00+09:00. | |
11 | +'M+ OUTLINE FONTS' on 2015-01-10T13:00:00+09:00. | |
12 | 12 | |
13 | 13 | |
14 | 14 | The detailed description (Japanese language) |
@@ -1,2 +1,4 @@ | ||
1 | 1 | #!/bin/sh |
2 | +rm limited-*.ttf | |
2 | 3 | for F in *ttf; do fontforge limited.pe $F; done |
4 | +./limited-webfontfix.py . |
@@ -0,0 +1,81 @@ | ||
1 | +#!/usr/bin/python | |
2 | +# -*- coding: utf-8 -*- | |
3 | +import sys | |
4 | +import shutil | |
5 | +import struct | |
6 | +import os | |
7 | +import argparse | |
8 | + | |
9 | +# ****************************************************************** | |
10 | +# generate_webfont_fix.py | |
11 | +# 指定パスにある *.ttf ファイルから、WebFont として使う際に | |
12 | +# 差し支えがあるデータの修正を行います。 | |
13 | +# 書き換えた場合はバックアップファイル *.old を生成します。 | |
14 | +# 修正済みなどで書き換える必要がない場合は、書き換えません。 | |
15 | +# ----------------------------------------------------------------- | |
16 | +# [使用方法] generate_webfont_fix.py path | |
17 | +# path : 対象のディレクトリパス | |
18 | +# ****************************************************************** | |
19 | + | |
20 | +path = u'./output' | |
21 | + | |
22 | +def remove_file(file_name): | |
23 | + try: | |
24 | + os.remove(file_name) | |
25 | + except: | |
26 | + pass | |
27 | + | |
28 | +def process_file(file_name): | |
29 | + print file_name | |
30 | + infile = open(file_name, 'r') | |
31 | + pos = 0 | |
32 | + | |
33 | + print file_name | |
34 | + | |
35 | + for r in iter(lambda: infile.read(4), ""): | |
36 | + if r == 'cmap' : | |
37 | + checksumpos = infile.tell() | |
38 | + checksum = struct.unpack('>I', infile.read(4))[0] | |
39 | + print "checksum = %08x [%08x]" % (checksum, checksumpos) | |
40 | + pos = struct.unpack('>I', infile.read(4))[0] | |
41 | + break | |
42 | + | |
43 | + if pos == 0 : exit | |
44 | + | |
45 | + print "pos = %08x" % pos | |
46 | + infile.seek(pos + 12) | |
47 | + dat = struct.unpack('>I', infile.read(4)) | |
48 | + print "dat = %08x" % dat[0] | |
49 | + if dat[0] == 0xa: | |
50 | + infile.close() | |
51 | + remove_file(file_name[:-4] + ".ttx") | |
52 | + # remove_file(file_name + ".old") | |
53 | + | |
54 | + # shutil.copyfile(file_name, file_name + '.old') | |
55 | + # modify cmap table | |
56 | + infile = open(file_name, 'r+') | |
57 | + infile.seek(pos + 12) | |
58 | + infile.write(struct.pack('>I', 0x4)) | |
59 | + | |
60 | + # fix checksum | |
61 | + checksum -= 0xa - 0x4 | |
62 | + if checksum < 0: | |
63 | + checksum += 0x100000000 | |
64 | + infile.seek(checksumpos) | |
65 | + infile.write(struct.pack('>I', checksum)) | |
66 | + infile.close() | |
67 | + print "done." | |
68 | + | |
69 | +def webfont_fix(path): | |
70 | + for root, dirs, files in os.walk(path): | |
71 | + for file_ in files: | |
72 | + if os.path.splitext(file_)[1] == u'.ttf': | |
73 | + process_file(path + '/' + file_); | |
74 | + | |
75 | +if __name__ == '__main__': | |
76 | + parser = argparse.ArgumentParser(description='Make unicode-range from font.') | |
77 | + parser.add_argument('path', nargs=1, help='path') | |
78 | + args = parser.parse_args() | |
79 | + path = args.path[0] | |
80 | + | |
81 | + webfont_fix(path) |
@@ -0,0 +1,81 @@ | ||
1 | +#!/usr/bin/python | |
2 | +# -*- coding: utf-8 -*- | |
3 | +import sys | |
4 | +import shutil | |
5 | +import struct | |
6 | +import os | |
7 | +import argparse | |
8 | + | |
9 | +# ****************************************************************** | |
10 | +# generate_webfont_fix.py | |
11 | +# 指定パスにある *.ttf ファイルから、WebFont として使う際に | |
12 | +# 差し支えがあるデータの修正を行います。 | |
13 | +# 書き換えた場合はバックアップファイル *.old を生成します。 | |
14 | +# 修正済みなどで書き換える必要がない場合は、書き換えません。 | |
15 | +# ----------------------------------------------------------------- | |
16 | +# [使用方法] generate_webfont_fix.py path | |
17 | +# path : 対象のディレクトリパス | |
18 | +# ****************************************************************** | |
19 | + | |
20 | +path = u'./output' | |
21 | + | |
22 | +def remove_file(file_name): | |
23 | + try: | |
24 | + os.remove(file_name) | |
25 | + except: | |
26 | + pass | |
27 | + | |
28 | +def process_file(file_name): | |
29 | + print file_name | |
30 | + infile = open(file_name, 'r') | |
31 | + pos = 0 | |
32 | + | |
33 | + print file_name | |
34 | + | |
35 | + for r in iter(lambda: infile.read(4), ""): | |
36 | + if r == 'cmap' : | |
37 | + checksumpos = infile.tell() | |
38 | + checksum = struct.unpack('>I', infile.read(4))[0] | |
39 | + print "checksum = %08x [%08x]" % (checksum, checksumpos) | |
40 | + pos = struct.unpack('>I', infile.read(4))[0] | |
41 | + break | |
42 | + | |
43 | + if pos == 0 : exit | |
44 | + | |
45 | + print "pos = %08x" % pos | |
46 | + infile.seek(pos + 12) | |
47 | + dat = struct.unpack('>I', infile.read(4)) | |
48 | + print "dat = %08x" % dat[0] | |
49 | + if dat[0] == 0xa: | |
50 | + infile.close() | |
51 | + remove_file(file_name[:-4] + ".ttx") | |
52 | + # remove_file(file_name + ".old") | |
53 | + | |
54 | + # shutil.copyfile(file_name, file_name + '.old') | |
55 | + # modify cmap table | |
56 | + infile = open(file_name, 'r+') | |
57 | + infile.seek(pos + 12) | |
58 | + infile.write(struct.pack('>I', 0x4)) | |
59 | + | |
60 | + # fix checksum | |
61 | + checksum -= 0xa - 0x4 | |
62 | + if checksum < 0: | |
63 | + checksum += 0x100000000 | |
64 | + infile.seek(checksumpos) | |
65 | + infile.write(struct.pack('>I', checksum)) | |
66 | + infile.close() | |
67 | + print "done." | |
68 | + | |
69 | +def webfont_fix(path): | |
70 | + for root, dirs, files in os.walk(path): | |
71 | + for file_ in files: | |
72 | + if os.path.splitext(file_)[1] == u'.ttf': | |
73 | + process_file(path + '/' + file_); | |
74 | + | |
75 | +if __name__ == '__main__': | |
76 | + parser = argparse.ArgumentParser(description='Make unicode-range from font.') | |
77 | + parser.add_argument('path', nargs=1, help='path') | |
78 | + args = parser.parse_args() | |
79 | + path = args.path[0] | |
80 | + | |
81 | + webfont_fix(path) |
@@ -0,0 +1,24 @@ | ||
1 | +%d: | |
2 | +cd "%~dp0" | |
3 | +del ..\archives\genshingothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip | |
4 | +..\zip -u -9 ..\archives\genshingothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip GenShinGothic-*.ttf | |
5 | +cd .. | |
6 | +zip -u -9 archives\genshingothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip README_GenShin.txt README_Limited.txt LICENSE.txt mplus-TESTFLIGHT*\*.* | |
7 | + | |
8 | +cd "%~dp0" | |
9 | +del ..\archives\genjyuugothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip | |
10 | +..\zip -u -9 ..\archives\genjyuugothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip GenJyuuGothic-*.ttf | |
11 | +cd .. | |
12 | +zip -u -9 archives\genjyuugothic-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip README_GenJyuu.txt README_Limited.txt LICENSE.txt mplus-TESTFLIGHT*\*.* | |
13 | + | |
14 | +cd "%~dp0" | |
15 | +del ..\archives\genjyuugothic-x-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip | |
16 | +..\zip -u -9 ..\archives\genjyuugothic-x-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip GenJyuuGothicX-*.ttf | |
17 | +cd .. | |
18 | +zip -u -9 archives\genjyuugothic-x-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip README_GenJyuu.txt README_Limited.txt LICENSE.txt mplus-TESTFLIGHT*\*.* | |
19 | + | |
20 | +cd "%~dp0" | |
21 | +del ..\archives\genjyuugothic-l-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip | |
22 | +..\zip -u -9 ..\archives\genjyuugothic-l-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip GenJyuuGothicL-*.ttf | |
23 | +cd .. | |
24 | +zip -u -9 archives\genjyuugothic-l-%date:~-10,4%%date:~-5,2%%date:~-2,2%.zip README_GenJyuu.txt README_Limited.txt LICENSE.txt mplus-TESTFLIGHT*\*.* |
@@ -1,2 +1,4 @@ | ||
1 | 1 | #!/bin/sh |
2 | +rm limited-*.ttf | |
2 | 3 | for F in *ttf; do fontforge limited.pe $F; done |
4 | +./limited-webfontfix.py . |