#PB_Font_Italic -> TextWidth()/TextHeight()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
gnasen
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 24, 2008 12:21 am

#PB_Font_Italic -> TextWidth()/TextHeight()

Post by gnasen »

Hi board,

Im not sure, if it is possible to get the "real" textwidth and -height with the functions.
I wrote an include to use bitmapfonts and noticed, that if I use a font with the #PB_Font_Italic flag, it returns the normal width and heigt without.

I think its not a bug (its usefull to know where I can set the next character) but if I want to create sprites which are as big as a character, it fails (character has a greater width then the sprite)

Maybe it should be split into 2 different functions like:

TextSetWidth() <> TextRealWidth()
or something else

best regards gnasen
pb 5.11
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I think srod posted some code for getting the height/width of italicized text.
Post Reply