Skip to content

Commit

Permalink
New icon sets, licensed under LGPLv2.1+.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tetralet committed Dec 22, 2011
1 parent f7f05ca commit 40c9634
Show file tree
Hide file tree
Showing 146 changed files with 210 additions and 0 deletions.
210 changes: 210 additions & 0 deletions distro/dev-tools/icons/hime-create-icons.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
#
# Copyright (C) 2011 Lu, Chao-Ming (Tetralet). All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#

#!/bin/bash

export LC_ALL=zh_TW.UTF8

CONVERT=`whereis -b convert | tr -d '\n' | sed 's/^convert: //g'`
if [ "$CONVERT" == '' ]; then
echo "Command 'convert' is not find. Please install imagemagick package and try again!"
exit 0
fi

print_help()
{
case $1 in
-h|--help)
echo "Usage: $0 SourceImage.png HalfCharImage.png FullCharImage.png Font_Patch Font_Color Mini_Color"
echo "Example: $0 HIME.png HIME_Half.png HIME_Full.png ~/.fonts/DroidSansFallback.ttf \"#1650b8\" \"c81bca\""
exit 0
;;
esac
}

if [ "$1" == '' ]; then
print_help -h
fi
if [ ! -f "$1" ]; then
echo "ERROR: Source Image file $1 Not find!"
echo ""
print_help -h
fi
SOURCE_IMAGE="$1"

if [ "$2" == '' ]; then
print_help -h
fi
if [ ! -f "$2" ]; then
echo "ERROR: HalfChar Image file $1 Not find!"
echo ""
print_help -h
fi
HALF_IMAGE="$2"

if [ "$3" == '' ]; then
print_help -h
fi
if [ ! -f "$3" ]; then
echo "ERROR: FullChar Image file $1 Not find!"
echo ""
print_help -h
fi
FULL_IMAGE="$3"

if [ "$4" == '' ]; then
print_help -h
fi
if [ ! -f "$4" ]; then
echo "ERROR: Font file $4 Not find!"
echo ""
print_help -h
fi
FONT_FILE="$4"

if [ "$5" == '' ]; then
print_help -h
fi
COLOR="$5"

if [ "$6" == '' ]; then
print_help -h
fi
MINI_COLOR="$6"

convert_word()
{
while [ "$1" != '' ]; do
FILE=$1
shift
if [ "$1" != '' ]; then
WORD=$1
else
echo "ERROR: No target file inputed!"
exit 1
fi
shift

SIZE=`echo "$WORD" | wc -m`
if [ "$WORD" == "En" ]; then
SIZE=2
fi
WORK_IMAGE="$SOURCE_IMAGE"
echo "Trying to draw '$WORD' (Size $SIZE) on $SOURCE_IMAGE to $FILE.png ..."
case $SIZE in
1)
FONT_SIZE=17
DRAW_STR="text +0+0 '$WORD'"
TEMP_FILE=""
;;
2)
FONT_SIZE=17
DRAW_STR="text +0+0 '$WORD'"
TEMP_FILE=""
;;
3|4)
if [ "$FILE" == "half-simp" -o "$FILE" == "half-trad" ]; then
WORK_IMAGE="$HALF_IMAGE"
fi
if [ "$FILE" == "full-simp" -o "$FILE" == "full-trad" ]; then
WORK_IMAGE="$FULL_IMAGE"
fi
ORIGINAL_WORD="$WORD"
WORD=`echo $ORIGINAL_WORD | sed -e 's/\(.\)\(.\)/\1/g'`
FONT_SIZE=14
DRAW_STR="text -4-4 '$WORD'"
TEMP_FILE="hime_temp"
convert -pointsize $FONT_SIZE \
-font $FONT_FILE \
-fill $COLOR \
-gravity center \
-draw "$DRAW_STR" \
$WORK_IMAGE "$TEMP_FILE.png"
WORD=`echo $ORIGINAL_WORD | sed -e 's/\(.\)\(.\)/\2/g'`
FONT_SIZE=11
DRAW_STR="text +5+5 '$WORD'"
;;
*)
echo "The input word '$WORD' is too long!"
exit 1
;;
esac
if [ "$TEMP_FILE" == '' -o ! -f "$TEMP_FILE.png" ]; then
convert -pointsize $FONT_SIZE \
-font $FONT_FILE \
-fill $COLOR \
-gravity center \
-draw "$DRAW_STR" \
$WORK_IMAGE "$FILE.png"
else
convert -pointsize $FONT_SIZE \
-font $FONT_FILE \
-fill $MINI_COLOR \
-gravity center \
-draw "$DRAW_STR" \
"$TEMP_FILE.png" "$FILE.png"
rm "$TEMP_FILE.png"
fi
done
}

