Re: gdk::font_load on Win
| From: | Steph | Date: | Sat, 16 Feb 2002 10:44:17 +0000 |
| Subject: | Re: gdk::font_load on Win | ||
| References: | 1 2 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1264@lists.php.net to get a copy of this message | ||
- or, now I'm actually awake, it might be more sane to say 'Don't Use Pixel Sizes In
Windows, You Will Get Strange Results!'
Use points.
----- Original Message -----
From: "Steph" <Steph.Fox@btinternet.com>
To: "Gregory Kaczmarczyk" <casmar@mac.com>; <php-gtk-general@lists.php.net>
Sent: Saturday, February 16, 2002 1:13 AM
Subject: Re: [PHP-GTK] gdk::font_load on Win
Hi Gregory,
Thanks for manual feedback.
Yep, you're right, the docs there should link to GdkFont which I hope explains all this - but I
really should've got the parameters right in the font methods, I managed that much throughout
testing :-\ I'll rectify both the link situation and the font method parameters as soon as is
possible.
If you run
echo $font->height($string)."\n";
echo $font->ascent."\n";
echo $font->descent."\n";
on the fontload you gave, the returns are
20
12
3
12 + 3 gives you the height you asked for. The height Windows believes it to be is 20.
So reset your fontload to reflect that, i.e.
& you'll get a return of
25
15
4
- which is as good as it gets on Windows. 15 + 4 is the size displayed; 25 is the height the string
believes itself to be.
----- Original Message -----
From: "Gregory Kaczmarczyk" <casmar@mac.com>
To: <php-gtk-general@lists.php.net>
Sent: Friday, February 15, 2002 11:06 PM
Subject: [PHP-GTK] gdk::font_load on Win
> I'm following the documentation for gdk::font_load as provided in the
> manual. I can make the fonts change quite readily on Linux, however all
> I get is a ~10 px (arial?) font regardless of what I try on windows.
> Here's the font_load line for windows:
> $font = gdk::font_load('-*-Arial-bold-r-normal--15-*-*-*-p-0-iso8859-1');
>
> Am I missing something, & if so, what is it?
>
> Thanks...
>
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php