| 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | export LANG=C |
| 6 | export LC_ALL=C |
| 7 | |
| 8 | function check() { |
| 9 | FILENAME=$1 |
| 10 | NAME=$2 |
| 11 | STYLE=$3 |
| 12 | |
| 13 | RESULT=`fc-match "$NAME:$STYLE"` |
| 14 | EXPECTED="$FILENAME: \"$NAME\" \"$STYLE\"" |
| 15 | if [ "$RESULT" != "$EXPECTED" ]; then |
| 16 | echo not matched: "'$RESULT'", expected: "'$EXPECTED'" >&2 |
| 17 | return 1 |
| 18 | else |
| 19 | return 0 |
| 20 | fi |
| 21 | } |
| 22 | |
| 23 | check Pretendard-Black.otf "Pretendard" "Black" |
| 24 | check Pretendard-Bold.otf "Pretendard" "Bold" |
| 25 | check Pretendard-ExtraBold.otf "Pretendard" "ExtraBold" |
| 26 | check Pretendard-ExtraLight.otf "Pretendard" "ExtraLight" |
| 27 | check Pretendard-Light.otf "Pretendard" "Light" |
| 28 | check Pretendard-Medium.otf "Pretendard" "Medium" |
| 29 | check Pretendard-Regular.otf "Pretendard" "Regular" |
| 30 | check Pretendard-SemiBold.otf "Pretendard" "SemiBold" |
| 31 | check Pretendard-Thin.otf "Pretendard" "Thin" |
| 32 | |
| 33 | echo Success |
| 34 | exit 0 |