[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [g-i] fonts: a few thoughts

Hidetaka Iwai wrote:
Attilio Fiandrotti <fiandro@tiscalinet.it> wrote:
Message-ID: <[🔎] 43D23247.1040901@tiscalinet.it>

I built mini.iso with gtk+ 2.8.10 and patches attached to this mail,
and took some screenshots.  If we does not change /etc/gtk-2.0/gtkrc
from localechooser, glyphs are taken from improper fonts.

so i suppose that we should definitely check in the gtk_reparse_all() patch so that gtkrc file is reloaded every time a question is diplayed.


the patch made its way yesterday in the SVN, now the graphical installer parses the gtkrc file everytime a question is displayed, so we always have opportunities to set the correct font that has to be used for a specific question. I think that the localechooser patch should be further modified for the case the user switches back from one of the languages that need special fonts to one of the many languages (the most part) that do not need specific fonts (see lines beginning with '>').



Index: localechooser


+# store the current theme name to restore it later
+CURRENT_THEME=$(grep gtk-theme-name /etc/gtk-2.0/gtkrc)
+# set the primary font accroding to $LANGUAGE
+if [ "$DEBIAN_FRONTEND" = "gtk" ]; then
+    case "$LANGUAGE" in
+	ja)
+	    echo 'gtk-font-name = "Sazanami Gothic 12"' >  /etc/gtk-2.0/gtkrc
+            ;;
+	zh)
+	    echo 'gtk-font-name = "AR PL ShanHeiSun Uni 12"' > /etc/gtk-2.0/gtkrc
+            ;;
+	ko)
+	    echo 'gtk-font-name = "UnDotum 12"' > /etc/gtk-2.0/gtkrc
+            ;;
+	ar)
+	    echo 'gtk-font-name = "ae_AlMohanad 12"' > /etc/gtk-2.0/gtkrc
+	    ;;
+	fa)
+	    echo 'gtk-font-name = "Nazli 12"' > /etc/gtk-2.0/gtkrc
+	    ;;
>	*)
>	    echo 'gtk-font-name = "FreeSans 12"' > /etc/gtk-2.0/gtkrc
>	    ;;
+    esac
+    # restoring the current theme information
+    echo $CURRENT_THEME >> /etc/gtk-2.0/gtkrc

 # This is needed later in the script

Reply to: