-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Nerd Fontsを追加
- Loading branch information
Showing
6 changed files
with
1,009 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,41 @@ | ||
#!/bin/sh | ||
echo フォント生成 | ||
mkdir ../Work | ||
echo Regularフォントの生成 | ||
fontforge -lang=py -script juglans_generator.py | ||
echo Boldフォントの生成 | ||
fontforge -lang=py -script juglans_generator.py bold | ||
|
||
echo xAvgCharWidthの書き換え | ||
# Regular | ||
ttx -f -t 'OS/2' -d ../Work ../Work/Juglans-Regular.ttf | ||
ttx -f -t 'OS/2' -d ../Work ../SourceTTF/Inconsolata-Regular.ttf | ||
xAvgCharWidth=$(grep xAvgCharWidth ../Work/Inconsolata-Regular.ttx | sed -e 's/.*value="\([0-9]*\)".*/\1/') | ||
sed -i -e "s/^\(.*<xAvgCharWidth value=\"\)[0-9]*\(.*\)/\1$xAvgCharWidth\2/" ../Work/Juglans-Regular.ttx | ||
ttx -f -m ../Work/Juglans-Regular.ttf ../Work/Juglans-Regular.ttx | ||
# Bold | ||
ttx -f -t 'OS/2' -d ../Work ../Work/Juglans-Bold.ttf | ||
ttx -f -t 'OS/2' -d ../Work ../SourceTTF/Inconsolata-Bold.ttf | ||
xAvgCharWidth=$(grep xAvgCharWidth ../Work/Inconsolata-Bold.ttx | sed -e 's/.*value="\([0-9]*\)".*/\1/') | ||
sed -i -e "s/^\(.*<xAvgCharWidth value=\"\)[0-9]*\(.*\)/\1$xAvgCharWidth\2/" ../Work/Juglans-Bold.ttx | ||
ttx -f -m ../Work/Juglans-Bold.ttf ../Work/Juglans-Bold.ttx | ||
# productにコピー | ||
cp ../Work/Juglans-Regular.ttf ../product/Juglans-Regular.ttf | ||
cp ../Work/Juglans-Bold.ttf ../product/Juglans-Bold.ttf | ||
terminals=( | ||
"WindowsTerminal" | ||
"iTerm2" | ||
) | ||
|
||
weights=( | ||
"Regular" | ||
"Bold" | ||
) | ||
|
||
for terminal in "${terminals[@]}" ; do | ||
for weight in "${weights[@]}" ; do | ||
echo "${terminal} ${weight} フォント生成" | ||
fontforge -lang=py -script juglans_generator.py $terminal $weight 2> /dev/null | ||
|
||
src_ttf="../SourceTTF/Inconsolata-${weight}.ttf" | ||
work_ttf="../Work/Juglans-${weight}-for-${terminal}.ttf" | ||
src_ttx="../Work/Inconsolata-${weight}.ttx" | ||
work_ttx="../Work/Juglans-${weight}-for-${terminal}.ttx" | ||
dst_ttf="../product/Juglans-${weight}-for-${terminal}.ttf" | ||
|
||
echo xAvgCharWidthの書き換え | ||
ttx -f -t 'OS/2' -d ../Work $work_ttf | ||
ttx -f -t 'OS/2' -d ../Work $src_ttf | ||
xAvgCharWidth=$(grep xAvgCharWidth $src_ttx | sed -e 's/.*value="\([0-9]*\)".*/\1/') | ||
sed -i -e "s/^\(.*<xAvgCharWidth value=\"\)[0-9]*\(.*\)/\1$xAvgCharWidth\2/" $work_ttx | ||
ttx -f -m $work_ttf $work_ttx | ||
|
||
# productにコピー | ||
cp $work_ttf $dst_ttf | ||
done | ||
done | ||
|
||
echo 圧縮ファイルの作成 | ||
tar -Jcf ../product/Juglans.tar.xz -C ../product/ Juglans-Regular.ttf Juglans-Bold.ttf -C ../ LICENSE README.md サードパーティーライセンス.txt | ||
zip ../product/Juglans.zip -j ../product/Juglans-Regular.ttf ../product/Juglans-Bold.ttf ../LICENSE ../README.md ../サードパーティーライセンス.txt | ||
find ../product -name '*.ttf' -printf "%f\0" | xargs -0 tar -Jcf ../product/Juglans.tar.xz -C ../ LICENSE README.md サードパーティーライセンス.txt -C product | ||
zip -q ../product/Juglans.zip -j ../product/*.ttf ../LICENSE ../README.md ../サードパーティーライセンス.txt | ||
echo 完了 |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.