Re: [Tuxpaint-dev] Segfault at startup

2005-01-07 Thread Bill Kendrick
On Fri, Jan 07, 2005 at 09:56:38AM -0500, Albert Cahalan wrote:
 
 You mean the segfault, or just the noise about rejecting
 a few crummy fonts?

I still get a segfault, myself, after tons of fonts are rejected due
to 'A' and 'a' looking the same.  Then the same short report about FreeSans
and then the crash. :^/

-bill!
[EMAIL PROTECTED]  April shower bring Kompressor power!
http://newbreedsoftware.com/
___
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev


Re: [Tuxpaint-dev] Multilingual support in stamps

2005-01-07 Thread Bill Kendrick
On Wed, Dec 22, 2004 at 07:12:22PM +0300, Alberto Escudero-Pascual (IT46) wrote:
 Hello John et al,
 
 I have been checking the code and found the reason while although the 
 --lang=swahili worked fine the stamps where still falling to the default 
 english. It seems that if the locale is not present in the operative  
 system, the function(s) getenv() or g_win32_getlocale() returns the 
 default C locale.

This was stuck in the mailing list queue, sorry.  (It's chock full of spam
in there, so I'm trying to clean out the non-spam stuff and then go and
discard the rest.)

I'll look at this patch tonight, and add it to CVS.  Thx!

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


[Tuxpaint-dev] libSDL_ttf is bug-infested

2005-01-07 Thread Albert Cahalan
Version 2.0.7 came out Oct 30. Debian-unstable still
only has version 2.0.6. Among the many terrible bugs
that were fixed:

2.0.7
* Fixed memory corruption problems with some italic fonts
* Fixed crash when opening a font file that doesn't exist
2.0.6
* Fixed memory corruption problem with small point sizes

Yow! Should all italic fonts be blocked?

Also, the library provides no access to the character map.
The only way to tell if a character is junk is to compare
it it pixel-by-pixel against one that surely is junk.

Also, the library appears to randomly return NULL when
rendering something. This is horribly painful. Currently,
the Tux Paint code relys on a font to work if it worked
before. All fonts are tested at startup; if they work
at that time then they ought to continue working.

BTW, I did fix two other problems. Things may work better.


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


[Tuxpaint-dev] bug right here

2005-01-07 Thread Albert Cahalan
This'll crash Tux Paint:

error = Find_Glyph(font, c, CACHED_METRICS|CACHED_PIXMAP);
if( error ) {
SDL_FreeSurface( textbuf );
return NULL;
}

With some fonts, you'll get a box. With others, not. While all
fonts should provide such a box, the library can surely draw
one if the font doesn't provide it.


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


Re: [Tuxpaint-dev] Segfault at startup

2005-01-07 Thread Albert Cahalan
On Fri, 2005-01-07 at 13:36, Bill Kendrick wrote:
 On Fri, Jan 07, 2005 at 09:56:38AM -0500, Albert Cahalan wrote:
  
  You mean the segfault, or just the noise about rejecting
  a few crummy fonts?
 
 I still get a segfault, myself, after tons of fonts are rejected due
 to 'A' and 'a' looking the same.  Then the same short report about FreeSans
 and then the crash. :^/

Well, how about now? Hopefully you can at least start up
and do normal stuff.

I do have a way to crash Tux Paint using a library bug:

1. choose text tool
2. click on screen
3. type pH
4. set bold, italic, and the largest size
5. try every font you have

It took me about 30 to 60 tries before I hit a bad one.



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


Re: [Tuxpaint-dev] Segfault at startup

2005-01-07 Thread Bill Kendrick
On Sat, Jan 08, 2005 at 01:14:50AM -0500, Albert Cahalan wrote:
 Well, how about now? Hopefully you can at least start up
 and do normal stuff.
 

Yep!  Works now, thanks! :^) :^)  Yay!!!


 I do have a way to crash Tux Paint using a library bug:
 
 1. choose text tool
 2. click on screen
 3. type pH
 4. set bold, italic, and the largest size
 5. try every font you have
 
 It took me about 30 to 60 tries before I hit a bad one.

Trying now.  (I've got a LOT of fonts :^) )


BTW, it looks like Tux Paint is reloading the font and/or re-rendering
the text when the selector is scrolled.  I'll see if I can stop that,
as it just slows things down.

Thanks,

-bill!
[EMAIL PROTECTED]  April shower bring Kompressor power!
http://newbreedsoftware.com/
___
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev


Re: [Tuxpaint-dev] Segfault at startup

2005-01-07 Thread Albert Cahalan
On Sat, 2005-01-08 at 01:39, Bill Kendrick wrote:
 On Sat, Jan 08, 2005 at 01:14:50AM -0500, Albert Cahalan wrote:

  I do have a way to crash Tux Paint using a library bug:
  
  1. choose text tool
  2. click on screen
  3. type pH
  4. set bold, italic, and the largest size
  5. try every font you have
  
  It took me about 30 to 60 tries before I hit a bad one.
 
 Trying now.  (I've got a LOT of fonts :^) )

This one will do the job:
http://luneelfique.free.fr/elvishring.otf

See it as small non-bold non-italic first, and you'll
know why it causes trouble.

 BTW, it looks like Tux Paint is reloading the font and/or re-rendering
 the text when the selector is scrolled.  I'll see if I can stop that,
 as it just slows things down.

No. Be careful!

It'll reload whenever it needs a font it hasn't used before.
So it'll be slow scrolling down, and then fast scrolling up.
It'll stay fast until you touch the text controls.

The reload is required AFAIK, since the SDL_ttf library won't
allow a size change without reloading.

The alternative is insane I think. The number of fonts that
would need to be kept open would be:

families * 4 * number_of_sizes


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


Re: [Tuxpaint-dev] Segfault at startup

2005-01-07 Thread Albert Cahalan
I found a second font that'll cause the crash, out of
116 families I tried. Here they both are:

http://luneelfique.free.fr/elvishring.otf
http://www.webpagepublicity.com/free-fonts/v/Varicelle.ttf

Same procedure:

set bold (maybe not needed)
set italic
set the largest font size
use pH (no quotes) as text

Supposedly the very latest library will survive this, but
that version hasn't even made it into Debian-unstable yet.

BTW, I'm linking with the Electric Fence library. This puts
a guard page after every memory allocation. Use -lefence to
link it in.


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


[Tuxpaint-dev] Paths for fonts on Win32, Mac OS X BeOS?

2005-01-07 Thread Bill Kendrick

In setup(), we have the following that Albert C. recently added:


  if (!no_system_fonts)
  {
#ifdef WIN32
// add Windows font dir here
#else
loadfonts(/usr/share/feh/fonts, 0);
loadfonts(/usr/share/fonts, 0);
loadfonts(/usr/X11R6/lib/X11/fonts, 0);
loadfonts(/usr/share/texmf/fonts, 0);
loadfonts(/usr/share/grace/fonts/type1, 0);
loadfonts(/usr/share/hatman/fonts, 0);
loadfonts(/usr/share/icewm/themes/jim-mac, 0);
loadfonts(/usr/share/vlc/skins2/fonts, 0);
loadfonts(/usr/share/xplanet/fonts, 0);
#endif
  }



Can Win32, Mac OS X and BeOS folks let me know what paths would be good
to add for your respective OSes?

Thanks!

-bill!
[EMAIL PROTECTED]  April shower bring Kompressor power!
http://newbreedsoftware.com/
___
Tuxpaint-dev mailing list
Tuxpaint-dev@tux4kids.net
http://tux4kids.net/mailman/listinfo/tuxpaint-dev