[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: <[🔎] 43CF7FF9.1010309@tiscalinet.it>

One nice thing is that now it's possible changing at runtime the theming of the GTK frontend (fonts, colours and graphics of the widgets ) simply by checking, at every gtk_initialize() and gtk_go() call, if the /etc/gtk-2.0/gtkrc theme file file has changed or not via a gtk_rc_reparse_all() call.

I checked rev. 34256 of cdebconf but I can't find gtk_rc_reparse_all.
Where can I find new cdebconf?

i didn't check in the modifications yet, but your patch is exactly like the experimental one i wrote before and i think it's time to check it in.

Hidetaka posted some time ago the above localechooser patch that takes care of setting correct fonts for chinese, japanese and korean languages. Davide and me would like to know if the patch for ja, zh and ko is still needed or if oriental fonts look correct now.

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.

For example, [1]U+8A2D and U+5B9A in Chinese(Traditional) are taken from ja.ttf , and [2]many glyphs in Japanese are taken from zh.ttf.
So I think the patch for localechooser is still needed.

maybe the localechooser patch has to be extended to solve similar issues for arabic and persian languages?

Note that the standard gtkrc file will have to have this structure

gtk-theme-name = "current theme"
gtk-font-name="current font"

We must preserve the theme line when we overwrite the gtkrc file, so i think the localechooser patch should be modified like this or similar

# 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
	    echo 'gtk-font-name = "Sazanami Gothic 12"' >  /etc/gtk-2.0/gtkrc
	    echo 'gtk-font-name = "AR PL ShanHeiSun Uni 12"' > /etc/gtk-2.0/gtkrc
	    echo 'gtk-font-name = "UnDotum 12"' > /etc/gtk-2.0/gtkrc

    # restoring the current theme information
    echo $CURRENT_THEME >> /etc/gtk-2.0/gtkrc



Reply to: