From 514824357962ada33e16e468eddae70fa0b2ad6b Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Mon, 18 Aug 2003 14:21:37 +0000 Subject: some more i18n changes (create pre-ordered and pre-shaped texts for bidi languages; and fixed some font size problems) --- scripts/splash.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/splash.sh b/scripts/splash.sh index b9f0dd2..5bb4bb4 100644 --- a/scripts/splash.sh +++ b/scripts/splash.sh @@ -101,13 +101,16 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then # - RTL languages need a fake *.po file, where bidi reordering and # shaping is already done. # - indic languages have not shaping + # - some indic fonts don't have ascii glyphs; so the corresponding + # languages have to be disabled (I added a '_' in front) until they are + # fully translated. case "${GP_LANG}${LANGUAGE}" in # languages written in latin that use letters not included in luxi az*|cy*|gn*|vi*) font=/usr/share/fonts/otf/mdk/mdk_teams.otf ;; # basic cyrillic, covered by cp1251 be*|bg*|mk*|ru*|sr*|uk*) - font=/usr/share/fonts/default/Type1/a010015l.pfb ;; + font=/usr/share/fonts/default/Type1/n019023l.pfb ;; # extended cyrillic, not covered by cp1251 mn*|tg*|uz*) font=/usr/share/fonts/otf/mdk/mdk_teams.otf ;; @@ -115,12 +118,14 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then am*) font=/usr/share/fonts/ttf/ethiopic/gfzemenu.ttf ;; ar*|fa*|ur*) font=/usr/share/fonts/ttf/arabic/Kacst-Qr.ttf ;; as*|bn*) font=/usr/share/fonts/ttf/bengali/MuktiBold.ttf ;; - el*) font=/usr/share/fonts/type1/greek/kb.pfb ;; + el*) font=/usr/share/fonts/type1/greek/Kerkis-Italic.pfb ;; he*|yi*) font=/usr/share/fonts/type1/hebrew/Nachlieli-Bold.pfa ;; - hi*|mr*) font=/usr/share/fonts/otf/mdk/raghu.ttf ;; + # this font doesn't has ascii chars + hi*|_mr*) font=/usr/share/fonts/otf/mdk/raghu.ttf ;; hy*) font=/usr/share/fonts/ttf/armenian/artsnk_b.ttf ;; ja*) font=/usr/share/fonts/ttf/japanese/kochi-gothic.ttf ;; - kn*) font=/usr/share/fonts/ttf/kannada/Sampige.ttf ;; + # this font doesn't has ascii chars + _kn*) font=/usr/share/fonts/ttf/kannada/Sampige.ttf ;; ko*) font=/usr/share/fonts/ttf/korean/gulim.ttf ;; ml*) font=/usr/share/fonts/otf/mdk/malayalam.ttf ;; ta*) font=/usr/share/fonts/ttf/tamil/TSCu_Paranar.ttf ;; @@ -145,17 +150,27 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then esac if [ "$font" != "default" ]; then - if [ -r "$font" ] + if [ -r "$font" ]; then custom_font="-f $font" elif [ -r "/etc/locale/`basename $font`" ]; then - custom_font="/etc/locale/`basename $font`" + custom_font="-f /etc/locale/`basename $font`" elif [ -r "/etc/locale/default.ttf" ]; then - custom_font="/etc/locale/default.ttf" + custom_font="-f /etc/locale/default.ttf" else # no font available, translations are not done GP_LANG=C ; LANGUAGE=C ; fi + + # some fonts need a bigger size to have a nice display + case "$custom_font" in + *norasi_b.ttf) text_size=$(( $text_size + 6 )) ;; + *gkai00mp.ttf) text_size=$(( $text_size + 2 )) ;; + *bkai00mp.ttf) text_size=$(( $text_size + 2 )) ;; + *Kacst-Qr.ttf) text_size=$(( $text_size + 6 )) ;; + # sizes lower than 18 display as noise in FB + *kochi-gothic.ttf) if [ "$test_size" -lt "18" ]; then text_size=18 ; fi ;; + esac fi if test "$_shutdown" == "yes"; then -- cgit v1.2.1