Re: Problem with hard-coded fonts in applications



On Fri, 16 Feb 2001, Pablo Saratxaga wrote:

> Kaixo!
>
> On Tue, Feb 13, 2001 at 10:44:16PM +0000, simos@pc96.ma.rhbnc.ac.uk wrote:
>
> > Dear All,
> > 	In some gnome applications fonts are specified
> > that do not have the corresponding set of characters for
> > other than -8859-1.
> > 	For example, in logview (gnome-utils/logview/config.c),
> > the following are defined:
> >
> > ===>
> > #define FIXED_12_FONT
> > "-b&h-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-*"
> > #define FIXED_12_BFONT
> > "-b&h-lucidatypewriter-bold-r-normal-*-12-*-*-*-*-*-*-*"
> ...
>
> > What should be the resolution of this?
>
> >From my experience the solution is to add ",*-r-*" to the end
> (that is making it a "match all" fontset in practice), and
> then in the programs replace all gdk_font_load by gdk_fontset_load
>
> > The best looks to be (and it is mentioned in control-center)
> > is to get the fixed/varied fonts from the GTK configuration.
> > Since this looks to be a common problem, has an application solved
> > it in a nice way so that logview & others can use the code?
>
> Try
>
> #define FIXED_12_FONT "-b&h-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-*,*-r-*"
>
> etc. and see if that doesn't solve the problem.

Tried the above change but logview crashed.
gdb says that the crash was in:

(gdb) where
#0  0x40210a45 in gtk_style_init () from /usr/lib/libgtk-1.2.so.0
#1  0x402105ae in gtk_style_attach () from /usr/lib/libgtk-1.2.so.0
#2  0x402468b4 in gtk_widget_real_realize () from /usr/lib/libgtk-1.2.so.0
#3  0x401d89e3 in gtk_marshal_NONE__NONE () from /usr/lib/libgtk-1.2.so.0
#4  0x40209f18 in gtk_signal_real_emit () from /usr/lib/libgtk-1.2.so.0
#5  0x40207e35 in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#6  0x4023f339 in gtk_widget_realize () from /usr/lib/libgtk-1.2.so.0
#7  0x4023efe8 in gtk_widget_map () from /usr/lib/libgtk-1.2.so.0
....

simos

p.s.
I played with various settings, I also tried "*-r-*" as is for a font,
the application was working erraticaly (no window was opened) and later
X crashed. I found that xfs had died.






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