Skip to content

Commit

Permalink
iOS 16
Browse files Browse the repository at this point in the history
  • Loading branch information
PoomSmart committed Feb 17, 2023
1 parent 9ae6b8b commit e8595c1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
9 changes: 4 additions & 5 deletions apple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ then
fi

echo "Optimizing PNGs..."
[[ $HD == true ]] && pngquant --skip-if-larger -f --ext .png $ASSETS/160/*.png &
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/96/*.png &
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/64/*.png &
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/40/*.png &
wait
[[ $HD == true ]] && pngquant --skip-if-larger -f --ext .png $ASSETS/160/*.png || true
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/96/*.png || true
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/64/*.png || true
pngquant --skip-if-larger $COLORS -f --ext .png $ASSETS/40/*.png || true

[[ $HD == true ]] && oxipng -q $ASSETS/160/*.png &
oxipng -q $ASSETS/96/*.png &
Expand Down
5 changes: 2 additions & 3 deletions blobmoji/blobmoji.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mogrify -resize 96x96 -path images/96 bitmaps/strike0/*.png
../resize.sh false false false
rm -rf bitmaps

cd $NAME-extra
cd extra
rm -rf svgs images
mkdir -p svgs images/96 images/64 images/48 images/40 images/32 images/20
python3 gen-couple-heart.py
Expand All @@ -33,9 +33,8 @@ python3 gen-handshake.py
for svg in $(find ./svgs -type f -name '*.svg')
do
fname=$(basename $svg)
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png} &
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png}
done
wait
../../resize.sh false false false
cd ..

Expand Down
6 changes: 3 additions & 3 deletions emjc.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ def decode_emjc(emjc_data: bytes):
g = base + (q + 1) // 2
b = base - p // 2 - q // 2

dst_buffer[i * 4 + 0] = (b % 257) + 257 if b < 0 else (b % 257)
dst_buffer[i * 4 + 1] = (g % 257) + 257 if g < 0 else (g % 257)
dst_buffer[i * 4 + 2] = (r % 257) + 257 if r < 0 else (r % 257)
dst_buffer[i * 4 + 0] = (b % 257) + 257 if b < 0 else b % 257
dst_buffer[i * 4 + 1] = (g % 257) + 257 if g < 0 else g % 257
dst_buffer[i * 4 + 2] = (r % 257) + 257 if r < 0 else r % 257
dst_buffer[i * 4 + 3] = alpha[i]
i += 1

Expand Down
6 changes: 2 additions & 4 deletions noto-emoji/noto-emoji.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ echo "Converting SVGs into PNGs..."
for svg in $(find $ASSETS -type f -name '*.svg')
do
fname=$(basename $svg)
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png} &
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png}
done
wait
for svg in $(find $FLAG_ASSETS -type f -name '*.svg')
do
fname=$(basename $svg)
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png} &
rsvg-convert -a -h $MAX_SIZE $svg -o images/$MAX_SIZE/${fname/.svg/.png}
done
wait

cd extra
rm -rf svgs images
Expand Down
1 change: 1 addition & 0 deletions prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ IOS_FONT_NAME=AppleColorEmoji_iOS
WORK_DIR=common

mkdir -p $WORK_DIR
rm -f *.ttx

echo "Extracting font..."
otc2otf $IOS_FONT_NAME.ttc
Expand Down
1 change: 0 additions & 1 deletion resize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ FULL=$2
[[ $3 = true ]] && COLORS=256 || COLORS=

if [[ $HD = true ]]; then
mogrify -resize 160x160 images/160/*.png
pngquant --skip-if-larger $COLORS -f --ext .png images/160/*.png &
mogrify -resize 96x96 -path images/96 images/160/*.png
pngquant --skip-if-larger $COLORS -f --ext .png images/96/*.png &
Expand Down
2 changes: 2 additions & 0 deletions shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def base_norm_special(name: str, with_variant_selector = False):
return '1f408_200d_2b1b'
if name == '1f415_1f9ba':
return '1f415_200d_1f9ba'
if name == '1f426_2b1b':
return '1f426_200d_2b1b'
if name == '1f441_1f5e8':
return '1f441_200d_1f5e8'
if name == '1f62e_1f4a8':
Expand Down

0 comments on commit e8595c1

Please sign in to comment.