Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

カスタマイズ用のCLIオプションを追加 #52

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7727709
💰 class文にちょっと整理
miiton Jun 27, 2019
e83f3ce
💰 リファクタリング後ビルドが一通り動くように
miiton Jun 29, 2019
046b4d3
💰 sourceFonts -> source
miiton Jun 29, 2019
d6a8d03
💰 add make collect-source
miiton Jun 29, 2019
82e64f7
💰 update .gitignore
miiton Jun 29, 2019
24858b2
✨ 文字幅を返すためのclass追加
miiton Jun 29, 2019
1a92dea
✨ スラッシュゼロ作成処理追加
miiton Jun 29, 2019
aea4688
✨ DをÐに変換する処理を追加 #47
miiton Jun 29, 2019
f393bda
🐞 幅が512ではなくなっていたのを修正
miiton Jun 30, 2019
e3b70b6
🐞 辞書型の生成のrange指定誤りを修正
miiton Jun 30, 2019
797b3bf
👍 ambiwidth対応
miiton Jul 2, 2019
6a59eef
✨ 放射状アスタリスク close #49
miiton Jul 2, 2019
a9640c4
💚 modified circle ci
miiton Jul 2, 2019
d17518c
💚 modified circleci
miiton Jul 2, 2019
4cbec2e
👍 アスタリスクのBold対応
miiton Jul 2, 2019
6c92905
👍 argparser追加
miiton Jul 4, 2019
e1f9d3d
👍 全角スペースの枠選択を実装
miiton Jul 4, 2019
e2a9274
👍 0の選択を実装
miiton Jul 4, 2019
f7f0e7b
👍 stroked_d の選択を実装
miiton Jul 4, 2019
289b110
👍 縦線の選択を実装
miiton Jul 4, 2019
3892a12
👍 三点リーダーの選択を実装
miiton Jul 4, 2019
256b3bf
👍 アスタリスクの選択を実装
miiton Jul 4, 2019
356c1bf
👍 絵文字の選択を実装
miiton Jul 4, 2019
e2b669a
ビルド時のバリエーションを環境変数で指定できるように
Aug 21, 2019
5e42418
ビルド時のバリエーションの指定方法をREADMEに追記
Aug 21, 2019
bf3b512
Merge pull request #51 from kyoh86/variations-cli
miiton Aug 24, 2019
698a91a
フォントをビルドする際のオプションを追加
SSW-SCIENTIFIC Sep 14, 2019
3e5ec0d
Merge pull request #54 from SSW-SCIENTIFIC/variations
miiton Sep 23, 2019
cbc1a11
Merge branch 'master' into variations
miiton Mar 16, 2020
b9b7e35
Merge branch 'fix/alignment' into variations
miiton Mar 17, 2020
e409afe
👍 行間の調整
miiton Mar 17, 2020
579554d
一部意図せずグリフがMgen+になってしまうので、自動的にambiguousグリフを判定してを処理しないという条件分岐を削除
miiton Mar 18, 2020
a5b8e4a
Merge branch 'main' into variations
miiton Jul 26, 2021
886ef05
GitHub Actionsに移行するのでCircle CIの設定を削除
miiton Jul 26, 2021
79d5925
Merge pull request #73 from YuseiUeno/patch-1
miiton Feb 11, 2022
750e7dc
Merge pull request #72 from kusanaginoturugi/main
miiton Feb 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tmp/*
sourceFonts/*
source/*
Cica/*
.DS_Store
*.orig
Expand Down
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ RUN apt-get update && \
mkdir /work
WORKDIR /work
COPY sourceFonts sourceFonts
RUN curl --fail -iL https://github.com/source-foundry/Hack/releases/download/$HACK_VERSION/Hack-$HACK_VERSION-ttf.zip -o /tmp/hack.zip && \
RUN curl --fail -L https://github.com/source-foundry/Hack/releases/download/$HACK_VERSION/Hack-$HACK_VERSION-ttf.zip -o /tmp/hack.zip && \
unar /tmp/hack.zip -o /tmp/hack && cp /tmp/hack/ttf/* sourceFonts/ && \
curl --fail -iL https://osdn.jp/downloads/users/8/8598/rounded-mgenplus-$MGENPLUS_VERSION.7z -o /tmp/rounded-mgenplus.7z && \
curl --fail -L https://osdn.jp/downloads/users/8/8598/rounded-mgenplus-$MGENPLUS_VERSION.7z -o /tmp/rounded-mgenplus.7z && \
unar /tmp/rounded-mgenplus.7z -o /tmp && \
cp /tmp/rounded-mgenplus/rounded-mgenplus-1m-regular.ttf sourceFonts/ && \
cp /tmp/rounded-mgenplus/rounded-mgenplus-1m-bold.ttf sourceFonts/ && \
curl --fail -iL https://github.com/googlei18n/noto-emoji/raw/$NOTO_EMOJI_VERSION/fonts/NotoEmoji-Regular.ttf -o sourceFonts/NotoEmoji-Regular.ttf && \
curl --fail -iL http://sourceforge.net/projects/dejavu/files/dejavu/$DEJAVU_VERSION/dejavu-fonts-ttf-$DEJAVU_VERSION.zip -o /tmp/dejavu.zip && \
curl --fail -L https://github.com/googlei18n/noto-emoji/raw/$NOTO_EMOJI_VERSION/fonts/NotoEmoji-Regular.ttf -o sourceFonts/NotoEmoji-Regular.ttf && \
curl --fail -L http://sourceforge.net/projects/dejavu/files/dejavu/$DEJAVU_VERSION/dejavu-fonts-ttf-$DEJAVU_VERSION.zip -o /tmp/dejavu.zip && \
unar /tmp/dejavu.zip -o /tmp && \
cp /tmp/dejavu-fonts-ttf-$DEJAVU_VERSION/ttf/DejaVuSansMono.ttf sourceFonts/ && \
cp /tmp/dejavu-fonts-ttf-$DEJAVU_VERSION/ttf/DejaVuSansMono-Bold.ttf sourceFonts/ && \
curl --fail -iL https://github.com/mirmat/iconsfordevs/raw/$ICONSFORDEVS_VERSION/fonts/iconsfordevs.ttf -o sourceFonts/iconsfordevs.ttf
curl --fail -L https://github.com/mirmat/iconsfordevs/raw/$ICONSFORDEVS_VERSION/fonts/iconsfordevs.ttf -o sourceFonts/iconsfordevs.ttf
curl --fail -L http://www.unicode.org/Public/12.0.0/ucd/EastAsianWidth.txt -o sourceFonts/EastAsianWidth.txt

COPY cica.py cica.py
COPY width_parser.py width_parser.py
COPY LICENSE.txt LICENSE.txt
COPY COPYRIGHT.txt COPYRIGHT.txt

Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
collect-source:
curl -L https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.zip -o hack.zip
unar hack.zip
cp ttf/* source/
rm hack.zip
rm -r ttf
curl -LO https://osdn.jp/downloads/users/8/8598/rounded-mgenplus-20150602.7z
unar rounded-mgenplus-20150602.7z
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-regular.ttf ./source
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-bold.ttf ./source
curl -L https://github.com/googlei18n/noto-emoji/raw/master/fonts/NotoEmoji-Regular.ttf -o source/NotoEmoji-Regular.ttf
curl -LO http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.zip
unar dejavu-fonts-ttf-2.37.zip
mv dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf ./source/
mv dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono-Bold.ttf ./source/
curl -L https://github.com/mirmat/iconsfordevs/raw/master/fonts/iconsfordevs.ttf -o source/iconsfordevs.ttf
curl -L http://www.unicode.org/Public/12.0.0/ucd/EastAsianWidth.txt -o source/EastAsianWidth.txt
build:
@fontforge -lang=py -script cica.py 2> /dev/null
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ curl -LO https://osdn.jp/downloads/users/8/8598/rounded-mgenplus-20150602.7z
unar rounded-mgenplus-20150602.7z
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-regular.ttf ./sourceFonts
cp rounded-mgenplus-20150602/rounded-mgenplus-1m-bold.ttf ./sourceFonts
curl -L https://github.com/googlei18n/noto-emoji/raw/master/fonts/NotoEmoji-Regular.ttf -o sourceFonts/NotoEmoji-Regular.ttf
curl -L https://github.com/googlefonts/noto-emoji/raw/main/fonts/NotoEmoji-Regular.ttf -o sourceFonts/NotoEmoji-Regular.ttf
curl -LO http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.zip
unar dejavu-fonts-ttf-2.37.zip
mv dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf ./sourceFonts/
Expand All @@ -136,6 +136,38 @@ fontforge 20120731
libfontforge 20120731-ML
```

### ビルドオプション

ビルド時にオプションまたは環境変数で、一部の文字の設定を変更できます。

Dockerを使う場合の例:

```sh
docker-compose build; docker-compose run --rm -e CICA_SPACE=1 cica
```

手動でやる場合の例:

```sh
fontforge -lang=py -script cica.py --space 1
```

各オプションは以下のとおりです。

| オプション | 環境変数 | 意味 |
| --- | --- | --- |
| --space | CICA_SPACE | 全角スペースに枠をつける (0) かつけない (1) か選べます (デフォルト: 0) |
| --zero | CICA_ZERO | ゼロを dotted(0)、slashed(1)、Hack(2)、blanked(3) から選べます (デフォルト: 0) |
| --asterisk | CICA_ASTERISK | アスタリスクのタイプを radial(0) か star(1) か選べます (デフォルト: 0) |
| --stroked-d | CICA_STROKED_D | Dを stroked(0) か normal(1) か選べます (デフォルト: 0) |
| --vertical-line | CICA_VERTICAL_LINE | 縦線を broken(0) か solid(1) か選べます (デフォルト: 0) |
| --ambiguous-width | CICA_AMBIGUOUS_WIDTH | 曖昧幅文字幅を single(0) か wide(1) か選べます (デフォルト: 0) |
| --ellipsis | CICA_ELLIPSIS | 三点リーダー類を single(0) か wide(1) か選べます (デフォルト: 0) |
| --emoji | CICA_EMOJI | 絵文字類を noto emoji(0) か system(1) か選べます (デフォルト: 0) |
| --m | CICA_MODIFIED_LOWERCASE_M | mの中心の線が short(0) か Hack(1) か選べます (デフォルト: 0) |
| --WM | CICA_MODIFIED_WM | MとWが modified(0) か Hack(1) か選べます (デフォルト: 0) |
| --broken-emdash | CICA_BROKEN_EMDASH | emdashを broken(0) にするか Hack(1) か選べます (デフォルト: 0) |

## ライセンス

* [LICENSE.txt](LICENSE.txt)
Expand Down
Loading