Skip to content

Commit

Permalink
Add shell scripts for Noto CJK
Browse files Browse the repository at this point in the history
  • Loading branch information
kojiishi committed Apr 10, 2021
1 parent 836d55f commit f943218
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ You can also run it for a directory to find all font files recursively.
```sh
% python3 NotoCJKBuilder.py ~/googlefonts/noto-cjk
```
Also, 3 small shell scripts are available to build, dump,
and compare with reference files (see [Dump and diff] below):
`make-noto-cjk.sh`, `make-android.sh`, and `make-chromeos.sh`.
```sh
% SRCDIR=~/android-noto-cjk ./make-android.sh -v
```

[Noto CJK]: https://www.google.com/get/noto/help/cjk/

Expand All @@ -132,6 +138,7 @@ to check the behavior on browsers.
[test HTML]: https://kojiishi.github.io/chws/test.html

### Dump and Diff
[Dump and diff]: #dump-and-diff

`Dump.py` can create various types of text dump files.
```sh
Expand Down
5 changes: 5 additions & 0 deletions make-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
export LOG=build/log/andoid.log
export REFDIR=reference/android
SRCDIR=${SRCDIR:-fonts/g/noto-cjk/android/20210103}
./make-noto-cjk.sh "$SRCDIR" $*
5 changes: 5 additions & 0 deletions make-chromeos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
export LOG=build/log/chromeos.log
export REFDIR=reference/chromeos
SRCDIR=${SRCDIR:-fonts/g/noto-cjk/chromeos/noto-cjk-20190409}
./make-noto-cjk.sh "$SRCDIR" $*
12 changes: 12 additions & 0 deletions make-noto-cjk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
SRCDIR=$1
if [[ -z "$SRCDIR" ]]; then
echo "Usage: $0 source-dir" >&2
exit 1
fi
shift
LOG=${LOG:-build/log/noto-cjk.log}
mkdir -p "$(dirname $LOG)"
time ./NotoCJKBuilder.py "$SRCDIR" $* |
./diff-ref.sh "$SRCDIR" $* |
tee "$LOG"

0 comments on commit f943218

Please sign in to comment.