This is a bug in the server's fontcmp() function. In it's current behavior, if size is 
zero it simply picks the first font in the list. Turns out that because of the way the 
build system builds the font list, this is usually the largest font. I would think 
that the correct (or at least more intuitive) way to do this would be to compare the 
font size to the size of the default font.

I modified the server to use the default font's size when size==0. This means that the 
line:

        pgNewFont(NULL,0,0);

Will allocate the first font it finds that is closest to the default font's size, 
without regard to the font name or special flags. This is not necessarily the default 
font, but it will be similar. To request the default font:

        pgNewFont(NULL,0,PG_FSTYLE_DEFAULT);

This brings up another issue. The font used for widgets, (including the message boxes) 
can be set in the theme, but the official default font is still defined by the 
'default' style flag in the font's '.fi' file. It would be nice to have an option in 
menuconfig to set the default variable and default fixed width fonts. 

> 
> Hi Micah,
> When more then one font size is selected in the server,
> the big one is defined as the default one.
> How could I change this?
> 
> This is a problem for the message box 'cause I don't
> know how defining the font the contained text will
> use and it takes the big one by default....
> 
> What is the way to pass font size to message box or
> to define one font as the default one in the server?
> 
> Thanks,
> Philippe
> 
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/pgui-devel

--
perl -e'socket S,2,1,tcp;connect S,pack(H16,"0200029a80692d32").\0x8;print 
grep!/=/,<S>'


_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to