フォントの話 RictyDiminished 亜種
昨日、Ricty の生成スクリプトで、Inconsolata と MigMix を掛け合わせたフォントを作成した話を書きました。
これにより半角文字の太さが、ExtraLight, Light, Reguler から選べるようになったのですが、全角文字の太さは同じなので、ちょっと違和感がありました。
本家の RictyDiminished では、Inconsolata と Circle M+ 1m の組み合わせとなっています。
GitHub - edihbrandon/RictyDiminished: Ricty Diminished --- fonts for programming
Circle M+ 1m は以下にあります
https://mix-mplus-ipa.osdn.jp/mplus/
この Circle M+ 1m ですが、太さが5種類あって Inconsolata とつり合いが取れそうです。 また私的には、濁点・半濁点が強調された、 Circle M+ 1m より、自然な感じの Circle M+ 2m がよさそうに見えましたので、Circle M+ 2m を使ってみようと思います。
RictyDiminished 亜種 を作る
まずは、こちらの先生ページ の内容をおさらいします。 感謝!
で、手順をまとめます。
- ubuntu を準備する。(私は ubuntu 20.10 でやりました。)
- 最低限必要なものをインストールする
apt-get update; apt-get install wget unzip fontforge fonttools;
- フォントと、ricty_generator.sh をダウンロードする
- ricty_generator.sh を実行する
- 幅の確認をする。
- 幅の調整をする。
となります。
3 に関してはこんな感じです。ダウンロード
wget -O Inconsolata.zip https://fonts.google.com/download?family=Inconsolata wget -O clamp-2m-20200415.zip "https://ja.osdn.net/frs/redir.php?m=ymu&f=mix-mplus-ipa%2F72749%2Fclamp-2m-20200415.zip" unzip Inconsolata.zip unzip clamp-2m-20200415.zip wget https://rictyfonts.github.io/files/ricty_generator.sh
4 はこんな感じです。
sh ./ricty_generator.sh -d "<>:*+-0r7DZz\"\`" -n -zuntan-iel_cw1_ static/Inconsolata-{ExtraLight,Regular}.ttf clamp-2m-20200415/clamp-2m-w1-{regular,bold}.ttf sh ./ricty_generator.sh -d "<>:*+-0r7DZz\"\`" -n -zuntan-il_cw3_ static/Inconsolata-{Light,Regular}.ttf clamp-2m-20200415/clamp-2m-w3-{regular,bold}.ttf sh ./ricty_generator.sh -d "<>:*+-0r7DZz\"\`" -n -zuntan-ir_cw4_ static/Inconsolata-{Regular,Bold}.ttf clamp-2m-20200415/clamp-2m-w4-{regular,bold}.ttf
5 は、
for P in static/Inconsolata-*.ttf clamp-2m-20200415/clamp-2m-*.ttf Ricty*.ttf; do ttx -t OS/2 "$P" done grep xAvgCharWidth static/*ttx clamp-2m-20200415/*ttx clamp-2m-20200415/*ttx Ricty*.ttx
を実行して、xAvgCharWidth の値を見ます。6 のスクリプトの値に反映させます。
6
for P in Ricty*.ttf; do ttx -t OS/2 "$P" sed -i.bak -e 's,xAvgCharWidth value="897",xAvgCharWidth value="505",' "${P%%.ttf}.ttx" mv "$P" "${P%%.ttf}.ttf.orig" ttx -m "${P%%.ttf}.ttf.orig" "${P%%.ttf}.ttx" done # rm *ttx *bak *ttf.orig
RictyDiminished 亜種 を使う
作ったフォントをインストールして使ってみました。いずれも 16pt です。エディタで使うには大き目かもしれませんね。
良いですね。
Reguler は、RictyDiminished と、おんなじ感じですし、Light はそれを細くした物のようになりました。ExtraLightLight は薄すぎですねぇ。
Discode版に関してですが、RictyDiminished の Discode版に対して以下の文字を除外しています。視認性より自然な風にしてみました。( 0 と r は 、点付きの 0 になってしまう対策です。なんでかな?)
<>:*+-0r7DZz"`
よし今後はこれを使っていくぞぉ。(*
が、6本腕だったら完璧なのになぁ....)