Skip to content

Commit

Permalink
0.2.1: a workaround for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Mar 24, 2019
1 parent 00d2348 commit 0521614
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
VERSION = 0.2.0
VERSION = 0.2.1

all: SharedMedia-NowarRounded-${VERSION}.7z NowarRounded-CN-L-${VERSION}.7z NowarRounded-CN-R-${VERSION}.7z NowarRounded-CN-M-${VERSION}.7z NowarRounded-CN-B-${VERSION}.7z NowarRounded-TW-L-${VERSION}.7z NowarRounded-TW-R-${VERSION}.7z NowarRounded-TW-M-${VERSION}.7z NowarRounded-TW-B-${VERSION}.7z NowarRounded-HK-L-${VERSION}.7z NowarRounded-HK-R-${VERSION}.7z NowarRounded-HK-M-${VERSION}.7z NowarRounded-HK-B-${VERSION}.7z NowarRounded-JP-L-${VERSION}.7z NowarRounded-JP-R-${VERSION}.7z NowarRounded-JP-M-${VERSION}.7z NowarRounded-JP-B-${VERSION}.7z NowarRounded-CL-L-${VERSION}.7z NowarRounded-CL-R-${VERSION}.7z NowarRounded-CL-M-${VERSION}.7z NowarRounded-CL-B-${VERSION}.7z NowarRounded-OSF-L-${VERSION}.7z NowarRounded-OSF-R-${VERSION}.7z NowarRounded-OSF-M-${VERSION}.7z NowarRounded-OSF-B-${VERSION}.7z

