• R/O
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision51 (tree)
Zeit2015-01-10 13:34:04
Autormm-rounded

Log Message

Rounded M+ CVS最新版の漢字を追加
スクリプトの修正
Limited 生成後、ウェブフォントのための修正を行うようにした

Ändern Zusammenfassung

Diff

--- trunk/tools/cygwin/allbuild.sh (revision 50)
+++ trunk/tools/cygwin/allbuild.sh (revision 51)
@@ -172,8 +172,8 @@
172172 MoveArchives(){
173173
174174 cd $WORKPATH/archives
175-mkdir $DATE
176-mv -f *$DATE.* $DATE
175+mkdir rounded-mplus-$DATE
176+mv -f *$DATE.* rounded-mplus-$DATE
177177
178178 }
179179
@@ -219,4 +219,4 @@
219219 MoveArchives
220220
221221 # コンピュータをスリープする
222-ShutDownNow
222+# ShutDownNow
--- trunk/work/README_J_Rounded.txt (revision 50)
+++ trunk/work/README_J_Rounded.txt (revision 51)
@@ -1,5 +1,5 @@
11 自家製 Rounded M+ フォント
2-Rounded M+ 1.059.20150109 (M+ FONTS TESTFLIGHT-059+α ベース)
2+Rounded M+ 1.059.20150110 (M+ FONTS TESTFLIGHT-059+α ベース)
33
44
55 Rounded M+ は、M+ OUTLINE FONTS をベースに丸ゴシック処理を施した
@@ -10,9 +10,9 @@
1010
1111 こちらで公開されている Rounded M+ は、
1212 伊藤ひろ氏のサイト (http://d.hatena.ne.jp/itouhiro/20120226) に掲載された
13-手順を用いて、2015 年 1 月 9 日時点での M+ OUTLINE FONTS の最新版をベースに
13+手順を用いて、2015 年 1 月 10 日時点での M+ OUTLINE FONTS の最新版をベースに
1414 新たに作成したものとなります。
15-(漢字グリフ 4,906 文字収録)
15+(漢字グリフ 4,908 文字収録)
1616
1717 M+ FONTS、および 本家 Rounded M+ の制作に関わる全ての方に深くお礼申し上げます。
1818
@@ -29,7 +29,7 @@
2929
3030
3131 このバージョンで更新された内容については、以下のサイトをご覧ください。
32-http://jikasei.me/news/20150110.html
32+http://jikasei.me/news/20150111.html
3333
3434
3535 自家製 Rounded M+ は今後も M+ OUTLINE FONTS の更新に追従して
--- trunk/work/allzip_genshin.bat (revision 50)
+++ trunk/work/allzip_genshin.bat (revision 51)
@@ -1,5 +1,5 @@
11 cd "%~dp0"
2-emd archives
2+md archives
33 copy "%~dp0..\genshin\output\*.ttf" "%~dp0genshin\"
44 call "%~dp0genshin\release.bat"
55 call "%~dp0genshin\releasezip.bat"
--- trunk/work/limited/limited.sh (revision 50)
+++ trunk/work/limited/limited.sh (revision 51)
@@ -1,2 +1,4 @@
11 #!/bin/sh
2+rm limited-*.ttf
23 for F in *ttf; do fontforge limited.pe $F; done
4+./limited-webfontfix.py .
--- trunk/work/limited/limited-webfontfix.py (nonexistent)
+++ trunk/work/limited/limited-webfontfix.py (revision 51)
@@ -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)
--- trunk/work/README_J_Limited.txt (revision 50)
+++ trunk/work/README_J_Limited.txt (revision 51)
@@ -1,5 +1,5 @@
11 Limited 版フォントについて
2-https://sites.google.com/site/roundedmplus/
2+https://jikasei.me/
33
44 Limited 版フォントは、古い Adobe 製ソフト (Adobe Illustrator 7/8/9/10、
55 Adobe Photoshop 5/5.5/6) で全ての文字が空白で表示され使用できないという問題を
@@ -17,6 +17,6 @@
1717
1818 ライセンスは M+ FONT LICENSE のまま変わりませんので、いかなる用途にも
1919 ご自由にお使い頂けます。しかし、Limited 版ではない通常のフォントが正常に
20-使用できる環境で使用するメリットは特にありませんし、編集ツールの都合上
21-Web フォントとして正常に機能しなくなっています。使用に問題がない環境においては、
22-Limited ではない通常のフォントをお使いいただくことをおすすめします。
20+使用できる環境で使用するメリットは特にありません。
21+使用に問題がない環境においては、Limited ではない通常のフォントを
22+お使いいただくことをおすすめします。
--- trunk/work/README_E_Rounded.txt (revision 50)
+++ trunk/work/README_E_Rounded.txt (revision 51)
@@ -1,5 +1,5 @@
11 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)
33
44
55 'Rounded M+ FONTS' is a modification of 'M+ OUTLINE FONTS'
@@ -8,7 +8,7 @@
88 The license of this font is the same as 'M+ OUTLINE FONTS'.
99
1010 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.
1212
1313
1414 The detailed description (Japanese language)
--- trunk/work/limited_mgenplus/limited.sh (revision 50)
+++ trunk/work/limited_mgenplus/limited.sh (revision 51)
@@ -1,2 +1,4 @@
11 #!/bin/sh
2+rm limited-*.ttf
23 for F in *ttf; do fontforge limited.pe $F; done
4+./limited-webfontfix.py .
--- trunk/work/limited_mgenplus/limited-webfontfix.py (nonexistent)
+++ trunk/work/limited_mgenplus/limited-webfontfix.py (revision 51)
@@ -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)
--- trunk/work/limited_genshin/limited-webfontfix.py (nonexistent)
+++ trunk/work/limited_genshin/limited-webfontfix.py (revision 51)
@@ -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)
--- trunk/work/limited_genshin/releasezip.bat (nonexistent)
+++ trunk/work/limited_genshin/releasezip.bat (revision 51)
@@ -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*\*.*
--- trunk/work/limited_genshin/limited.sh (revision 50)
+++ trunk/work/limited_genshin/limited.sh (revision 51)
@@ -1,2 +1,4 @@
11 #!/bin/sh
2+rm limited-*.ttf
23 for F in *ttf; do fontforge limited.pe $F; done
4+./limited-webfontfix.py .