aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2004-09-30 10:17:25 +0000
committerPablo Saratxaga <pablo@mandriva.com>2004-09-30 10:17:25 +0000
commit057b667e9286ce90f8eb1d7614bd87453fc1df32 (patch)
tree7367b6067737d27eedae39fa7aa9e90920aab6a2
parent2be2617e11cc58733350907aa6c9f7602df1d56a (diff)
downloadbootsplash-057b667e9286ce90f8eb1d7614bd87453fc1df32.tar
bootsplash-057b667e9286ce90f8eb1d7614bd87453fc1df32.tar.gz
bootsplash-057b667e9286ce90f8eb1d7614bd87453fc1df32.tar.bz2
bootsplash-057b667e9286ce90f8eb1d7614bd87453fc1df32.tar.xz
bootsplash-057b667e9286ce90f8eb1d7614bd87453fc1df32.zip
- enabled back use of UTF-8 for fbtruetype
- checked and improved the fonts to use for the various languages
-rw-r--r--bootsplash.spec11
-rw-r--r--fbtruetype/ttf.c10
-rw-r--r--scripts/splash.sh24
3 files changed, 26 insertions, 19 deletions
diff --git a/bootsplash.spec b/bootsplash.spec
index 596476b..7bf9a6e 100644
--- a/bootsplash.spec
+++ b/bootsplash.spec
@@ -65,11 +65,7 @@ do
/etc/locale/$i/LC_MESSAGES/
cp %{_datadir}/locale/$i/LC_MESSAGES/bootsplash.mo \
/etc/locale/$i/LC_MESSAGES/
- for f in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME;
- do
- cp -L %{_datadir}/locale/$i/$f /etc/locale/$i/$f
- done
- break
+ break
fi
done
@@ -91,6 +87,11 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/*
%changelog
+* Tue Sep 30 2004 Pablo Saratxaga <pablo@mandrakesoft.com> 2.1.13-2mdk
+- fix rendering for UTF-8 in ttf.c and splash.sh
+- removed copying of locale from post script (it is now done by DrakX/locale)
+- various new translations
+
* Fri Sep 10 2004 Warly <warly@mandrakesoft.com> 2.1.13-1mdk
- Do not refresh the screen if we are in verbose mode when rc starts
diff --git a/fbtruetype/ttf.c b/fbtruetype/ttf.c
index 4e16f17..edc2bf0 100644
--- a/fbtruetype/ttf.c
+++ b/fbtruetype/ttf.c
@@ -115,7 +115,6 @@ static unsigned short *ASCII_to_UNICODE(unsigned short *unicode,
return unicode;
}
-#if 0
static unsigned short *UTF8_to_UNICODE(unsigned short *unicode,
const char *utf8, int len)
{
@@ -143,7 +142,6 @@ static unsigned short *UTF8_to_UNICODE(unsigned short *unicode,
return unicode;
}
-#endif
/* TTF stuff */
@@ -183,7 +181,7 @@ SDL_Surface *TTF_RenderText_Solid(TTF_Font * font,
Uint16 *unicode_text;
int unicode_len;
- /* Copy the Latin-1 text to a UNICODE text buffer */
+ /* Copy the UTF-8 text to a UNICODE text buffer */
unicode_len = strlen(text);
unicode_text =
(Uint16 *) malloc((unicode_len + 1) * (sizeof *unicode_text));
@@ -191,7 +189,7 @@ SDL_Surface *TTF_RenderText_Solid(TTF_Font * font,
TTF_SetError("Out of memory");
return (NULL);
}
- ASCII_to_UNICODE(unicode_text, text, unicode_len);
+ UTF8_to_UNICODE(unicode_text, text, unicode_len);
RenderUnicode(font, unicode_text, fg);
@@ -211,7 +209,7 @@ unsigned char *TTF_RenderText_Shaded(TTF_Font * font, const char *text,
unsigned short *unicode_text;
int unicode_len;
- /* Copy the Latin-1 text to a UNICODE text buffer */
+ /* Copy the UTF-8 text to a UNICODE text buffer */
unicode_len = strlen(text);
unicode_text =
(unsigned short *) malloc((unicode_len + 1) *
@@ -220,7 +218,7 @@ unsigned char *TTF_RenderText_Shaded(TTF_Font * font, const char *text,
printf("Out of memory\n");
return (NULL);
}
- ASCII_to_UNICODE(unicode_text, text, unicode_len);
+ UTF8_to_UNICODE(unicode_text, text, unicode_len);
/* Render the new text */
textbuf = TTF_RenderUNICODE_Shaded(font, unicode_text, fg, bg);
diff --git a/scripts/splash.sh b/scripts/splash.sh
index 904cedf..9a414fd 100644
--- a/scripts/splash.sh
+++ b/scripts/splash.sh
@@ -29,7 +29,7 @@ gprintf() {
# request translations to be always in UTF-8
if [ -x /bin/gettext -a -n "$1" ]; then
if [ -n "$GP_LANG" ]; then
- TEXT=`OUTPUT_CHARSET=UTF-8 LANGUAGE=$GP_LANG LANG=$GP_LANG gettext -e --domain=$TEXTDOMAIN "$1"`
+ TEXT=`OUTPUT_CHARSET=UTF-8 LANGUAGE=$GP_LANG LC_ALL=$GP_LANG gettext -e --domain=$TEXTDOMAIN "$1"`
else
TEXT=`OUTPUT_CHARSET=UTF-8 gettext -e --domain=$TEXTDOMAIN "$1"`
fi
@@ -112,8 +112,11 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
# languages have to be disabled (I added a '_' in front) until they are
# fully translated.
case "${GP_LANG}${LANGUAGE}" in
+ # Azeri needs the schwa, which is not yet in Nimbus Sans L
+ az*)
+ font=/usr/share/fonts/otf/mdk/mdk_teams.otf ;;
# languages written in latin that use letters not included in luxi
- az*|cy*|gn*|vi*)
+ cy*|gn*|vi*)
font=/usr/share/fonts/default/Type1/n019023l.pfb ;;
# basic cyrillic, covered by cp1251
be*|bg*|mk*|ru*|sr*|uk*)
@@ -125,11 +128,11 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
am*) font=/usr/share/fonts/ttf/ethiopic/gfzemenu.ttf ;;
ber*) font=/usr/share/fonts/ttf/tifinagh/hapaxber.ttf ;;
ar*) font=/usr/share/fonts/ttf/arabic/Kacst-Qr.ttf ;;
- fa*) font=/usr/share/fonts/ttf/arabic/farsi/roya.ttf ;;
- ur*) font=/usr/share/fonts/ttf/arabic/farsi/nastaliq_unicode.ttf ;;
+ fa*) font=/usr/share/fonts/ttf/arabic/farsi/nazli.ttf ;;
+ ur*) font=/usr/share/fonts/ttf/arabic/nastaliq_unicode.ttf ;;
as*|bn*) font=/usr/share/fonts/ttf/bengali/MuktiNarrow.ttf ;;
el*) font=/usr/share/fonts/type1/greek/Kerkis-Italic.pfb ;;
- he*|yi*) font=/usr/share/fonts/type1/hebrew/Nachlieli-Bold.pfa ;;
+ he*|yi*) font=/usr/share/fonts/type1/hebrew/NachlieliCLM-Bold.pfb ;;
# 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 ;;
@@ -138,7 +141,8 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
_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 ;;
+ # using tscii font as currently there isn't shaping
+ ta*) font=/usr/share/fonts/ttf/tscii/tscava.ttf ;;
th*) font=/usr/share/fonts/ttf/thai/norasi_b.ttf ;;
zh_CN*) font=/usr/share/fonts/ttf/gb2312/gkai00mp.ttf ;;
zh_TW*) font=/usr/share/fonts/ttf/big5/bkai00mp.ttf ;;
@@ -156,7 +160,7 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
font=default ;;
# for others, we do a last chance possibility with
# arial unicode, if the user installed it...
- *) font=/usr/X11R6/lib/X11/fonts/drakfont/ttf/arialuni.ttf ;;
+ *) font=/usr/X11R6/lib/X11/fonts/drakfont/ttf/code2000.ttf ;;
esac
if [ "$font" != "default" ]; then
@@ -166,6 +170,10 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
custom_font="-f /etc/locale/`basename $font`"
elif [ -r "/etc/locale/default.ttf" ]; then
custom_font="-f /etc/locale/default.ttf"
+ elif [ -r "/usr/X11R6/lib/X11/fonts/drakfont/ttf/code2000.ttf" ]; then
+ custom_font="-f usr/X11R6/lib/X11/fonts/drakfont/ttf/code2000.ttf"
+ elif [ -r "/usr/X11R6/lib/X11/fonts/drakfont/ttf/arialuni.ttf" ]; then
+ custom_font="-f usr/X11R6/lib/X11/fonts/drakfont/ttf/arialuni.ttf"
else
# no font available, translations are not done
GP_LANG=C ;
@@ -177,7 +185,7 @@ if [ "$progress" == 1 -o "$1" == "start" ]; then
*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 )) ;;
+ *Kacst-Qr.ttf|*nazli.ttf|*nastaliq_unicode.ttf) text_size=$(( $text_size + 6 )) ;;
# sizes lower than 18 display as noise in FB
*kochi-gothic.ttf) if [ "$text_size" -lt "18" ]; then text_size=18 ; fi ;;
esac