clean:
-rm -rf noto/*/*.otd noto/rounded/ noto/osf/
-rm -rf rhr/*.otd nowar/*.otd
-rm -rf CN-L/ CN-R/ CN-M/ CN-B/ TW-L/ TW-R/ TW-M/ TW-B/ HK-L/ HK-R/ HK-M/ HK-B/ CL-L/ CL-R/ CL-M/ CL-B/ OSF-L/ OSF-R/ OSF-M/ OSF-B/
-rm -rf CN-L/ CN-R/ CN-M/ CN-B/ TW-L/ TW-R/ TW-M/ TW-B/ HK-L/ HK-R/ HK-M/ HK-B/ JP-L/ JP-R/ JP-M/ JP-B/ CL-L/ CL-R/ CL-M/ CL-B/ OSF-L/ OSF-R/ OSF-M/ OSF-B/
-rm -rf NowarRoundedTypeface/

SharedMedia-NowarRounded-${VERSION}.7z: nowar/unspec-NowarWideRoundedUI-CN-Light.ttf nowar/unspec-NowarWideRoundedUI-CN-Regular.ttf nowar/unspec-NowarWideRoundedUI-CN-Medium.ttf nowar/unspec-NowarWideRoundedUI-CN-Bold.ttf nowar/unspec-NowarWideRoundedUI-TW-Light.ttf nowar/unspec-NowarWideRoundedUI-TW-Regular.ttf nowar/unspec-NowarWideRoundedUI-TW-Medium.ttf nowar/unspec-NowarWideRoundedUI-TW-Bold.ttf nowar/unspec-NowarWideRoundedUI-HK-Light.ttf nowar/unspec-NowarWideRoundedUI-HK-Regular.ttf nowar/unspec-NowarWideRoundedUI-HK-Medium.ttf nowar/unspec-NowarWideRoundedUI-HK-Bold.ttf nowar/unspec-NowarWideRoundedUI-JP-Light.ttf nowar/unspec-NowarWideRoundedUI-JP-Regular.ttf nowar/unspec-NowarWideRoundedUI-JP-Medium.ttf nowar/unspec-NowarWideRoundedUI-JP-Bold.ttf nowar/unspec-NowarWideRoundedUI-CL-Light.ttf nowar/unspec-NowarWideRoundedUI-CL-Regular.ttf nowar/unspec-NowarWideRoundedUI-CL-Medium.ttf nowar/unspec-NowarWideRoundedUI-CL-Bold.ttf nowar/unspec-NowarWideRoundedUI-OSF-Light.ttf nowar/unspec-NowarWideRoundedUI-OSF-Regular.ttf nowar/unspec-NowarWideRoundedUI-OSF-Medium.ttf nowar/unspec-NowarWideRoundedUI-OSF-Bold.ttf nowar/unspec-NowarCompactRoundedUI-CN-Light.ttf nowar/unspec-NowarCompactRoundedUI-CN-Regular.ttf nowar/unspec-NowarCompactRoundedUI-CN-Medium.ttf nowar/unspec-NowarCompactRoundedUI-CN-Bold.ttf nowar/unspec-NowarCompactRoundedUI-TW-Light.ttf nowar/unspec-NowarCompactRoundedUI-TW-Regular.ttf nowar/unspec-NowarCompactRoundedUI-TW-Medium.ttf nowar/unspec-NowarCompactRoundedUI-TW-Bold.ttf nowar/unspec-NowarCompactRoundedUI-HK-Light.ttf nowar/unspec-NowarCompactRoundedUI-HK-Regular.ttf nowar/unspec-NowarCompactRoundedUI-HK-Medium.ttf nowar/unspec-NowarCompactRoundedUI-HK-Bold.ttf nowar/unspec-NowarCompactRoundedUI-JP-Light.ttf nowar/unspec-NowarCompactRoundedUI-JP-Regular.ttf nowar/unspec-NowarCompactRoundedUI-JP-Medium.ttf nowar/unspec-NowarCompactRoundedUI-JP-Bold.ttf nowar/unspec-NowarCompactRoundedUI-CL-Light.ttf nowar/unspec-NowarCompactRoundedUI-CL-Regular.ttf nowar/unspec-NowarCompactRoundedUI-CL-Medium.ttf nowar/unspec-NowarCompactRoundedUI-CL-Bold.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Light.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Regular.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Medium.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Bold.ttf nowar/gbk-NowarRounded-CN-Light.ttf nowar/gbk-NowarRounded-CN-Regular.ttf nowar/gbk-NowarRounded-CN-Medium.ttf nowar/gbk-NowarRounded-CN-Bold.ttf nowar/gbk-NowarWideRounded-CN-Light.ttf nowar/gbk-NowarWideRounded-CN-Regular.ttf nowar/gbk-NowarWideRounded-CN-Medium.ttf nowar/gbk-NowarWideRounded-CN-Bold.ttf nowar/gbk-NowarCompactRounded-CN-Light.ttf nowar/gbk-NowarCompactRounded-CN-Regular.ttf nowar/gbk-NowarCompactRounded-CN-Medium.ttf nowar/gbk-NowarCompactRounded-CN-Bold.ttf nowar/big5-NowarRounded-TW-Light.ttf nowar/big5-NowarRounded-TW-Regular.ttf nowar/big5-NowarRounded-TW-Medium.ttf nowar/big5-NowarRounded-TW-Bold.ttf nowar/big5-NowarWideRounded-TW-Light.ttf nowar/big5-NowarWideRounded-TW-Regular.ttf nowar/big5-NowarWideRounded-TW-Medium.ttf nowar/big5-NowarWideRounded-TW-Bold.ttf nowar/big5-NowarCompactRounded-TW-Light.ttf nowar/big5-NowarCompactRounded-TW-Regular.ttf nowar/big5-NowarCompactRounded-TW-Medium.ttf nowar/big5-NowarCompactRounded-TW-Bold.ttf nowar/big5-NowarRounded-HK-Light.ttf nowar/big5-NowarRounded-HK-Regular.ttf nowar/big5-NowarRounded-HK-Medium.ttf nowar/big5-NowarRounded-HK-Bold.ttf nowar/big5-NowarWideRounded-HK-Light.ttf nowar/big5-NowarWideRounded-HK-Regular.ttf nowar/big5-NowarWideRounded-HK-Medium.ttf nowar/big5-NowarWideRounded-HK-Bold.ttf nowar/big5-NowarCompactRounded-HK-Light.ttf nowar/big5-NowarCompactRounded-HK-Regular.ttf nowar/big5-NowarCompactRounded-HK-Medium.ttf nowar/big5-NowarCompactRounded-HK-Bold.ttf nowar/korean-NowarRounded-CL-Light.ttf nowar/korean-NowarRounded-CL-Regular.ttf nowar/korean-NowarRounded-CL-Medium.ttf nowar/korean-NowarRounded-CL-Bold.ttf nowar/korean-NowarWideRounded-CL-Light.ttf nowar/korean-NowarWideRounded-CL-Regular.ttf nowar/korean-NowarWideRounded-CL-Medium.ttf nowar/korean-NowarWideRounded-CL-Bold.ttf nowar/korean-NowarCompactRounded-CL-Light.ttf nowar/korean-NowarCompactRounded-CL-Regular.ttf nowar/korean-NowarCompactRounded-CL-Medium.ttf nowar/korean-NowarCompactRounded-CL-Bold.ttf
Expand Down
4 changes: 2 additions & 2 deletions configure.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ regionNameMap=([CN]=CN [TW]=TW [HK]=HK [JP]=JP [CL]=Classic [OSF]=Oldstyle)
encoding=(unspec gbk big5 korean)

cat >Makefile <<EOF
VERSION = 0.2.0
VERSION = 0.2.1
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/
-rm -rf rhr/*.otd nowar/*.otd
-rm -rf $(echo {CN,TW,HK,CL,OSF}-{L,R,M,B}/)
-rm -rf $(echo {CN,TW,HK,JP,CL,OSF}-{L,R,M,B}/)
-rm -rf NowarRoundedTypeface/
SharedMedia-NowarRounded-\${VERSION}.7z: nowar/unspec-NowarWideRoundedUI-CN-Light.ttf nowar/unspec-NowarWideRoundedUI-CN-Regular.ttf nowar/unspec-NowarWideRoundedUI-CN-Medium.ttf nowar/unspec-NowarWideRoundedUI-CN-Bold.ttf nowar/unspec-NowarWideRoundedUI-TW-Light.ttf nowar/unspec-NowarWideRoundedUI-TW-Regular.ttf nowar/unspec-NowarWideRoundedUI-TW-Medium.ttf nowar/unspec-NowarWideRoundedUI-TW-Bold.ttf nowar/unspec-NowarWideRoundedUI-HK-Light.ttf nowar/unspec-NowarWideRoundedUI-HK-Regular.ttf nowar/unspec-NowarWideRoundedUI-HK-Medium.ttf nowar/unspec-NowarWideRoundedUI-HK-Bold.ttf nowar/unspec-NowarWideRoundedUI-JP-Light.ttf nowar/unspec-NowarWideRoundedUI-JP-Regular.ttf nowar/unspec-NowarWideRoundedUI-JP-Medium.ttf nowar/unspec-NowarWideRoundedUI-JP-Bold.ttf nowar/unspec-NowarWideRoundedUI-CL-Light.ttf nowar/unspec-NowarWideRoundedUI-CL-Regular.ttf nowar/unspec-NowarWideRoundedUI-CL-Medium.ttf nowar/unspec-NowarWideRoundedUI-CL-Bold.ttf nowar/unspec-NowarWideRoundedUI-OSF-Light.ttf nowar/unspec-NowarWideRoundedUI-OSF-Regular.ttf nowar/unspec-NowarWideRoundedUI-OSF-Medium.ttf nowar/unspec-NowarWideRoundedUI-OSF-Bold.ttf nowar/unspec-NowarCompactRoundedUI-CN-Light.ttf nowar/unspec-NowarCompactRoundedUI-CN-Regular.ttf nowar/unspec-NowarCompactRoundedUI-CN-Medium.ttf nowar/unspec-NowarCompactRoundedUI-CN-Bold.ttf nowar/unspec-NowarCompactRoundedUI-TW-Light.ttf nowar/unspec-NowarCompactRoundedUI-TW-Regular.ttf nowar/unspec-NowarCompactRoundedUI-TW-Medium.ttf nowar/unspec-NowarCompactRoundedUI-TW-Bold.ttf nowar/unspec-NowarCompactRoundedUI-HK-Light.ttf nowar/unspec-NowarCompactRoundedUI-HK-Regular.ttf nowar/unspec-NowarCompactRoundedUI-HK-Medium.ttf nowar/unspec-NowarCompactRoundedUI-HK-Bold.ttf nowar/unspec-NowarCompactRoundedUI-JP-Light.ttf nowar/unspec-NowarCompactRoundedUI-JP-Regular.ttf nowar/unspec-NowarCompactRoundedUI-JP-Medium.ttf nowar/unspec-NowarCompactRoundedUI-JP-Bold.ttf nowar/unspec-NowarCompactRoundedUI-CL-Light.ttf nowar/unspec-NowarCompactRoundedUI-CL-Regular.ttf nowar/unspec-NowarCompactRoundedUI-CL-Medium.ttf nowar/unspec-NowarCompactRoundedUI-CL-Bold.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Light.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Regular.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Medium.ttf nowar/unspec-NowarCompactRoundedUI-OSF-Bold.ttf nowar/gbk-NowarRounded-CN-Light.ttf nowar/gbk-NowarRounded-CN-Regular.ttf nowar/gbk-NowarRounded-CN-Medium.ttf nowar/gbk-NowarRounded-CN-Bold.ttf nowar/gbk-NowarWideRounded-CN-Light.ttf nowar/gbk-NowarWideRounded-CN-Regular.ttf nowar/gbk-NowarWideRounded-CN-Medium.ttf nowar/gbk-NowarWideRounded-CN-Bold.ttf nowar/gbk-NowarCompactRounded-CN-Light.ttf nowar/gbk-NowarCompactRounded-CN-Regular.ttf nowar/gbk-NowarCompactRounded-CN-Medium.ttf nowar/gbk-NowarCompactRounded-CN-Bold.ttf nowar/big5-NowarRounded-TW-Light.ttf nowar/big5-NowarRounded-TW-Regular.ttf nowar/big5-NowarRounded-TW-Medium.ttf nowar/big5-NowarRounded-TW-Bold.ttf nowar/big5-NowarWideRounded-TW-Light.ttf nowar/big5-NowarWideRounded-TW-Regular.ttf nowar/big5-NowarWideRounded-TW-Medium.ttf nowar/big5-NowarWideRounded-TW-Bold.ttf nowar/big5-NowarCompactRounded-TW-Light.ttf nowar/big5-NowarCompactRounded-TW-Regular.ttf nowar/big5-NowarCompactRounded-TW-Medium.ttf nowar/big5-NowarCompactRounded-TW-Bold.ttf nowar/big5-NowarRounded-HK-Light.ttf nowar/big5-NowarRounded-HK-Regular.ttf nowar/big5-NowarRounded-HK-Medium.ttf nowar/big5-NowarRounded-HK-Bold.ttf nowar/big5-NowarWideRounded-HK-Light.ttf nowar/big5-NowarWideRounded-HK-Regular.ttf nowar/big5-NowarWideRounded-HK-Medium.ttf nowar/big5-NowarWideRounded-HK-Bold.ttf nowar/big5-NowarCompactRounded-HK-Light.ttf nowar/big5-NowarCompactRounded-HK-Regular.ttf nowar/big5-NowarCompactRounded-HK-Medium.ttf nowar/big5-NowarCompactRounded-HK-Bold.ttf nowar/korean-NowarRounded-CL-Light.ttf nowar/korean-NowarRounded-CL-Regular.ttf nowar/korean-NowarRounded-CL-Medium.ttf nowar/korean-NowarRounded-CL-Bold.ttf nowar/korean-NowarWideRounded-CL-Light.ttf nowar/korean-NowarWideRounded-CL-Regular.ttf nowar/korean-NowarWideRounded-CL-Medium.ttf nowar/korean-NowarWideRounded-CL-Bold.ttf nowar/korean-NowarCompactRounded-CL-Light.ttf nowar/korean-NowarCompactRounded-CL-Regular.ttf nowar/korean-NowarCompactRounded-CL-Medium.ttf nowar/korean-NowarCompactRounded-CL-Bold.ttf
Expand Down
18 changes: 16 additions & 2 deletions merge-warcraft.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import json
from fontlib.merge import MergeBelow
from fontlib.transform import Transform
from fontlib.transform import Transform, ChangeAdvanceWidth

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

Expand Down Expand Up @@ -193,8 +193,22 @@ def NameFont(font, region, weight, version):
baseFont['OS_2']['ulCodePageRange1'][encoding] = True
NameFont(baseFont, 'Classic' if region == 'CL' else region, weight, version)

maxWidth = 490
numWidth = numFont['glyf']['zero']['advanceWidth']
changeWidth = maxWidth - numWidth if numWidth > maxWidth else 0

for n in ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']:
baseFont['glyf'][n] = numFont['glyf'][n]
glyph = numFont['glyf'][n]
width = glyph['advanceWidth']
pGlyph = numFont['glyf'][n + '.lf']
pWidth = pGlyph['advanceWidth']
if pWidth < width:
glyph = pGlyph
width = pWidth
if changeWidth != 0:
ChangeAdvanceWidth(glyph, changeWidth)
Transform(glyph, 1, 0, 0, 1, (changeWidth + 1) // 2, 0)
baseFont['glyf'][n] = glyph

MergeBelow(baseFont, asianFont)
for _, glyph in emojiFont['glyf'].items():
Expand Down

0 comments on commit 0521614

Please sign in to comment.