Re: definining fontsets in /etc/gtkr/gtkrc.* is a very bad thing
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: definining fontsets in /etc/gtkr/gtkrc.* is a very bad thing
- Date: 22 Aug 2000 12:40:19 -0400
Vlad Harchev <hvv@hippo.ru> writes:
> It looks like fontset concept is actively pushed by gtk developers (the proof
> for this is existance of /etc/gtk/gtkrc.* for most languages). I think this is
> _very_ bad approach. I think any /etc/gtk/gtkrc.* shouldn't be installed at
> all or they should define a safe default for _font_, _not_ _fontset_. First
> of all, most files in /etc/gtk/ define several fonts for a given charset.
The way internationalization works in Xlib is via fontsets. GTK+-2.0
will bypass this mechanism, but for GTK+-1.2, we are using that
mechanism.
> Let's see gtkrc.ru from gtk-1.3.1:
>
> style "gtk-default-ru" {
> fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-*,\
> -*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
> -cronyx-helvetica-medium-r-normal--12-*-*-*-*-*-koi8-r,\
> -*-arial-medium-r-normal--12-*-*-*-*-*-koi8-r"
> }
> class "GtkWidget" style "gtk-default-ru"
>
> The last two line for some reason list 2 fonts with the same encoding koi8-r.
> This means that Xlib according to XCreateFontSet(3X) will choose random font
> (at fontset creation) that will be used for strings in koi8-r charset (and
> almost each /etc/gtk/gtkrc.* defines several fonts for the same encoding).
> That's a bad thing.
It may be random in theory, in practice, it is the first found wins.
> Even if we removed either of two fonts from that fontset,
> that will mean that user will have no way to choose font using gnome control
> center!
Yes, the font selection mechanism in the control center is not
properly internationalized.
> Also, that limits to only given font size and font weight. This
> is true for any language for which exists /etc/gtk/gtkrc.*.
>
> Since gtk reads /etc/gtkrc/gtkrc.* before ~/.gtkrc (checked), putting default
> font for that language in /etc/gtk/gtkrc.ru will serve two purposes:
> 1) it will provide well-choosen default font for that language
> 2) it will allow user to override that default font in his/her ~/.gtkrc using
> gnome control center.
>
> So, what do you think about all this?
I'm afraid, for GTK+-1.2, if your language is not encoded in iso-8859-1,
you will either:
a) need to edit your ~/.gtkrc by hand.
b) Submit a patch to the control center so it sets the fontset not
the font, for those languages.
(The way it works, is that if a fontset has been specified, then that
overrides the font. Otherwise (basically) the last specified fontset
or font wins.)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]