small gtk+ and gtk-eng. fixes (ru locale)



I had to make a few changes in gtk+ and gtk-engines in order to get gtk+ and
standart themes to use proper fonts with ru (Russian) locale.   
Now gtk uses the same fonts as before in the standart setup, but it picks proper
fonts when one is using  ru locale. I did not check but, I beleive, my changes also
make it easy to switch between locales that use iso8859-1,2,8,9

In gtk-engines/metal/Theme/gtk/gtkrc I replaced 

      font = "-b&h-lucida-bold-r-normal-sans-12-*-*-*-p-*-iso8859-1"

line by 

      fontset = "-b&h-lucida-bold-r-normal-sans-12-*-*-*-p-*-iso8859-1,\
                 -cronyx-helvetica-bold-r-normal-*-12-*-*-*-p-*-koi8-r"

and in other themes (gtk-engines/*/Theme/gtk/gtkrc) I replaced line

      font = "-adobe-helvetica-medium-r-normal--10-*-*-*-*-*-*-*"

by

      fontset = "-adobe-helvetica-medium-r-normal--10-*-*-*-*-*-iso8859-*,\
                 -cronyx-helvetica-medium-r-normal--11-*-*-*-*-*-koi8-r"

(Those Cyrillic fonts are closest match to the corresponding iso8859-* fonts.)


It was not that simple with the Default theme --- I tried to put the following lines in
its gtkrc file(GTK_INSTALL_ROOT/share/themes/Default/gtk/gtkrc) or in ~/.gtkrc

style "default"
{
  fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-*-*"
}

but it did not change anything.  (rem. IS IT A BUG?)  

But I fixed Default them by editing gtk+/gtk/gtkstyle.c . I changed line 400 from  

       gdk_fontset_load ("-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*");

to

      gdk_fontset_load ("-*-helvetica-medium-r-normal--12-*-*-*-*-*-*-*");


Everything works nicely now! 



**********************************************
*                                            *
*   May I COMMIT those changes to CVS ????   *
*                                            *
**********************************************



         Sergey Panov



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