convert_word 'hime-tray' 'En' \
'4corner' '' \
'NewCJ3' '' \
'amis' '' \
'ar30' '' \
'chewing' '' \
'cj' '' \
'dayi3' '' \
'erbi' '' \
'ez' '' \
'fcitx-qxm' '' \
'fcitx-wanfeng' '' \
'greek' 'αβ' \
'hakka' '' \
'halfwidth-kana' '' \
'intcode' '' \
'jtcj_gb' '' \
'juyin' '' \
'jyutping' '' \
'kana-nippon' '' \
'latin-letters' 'ā' \
'newcj' '' \
'noseeing' '' \
'paiwan' '' \
'pinyin' '' \
'sakura' '' \
'scj' '' \
'shuangpin' '' \
'simplex' '' \
'symbols' '%' \
'taiwan' '' \
'telecode' '' \
'tsin' '' \
'tsou' '' \
'wm2' '' \
'wubi' '' \
'cj5' '倉五' \
'cj-punc' '倉;' \
'en-kana-nippon' 'あE' \
'en-tsin' '詞E' \
'half-simp' ' 简' \
'half-trad' ' 半' \
'full-simp' ' 简' \
'full-trad' ' 全' \
'gdayi3' '易三'
Binary file added distro/dev-tools/icons/hime.xcf
Binary file not shown.
Binary file added distro/dev-tools/icons/hime_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_blue_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_blue_half.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_gray_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_gray_half.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_pink_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added distro/dev-tools/icons/hime_pink_half.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/4corner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/NewCJ3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/amis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/ar30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/chewing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/cj-punc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/cj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/cj5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/dayi3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/en-kana-nippon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/en-tsin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/erbi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/ez.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/fcitx-qxm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/fcitx-wanfeng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/full-simp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/blue/full-trad.png
Binary file added icons/blue/gdayi3.png
Binary file added icons/blue/greek.png
Binary file added icons/blue/hakka.png
Binary file added icons/blue/half-simp.png
Binary file added icons/blue/half-trad.png
Binary file added icons/blue/halfwidth-kana.png
Binary file added icons/blue/hime-tray.png
Binary file added icons/blue/intcode.png
Binary file added icons/blue/jtcj_gb.png
Binary file added icons/blue/juyin.png
Binary file added icons/blue/jyutping.png
Binary file added icons/blue/kana-nippon.png
Binary file added icons/blue/latin-letters.png
Binary file added icons/blue/newcj.png
Binary file added icons/blue/noseeing.png
Binary file added icons/blue/paiwan.png
Binary file added icons/blue/pinyin.png
Binary file added icons/blue/sakura.png
Binary file added icons/blue/scj.png
Binary file added icons/blue/shuangpin.png
Binary file added icons/blue/simplex.png
Binary file added icons/blue/symbols.png
Binary file added icons/blue/taiwan.png
Binary file added icons/blue/telecode.png
Binary file added icons/blue/tsin.png
Binary file added icons/blue/tsou.png
Binary file added icons/blue/wm2.png
Binary file added icons/blue/wubi.png
Binary file added icons/gray/4corner.png
Binary file added icons/gray/NewCJ3.png
Binary file added icons/gray/amis.png
Binary file added icons/gray/ar30.png
Binary file added icons/gray/chewing.png
Binary file added icons/gray/cj-punc.png
Binary file added icons/gray/cj.png
Binary file added icons/gray/cj5.png
Binary file added icons/gray/dayi3.png
Binary file added icons/gray/en-kana-nippon.png
Binary file added icons/gray/en-tsin.png
Binary file added icons/gray/erbi.png
Binary file added icons/gray/ez.png
Binary file added icons/gray/fcitx-qxm.png
Binary file added icons/gray/fcitx-wanfeng.png
Binary file added icons/gray/full-simp.png
Binary file added icons/gray/full-trad.png
Binary file added icons/gray/gdayi3.png
Binary file added icons/gray/greek.png
Binary file added icons/gray/hakka.png
Binary file added icons/gray/half-simp.png
Binary file added icons/gray/half-trad.png
Binary file added icons/gray/halfwidth-kana.png
Binary file added icons/gray/hime-tray.png
Binary file added icons/gray/intcode.png
Binary file added icons/gray/jtcj_gb.png
Binary file added icons/gray/juyin.png
Binary file added icons/gray/jyutping.png
Binary file added icons/gray/kana-nippon.png
Binary file added icons/gray/latin-letters.png
Binary file added icons/gray/newcj.png
Binary file added icons/gray/noseeing.png
Binary file added icons/gray/paiwan.png
Binary file added icons/gray/pinyin.png
Binary file added icons/gray/sakura.png
Binary file added icons/gray/scj.png
Binary file added icons/gray/shuangpin.png
Binary file added icons/gray/simplex.png
Binary file added icons/gray/symbols.png
Binary file added icons/gray/taiwan.png
Binary file added icons/gray/telecode.png
Binary file added icons/gray/tsin.png
Binary file added icons/gray/tsou.png
Binary file added icons/gray/wm2.png
Binary file added icons/gray/wubi.png
Binary file added icons/pink/4corner.png
Binary file added icons/pink/NewCJ3.png
Binary file added icons/pink/amis.png
Binary file added icons/pink/ar30.png
Binary file added icons/pink/chewing.png
Binary file added icons/pink/cj-punc.png
Binary file added icons/pink/cj.png
Binary file added icons/pink/cj5.png
Binary file added icons/pink/dayi3.png
Binary file added icons/pink/en-kana-nippon.png
Binary file added icons/pink/en-tsin.png
Binary file added icons/pink/erbi.png
Binary file added icons/pink/ez.png
Binary file added icons/pink/fcitx-qxm.png
Binary file added icons/pink/fcitx-wanfeng.png
Binary file added icons/pink/full-simp.png
Binary file added icons/pink/full-trad.png
Binary file added icons/pink/gdayi3.png
Binary file added icons/pink/greek.png
Binary file added icons/pink/hakka.png
Binary file added icons/pink/half-simp.png
Binary file added icons/pink/half-trad.png
Binary file added icons/pink/halfwidth-kana.png
Binary file added icons/pink/hime-tray.png
Binary file added icons/pink/intcode.png
Binary file added icons/pink/jtcj_gb.png
Binary file added icons/pink/juyin.png
Binary file added icons/pink/jyutping.png
Binary file added icons/pink/kana-nippon.png
Binary file added icons/pink/latin-letters.png
Binary file added icons/pink/newcj.png
Binary file added icons/pink/noseeing.png
Binary file added icons/pink/paiwan.png
Binary file added icons/pink/pinyin.png
Binary file added icons/pink/sakura.png
Binary file added icons/pink/scj.png
Binary file added icons/pink/shuangpin.png
Binary file added icons/pink/simplex.png
Binary file added icons/pink/symbols.png
Binary file added icons/pink/taiwan.png
Binary file added icons/pink/telecode.png
Binary file added icons/pink/tsin.png
Binary file added icons/pink/tsou.png
Binary file added icons/pink/wm2.png
Binary file added icons/pink/wubi.png

0 comments on commit 40c9634

Please sign in to comment.