diff options
author | Akira TAGOH <akira@tagoh.org> | 2010-04-26 12:30:32 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2010-04-26 12:30:32 +0900 |
commit | 58dfe4a3a564f7a563d3634d98a1878bf254bedc (patch) | |
tree | 64850cb188e32fbc194873e25329df44cf308cb0 | |
download | fonts-sig-58dfe4a3a564f7a563d3634d98a1878bf254bedc.tar.gz fonts-sig-58dfe4a3a564f7a563d3634d98a1878bf254bedc.tar.xz fonts-sig-58dfe4a3a564f7a563d3634d98a1878bf254bedc.zip |
* fontconfig/lang-match-check: add
-rwxr-xr-x | fontconfig/lang-match-check | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fontconfig/lang-match-check b/fontconfig/lang-match-check new file mode 100755 index 0000000..2fc7acb --- /dev/null +++ b/fontconfig/lang-match-check @@ -0,0 +1,16 @@ +#! /bin/sh + +[ $# -lt 4 ] && echo "Usage: $(basename $0) <package name> <lang|..> <font name> <sans|serif|monospace>" && exit 1 + +_loclist=$(for i in $(echo $2|sed -e 's/|/ /g'); do echo -n "$(echo $i|sed -e 's/@.*//g') "; done|sed -e 's/ /|/g'|sed -e 's/|$//g') +loclist="en|en-us|$_loclist" +_fullloclist=$(echo "$_loclist|$2"|sed -e "s/|/\n/g"|sort|uniq) +_fullloclist=$(echo $_fullloclist|sed -e 's/ /|/g') +fullloclist="en|en-us|$_fullloclist" +echo "# rpm -qa $1" +rpm -qa $1 +fclanglist=$(for i in $(echo $_fullloclist|sed -e 's/|/ /g') $(localedef --list | grep -E "^($_loclist)_" | sed -e 's/\.[^@].*//g' -e 's/\(.*\)_\([^@]*\)\(.*\)/\1-\2\3/g' | sort | uniq | tr '[:upper:]' '[:lower:]'); do echo $i;done|sort) +fclanglist="en en-us $fclanglist" +for i in monospace sans serif; do for j in $fclanglist; do echo "# fc-match $i:lang=$j"; fc-match $i:lang=$j; done; done +echo "# for i in \$(ls /usr/share/locale|grep -v -E \"^($_fullloclist)\$\"); do fc-match $4:lang=\$i|grep \"$3\"; [ \$? = 0 ] && echo \$i; done" +for i in $(ls /usr/share/locale|grep -v -E "^($2)$"); do fc-match $4:lang=$i|grep "$3"; [ $? = 0 ] && echo $i; done |