Re: gtk_init() crashes
- From: Russell Shaw <rjshaw iprimus com au>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_init() crashes
- Date: Tue, 11 Mar 2003 12:27:40 +1100
Owen Taylor wrote:
On Mon, 2003-03-10 at 05:02, Russell Shaw wrote:
Hi,
I'm trying to get a gtk example to run which i just compiled:
russell main~/gtk: ./example
** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: Couldn't load font "Sans 10" falling back to "Sans 10"
** (example:2922): WARNING **: All font failbacks failed!!!!
In gdb, the crash happens in gtk_init(). How can i trace into gtk_init() with gdb?
I wouldn't bother ... you need to fix the above error, and then things
will work. (Though I don't think it is actually occuring inside
gtk_init() ... gtk_init() doesn't do any font stuff as far as I recall.
So, I think your program is actually getting past gtk_init(). Most
likely, it's just that since your GTK+ version doesn't have debugging
symbols, gdb's output is very approximate.
I currently compile with:
CCFLAGS = -Wall -g `pkg-config --cflags glib-2.0 gtk+-2.0` ;
LINKLIBS = `pkg-config --libs glib-2.0 gtk+-2.0` ;
If you want to step into gtk_init(), then you need GTK+ compiled
with debugging symbols, not your program.
Can i change what font is to be loaded?
Well, you could, but Sans needs to be a valid font. There's something
wrong about your GTK+ installation.
If you are using classic X fonts, there is something wrong
with /etc/pango/pangox.aliases
If you are using Xft1, /etc/X11/XftConfig is the relevant file
If you are using Xft/fontconfig /etc/fonts/fonts.conf is the
relevant file.
Hi,
I'm using XFree86 4.2.1 on debian 2.4.20.
I put these into /etc/X11/XftConfig, but it didn't work:
match any family == "sans" edit family += "FreeSans";
match any family == "Sans" edit family += "FreeSans";
match any family == "Sans 10" edit family += "FreeSans";
Is there any utility to list the aliases of fonts?
This is the whole thing:
# Debian XftConfig for ttf-freefont, msttcorefonts or gsfonts-x11
# catch fixed X font queries
match any family == "fixed" edit family =+ "mono";
# catch terminal font queries
match any family == "console" edit family =+ "mono";
# Gtk+ likes to ask for "Monospace"
match any family == "monospace" edit family =+ "mono";
# FreeFont TrueType setup (ttf-freefont)
dir "/usr/share/fonts/truetype/freefont"
# FreeMono*.ttf FreeSans*.ttf FreeSerif*.ttf
match any family == "sans" edit family += "FreeSans";
match any family == "Sans" edit family += "FreeSans";
match any family == "Sans 10" edit family += "FreeSans";
match any family == "serif" edit family += "FreeSerif";
match any family == "mono" edit family += "FreeMono";
# MS TrueType fonts (msttcorefonts)
dir "/usr/share/fonts/truetype"
# Sans: Arial*.ttf Verdana*.ttf Trebuchet_MS*.ttf Comic_Sans_MS*.ttf Arial_Black.ttf
# Serif: Georgia*.ttf Times_New_Roman*.ttf
# Mono: Courier_New*.ttf Andale_Mono.ttf
# Other: Impact.ttf Webdings.ttf
match any family == "sans" edit family += "Arial";
#match any family == "sans" edit family =+ "Verdana";
#match any family == "sans" edit family =+ "Trebu
#
# Check users config file
#
includeif "~/.xftconfig"
#
# Alias between XLFD families and font file family name, prefer local
# fonts
#
match any family == "charter" edit family += "bitstream charter";
match any family == "bitstream charter" edit family =+ "charter";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]