Skip to content

Commit

Permalink
0.2.0: emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Mar 19, 2019
1 parent f6ddd87 commit 00d2348
Show file tree
Hide file tree
Showing 10 changed files with 953 additions and 904 deletions.
1,782 changes: 892 additions & 890 deletions Makefile

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Put Resource Han Rounded TTF files to `rhr/`, and Noto Sans TTF files to `noto/s

## Credit

This project is based on [Sarasa Gothic](https://github.com/be5invis/Sarasa-Gothic) by **Belleve Invis**.
Latin, Greek and Cyrillic characters are from Noto Round, which is a part of Nowar Rounded project. Noto Rounded is derived from [Noto Sans](https://github.com/googlei18n/noto-fonts) by Google.

Latin, Greek and Cyrillic characters are from Noto Round, which is a part of Nowar Rounded project. Noto Rounded is derived from [Noto Sans](https://github.com/googlei18n/noto-fonts) by **Google**.
Emoji (<ruby>絵文字<rt>えもじ</rt></ruby>) are from [Noto Emoji](https://github.com/googlei18n/noto-emoji) by Google.

CJK Ideographs, Kana and Hangul are from [Resource Han Rounded](https://github.com/CyanoHao/Resource-Han-Rounded), which is derived from [Source Han Sans](https://github.com/adobe-fonts/source-han-sans) by **Adobe**.
CJK Ideographs, Kana and Hangul are from [Resource Han Rounded](https://github.com/CyanoHao/Resource-Han-Rounded), which is derived from [Source Han Sans](https://github.com/adobe-fonts/source-han-sans) by Adobe.
23 changes: 14 additions & 9 deletions configure.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ regionNameMap=([CN]=CN [TW]=TW [HK]=HK [JP]=JP [CL]=Classic [OSF]=Oldstyle)
encoding=(unspec gbk big5 korean)

cat >Makefile <<EOF
VERSION = 0.1.4
VERSION = 0.2.0
all: SharedMedia-NowarRounded-\${VERSION}.7z $(echo {CN,TW,HK,JP,CL,OSF}-{L,R,M,B}-\${VERSION}.7z)
all: SharedMedia-NowarRounded-\${VERSION}.7z $(echo NowarRounded-{CN,TW,HK,JP,CL,OSF}-{L,R,M,B}-\${VERSION}.7z)
clean:
-rm -rf noto/*/*.otd noto/rounded/ noto/osf/
Expand All @@ -33,6 +33,11 @@ SharedMedia-NowarRounded-\${VERSION}.7z: nowar/unspec-NowarWideRoundedUI-CN-Ligh
EOF

cat >>Makefile <<EOF
noto/emoji/NotoEmoji-Regular.otd: noto/emoji/NotoEmoji-Regular.ttf
otfccdump --ignore-hints \$< -o \$@
EOF

for w in ${weight[@]}; do

cat >>Makefile <<EOF
Expand Down Expand Up @@ -93,13 +98,13 @@ EOF
cat >>Makefile <<EOF
nowar/$e-NowarCompactRoundedUI-$r-$w.ttf: nowar/$e-NowarCompactRoundedUI-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarCompactRoundedUI-$r-$w.otd: noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarCompactRoundedUI-$r-$w.otd: noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-compactui.py $r $w $e \${VERSION}
nowar/$e-NowarWideRoundedUI-$r-$w.ttf: nowar/$e-NowarWideRoundedUI-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarWideRoundedUI-$r-$w.otd: noto/$latinvar/NotoRounded$osf-$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarWideRoundedUI-$r-$w.otd: noto/$latinvar/NotoRounded$osf-$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-wideui.py $r $w $e \${VERSION}
Expand All @@ -108,19 +113,19 @@ EOF
cat >>Makefile <<EOF
nowar/$e-NowarCompactRounded-$r-$w.ttf: nowar/$e-NowarCompactRounded-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarCompactRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarCompactRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-compact.py $r $w $e \${VERSION}
nowar/$e-NowarRounded-$r-$w.ttf: nowar/$e-NowarRounded-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-SemiCondensed$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-SemiCondensed$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-rounded.py $r $w $e \${VERSION}
nowar/$e-NowarWideRounded-$r-$w.ttf: nowar/$e-NowarWideRounded-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarWideRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarWideRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-wide.py $r $w $e \${VERSION}
Expand All @@ -129,7 +134,7 @@ EOF
cat >>Makefile <<EOF
nowar/$e-NowarWarcraftRounded-$r-$w.ttf: nowar/$e-NowarWarcraftRounded-$r-$w.otd
otfccbuild -O3 \$< -o \$@
nowar/$e-NowarWarcraftRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-SemiCondensed$w.otd noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd
nowar/$e-NowarWarcraftRounded-$r-$w.otd: noto/$latinvar/NotoRounded$osf-SemiCondensed$w.otd noto/$latinvar/NotoRounded$osf-Condensed$w.otd rhr/ResourceHanRounded$r-$w.otd noto/emoji/NotoEmoji-Regular.otd
mkdir -p nowar/
python merge-warcraft.py $r $w $e \${VERSION}
Expand Down Expand Up @@ -280,7 +285,7 @@ for w in ${nowarWeight[@]}; do
koreanDisplayFont=$(getKoreanDisplayFont $rv $w)

cat >>Makefile <<EOF
$target-\${VERSION}.7z: $target/Fonts/MORPHEUS.ttf $target/Fonts/FRIZQT__.ttf $target/Fonts/ARIALN.ttf $target/Fonts/skurri.ttf \\
NowarRounded-$target-\${VERSION}.7z: $target/Fonts/MORPHEUS.ttf $target/Fonts/FRIZQT__.ttf $target/Fonts/ARIALN.ttf $target/Fonts/skurri.ttf \\
$target/Fonts/MORPHEUS_CYR.ttf $target/Fonts/FRIZQT___CYR.ttf $target/Fonts/SKURRI_CYR.ttf \\
$target/Fonts/ARKai_C.ttf $target/Fonts/ARKai_T.ttf $target/Fonts/ARHei.ttf \\
$target/Fonts/bKAI00M.ttf $target/Fonts/bHEI00M.ttf $target/Fonts/bHEI01B.ttf $target/Fonts/blei00d.ttf \\
Expand Down
4 changes: 2 additions & 2 deletions libsm/NowarRoundedTypeface.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 81000
## Interface: 80105

## Title: Nowar Rounded Typeface
## Notes: Register Nowar Rounded typeface to SharedMedia.
Expand All @@ -7,7 +7,7 @@
## Title-zhTW: 有愛圓體
## Notes-zhTW: 向 SharedMedia 登錄有愛圓體字體。

## Version: 0.1.3
## Version: 0.2.0
## Author: Cyano Hao
## X-Category: Miscellaneous
## X-Credits: This addon is derived from on SharedMediaAdditionalFont.
Expand Down
7 changes: 7 additions & 0 deletions merge-compact.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import json
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -183,10 +184,16 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, 'Classic' if region == 'CL' else region, weight, version)

MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

# quotes, em-dash and ellipsis
for u in [0x2014, 0x2018, 0x2019, 0x201C, 0x201D, 0x2026]:
Expand Down
7 changes: 7 additions & 0 deletions merge-compactui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from fontlib.pkana import ApplyPalt
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -192,11 +193,17 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, region2, weight, version)

ApplyPalt(asianFont)
MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

outStr = json.dumps(baseFont, ensure_ascii=False)
with open("nowar/{}-NowarCompactRoundedUI-{}-{}.otd".format(encoding, region, weight), 'w') as outFile:
Expand Down
7 changes: 7 additions & 0 deletions merge-rounded.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import json
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -183,10 +184,16 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, 'Classic' if region == 'CL' else region, weight, version)

MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

# quotes, em-dash and ellipsis
for u in [0x2014, 0x2018, 0x2019, 0x201C, 0x201D, 0x2026]:
Expand Down
7 changes: 7 additions & 0 deletions merge-warcraft.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import json
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -186,13 +187,19 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, 'Classic' if region == 'CL' else region, weight, version)

for n in ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']:
baseFont['glyf'][n] = numFont['glyf'][n]

MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

# quotes, em-dash and ellipsis
for u in [0x2014, 0x2018, 0x2019, 0x201C, 0x201D, 0x2026]:
Expand Down
7 changes: 7 additions & 0 deletions merge-wide.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
import json
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -183,10 +184,16 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, 'Classic' if region == 'CL' else region, weight, version)

MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

# quotes, em-dash and ellipsis
for u in [0x2014, 0x2018, 0x2019, 0x201C, 0x201D, 0x2026]:
Expand Down
7 changes: 7 additions & 0 deletions merge-wideui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from fontlib.pkana import ApplyPalt
from fontlib.merge import MergeBelow
from fontlib.transform import Transform

def NameFont(font, region, weight, version):

Expand Down Expand Up @@ -191,11 +192,17 @@ def NameFont(font, region, weight, version):
with open("rhr/ResourceHanRounded{}-{}.otd".format(region, weight), 'rb') as asianFile:
asianFont = json.loads(asianFile.read().decode('UTF-8', errors = 'replace'))

with open("noto/emoji/NotoEmoji-Regular.otd", 'rb') as emojiFile:
emojiFont = json.loads(emojiFile.read().decode('UTF-8', errors = 'replace'))

baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, region2, weight, version)

ApplyPalt(asianFont)
MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Transform(glyph, 1000 / 2048, 0, 0, 1000 / 2048, 0, 0)
MergeBelow(baseFont, emojiFont)

outStr = json.dumps(baseFont, ensure_ascii=False)
with open("nowar/{}-NowarWideRoundedUI-{}-{}.otd".format(encoding, region, weight), 'w') as outFile:
Expand Down

0 comments on commit 00d2348

Please sign in to comment.