From 124d50434c083a0e28efecf6871229b4c7740ee8 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 12 Feb 2003 23:43:03 +0000 Subject: add missing pango rendering modules in ramdisk, do download additional fonts if needed (fixes problems with CJK languages and namely #1098) --- perl-install/lang.pm | 20 ++++++++++++++++++++ perl-install/share/list | 5 ++++- tools/make_mdkinst_stage2 | 8 +++++++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 6ed4d2243..940735129 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -4,6 +4,7 @@ use diagnostics; use strict; use common; use log; +use install_any; #- key: lang name (locale name for some (~5) special cases needing #- extra distinctions) @@ -489,6 +490,25 @@ sub l2pango_font { my $charset = l2charset($lang) or log::l("no charset found for lang $lang!"), return; my $font = charset2pango_font($charset); log::l("charset: $charset ; font: $font"); + + if (common::usingRamdisk()) { + if ($charsets{$charset}[0] !~ /lat|koi|UniCyr/) { + install_any::remove_bigseldom_used(); + my @generic_fontfiles = qw(/usr/X11R6/lib/X11/fonts/12x13mdk.pcf.gz /usr/X11R6/lib/X11/fonts/18x18mdk.pcf.gz); + #- need to unlink first because the files actually exist (and are void); they must exist + #- because if not, when gtk starts, pango will recompute its cache file and exclude them + unlink($_), install_any::getAndSaveFile($_) foreach @generic_fontfiles; + } + + my %pango_modules = (arabic => 'ar|fa|ur', hangul => 'ko', hebrew => 'he|yi', indic => 'hi|bn|ta|te|mr', thai => 'th'); + foreach my $module (keys %pango_modules) { + next if $lang !~ /$pango_modules{$module}/; + install_any::remove_bigseldom_used(); + my ($pango_modules_dir) = glob('/usr/lib/pango/*/modules'); + install_any::getAndSaveFile("$pango_modules_dir/pango-$module-xft.so"); + } + } + return $font; } diff --git a/perl-install/share/list b/perl-install/share/list index afc13317a..e5cf9c024 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -60,8 +60,11 @@ /etc/gtk-2.0/gtk.immodules /etc/pango/pango.modules /usr/LIB/pango/*/modules/pango-basic-xft.so +/usr/LIB/pango/*/modules/pango-arabic-xft.so +/usr/LIB/pango/*/modules/pango-hangul-xft.so /usr/LIB/pango/*/modules/pango-hebrew-xft.so -/usr/LIB/pango/*/modules/pango-basic-x.so +/usr/LIB/pango/*/modules/pango-indic-xft.so +/usr/LIB/pango/*/modules/pango-thai-xft.so /usr/lib/perl5/PERL_VERSION/AutoLoader.pm /usr/lib/perl5/PERL_VERSION/Carp.pm diff --git a/tools/make_mdkinst_stage2 b/tools/make_mdkinst_stage2 index 48182616a..6aa0760b7 100755 --- a/tools/make_mdkinst_stage2 +++ b/tools/make_mdkinst_stage2 @@ -41,7 +41,13 @@ rm -f $STAGE2TMP/usr/X11R6/bin/XF86_{VGA16,3DLabs,TGA,S3} rm -f `ls --sort=size $STAGE2TMP/lib/modules.cz-* | perl -ne 'print if $i++'` rm -f $STAGE2TMP/usr/bin/{pv*,vg*,lv*} $STAGE2TMP/lib/liblvm* rm -f $STAGE2TMP/usr/bin/{resize_reiserfs,fsck.jfs} -rm -f $STAGE2TMP/usr/X11R6/lib/X11/fonts/{12x13mdk,18x18mdk}.pcf* +#- we can't simply remove those files, because when pango will start, +#- if it doesn't see them it will recompute the fonts.cache-1 :/ +>$STAGE2TMP/usr/X11R6/lib/X11/fonts/12x13mdk.pcf.gz +>$STAGE2TMP/usr/X11R6/lib/X11/fonts/18x18mdk.pcf.gz +touch $STAGE2TMP/usr/X11R6/lib/X11/fonts/fonts.cache-1 +rm -f $STAGE2TMP/usr/*/pango/*/modules/pango-{arabic,hangul,hebrew,indic,thai}-xft.so + rm -rf $STAGE2TMP{/usr/bin/brltty,/etc/brltty,/lib/brltty} rm -rf $STAGE2TMP/usr/share/locale_special -- cgit v1.2.1