Re: [Tuxpaint-dev] font loading, threads, processes, etc.

2005-01-20 Thread Bill Kendrick
On Wed, Jan 19, 2005 at 11:32:40AM -0500, Albert Cahalan wrote:
 Just how many fonts do you have anyway?

Good question. :^)

Just counting TTFs, (locate .ttf | wc -l), I apparently have 1300 !?!?

A few aren't installed fonts, but some fonts I was testing in Tux Paint,
for example, but a good 1200 are fonts living outside /home.


I just noticed something.  If you hit [Esc] while Tux Paint is loading
fonts when you go to the Text tool, it quits cleanly (from what I can tell),
but does NOT remove the lockfile!

-bill!
___
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev


Re: [Tuxpaint-dev] font loading, threads, processes, etc.

2005-01-19 Thread Albert Cahalan
On Wed, 2005-01-19 at 03:25, Bill Kendrick wrote:
 On Tue, Jan 18, 2005 at 11:51:34PM -0500, Albert Cahalan wrote:
  These new-fangled thread thingies don't work so well.
 
 Heh.  D'oh!
 
 
  I think I have the code rock-solid now, or nearly so. :-)
  It ought to work on MacOS X too. As for windows...
 
 Nearly so...  It starts loading the fonts when I hit the 'Text' tool,

Sort of. It transfers font data from a child process to
the main Tux Paint app, and then the child process exits.
The data goes over a socket.

 but eventually segfaults.  I'm having difficulty getting the recent builds
 to load all of my fonts.  It WAS working, and since then, I didn't install
 or remove any fonts, so I think there might be a bad 'free()' that cropped
 up again. ;)
 
 I can gdb if you want... just give me the compile options  incantation!

Add -ggdb to the gcc command line. You might get somewhat more
readable results if you reduce optimization, using -O1 for example.

Then run like this:

gdb ./tuxpaint
set args --640x480 --nostamps --nosound
run
bt

To print a variable named fi of type familyinfo you do:

print {familyinfo}fi

When it crashes, you should get a line number. Start again, this
time adding break 12345 or somesuch before running Tux Paint.
(replace 12345 with a line number that's before the crash)
You can have more than one breakpoint active, using the continue
command to advance from one to the next. Use next to run the
next instruction, perhaps following into a procedure. Use step
to to likewise but not going down into procedure bodies.


___
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev