Re: gdk_fontset_load and font descriptor



On 10 Jan 2002, Christian Marillat wrote:

 Hi, 

> 
> Hi,
> 
> In some apps I see the font descriptor is gettextized and I think this is a
> bad hack. The second example with a fallback to *-r-* seems more correct
> to me. Then which is the rigth way for the font descriptor ?
> 
> In gnome-core panel/button-widget.c
> 
> font = gdk_fontset_load(_("-*-helvetica-medium-r-normal-*-8-*-*-*-*-*-*-*"));

 The above is much preferred.
 
> And in gnome-about/gnome-about.c
> 
> italicfont = gdk_fontset_load("-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*,*-r-*");

 This is totally broken.
 First, "adobe-helvetica" contains only latin1 glyphs, so use "*-helvetica"
instead of "adobe-helvetica" (because helvetica from other vendors can
contain the user locale's glyphs, while adobe's - definitely won't).
 Second, don't ever append ",*-r-*" to font descriptor. This is very bad
practice that leads to very funny visual appearance.
 Third, make it translatable. 
 So we got the 1st variant. :)

 Best regards,
  -Vlad




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