using fonts on a screen or windowed screen

Linux specific forum
ProphetOfDoom
User
User
Posts: 84
Joined: Mon Jun 30, 2008 4:36 pm
Location: UK

using fonts on a screen or windowed screen

Post by ProphetOfDoom »

Hey.

Is it possible to use a different font than the default one, on a Screen or windowed screen? I tried using DrawingFont(FontID(myfont)) or something like that, but it wouldn't change the font. Is it an SDL limitation?

Thanks

PS the code in question works fine in Windows Vista
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

No limitation. SDL can do it all...

See here:
http://www.purebasic.fr/english/viewtopic.php?t=31516
cheers,

bembulak
ProphetOfDoom
User
User
Posts: 84
Joined: Mon Jun 30, 2008 4:36 pm
Location: UK

Post by ProphetOfDoom »

I don't understand. I saw a font in OpenOffice.org called Purisa, so I told it to load Purisa and it just went on drawing with the default font. I tried that with several fonts from the drop down list in OpenOffice, with the same results.
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

Once again:
SDL can do it. But it seems to be a little Bug in PB.
1) Loading Fonts in PB for usage on Screens (SDL calls) do not work.
2) Some drawing functiosn in PB for usage on Screens (SDL calls) do not work.

They have been reported before 4.20 Final and I hope they'll be fixed soon.

Try the same (loading Fonts,...) and draw onto a GTK window - this should work. And make sure, that the fontname in OO.org is the "real Fontname". On Windows, as we all know, the need not to be the same....
cheers,

bembulak
ProphetOfDoom
User
User
Posts: 84
Joined: Mon Jun 30, 2008 4:36 pm
Location: UK

Post by ProphetOfDoom »

Okay thanks I get it now. :)
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 576
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Post by bembulak »

You're welcome.
cheers,

bembulak
Post Reply