Ability to change font style after creation.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Ability to change font style after creation.

Post by Shannara »

viewtopic.php?t=16490

In short, I would like the ability to modify font styles after font creation :)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

On Windows for example, the style has to be specified when creating the font. Why don't you want to recreate the font at every change (any special reasons ?).
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Heh :) Thanks for the reply Fred :)

Well, for instance, I load all of my font information from a file once the program have started. Each style piece has a true|false switch. Such as .. FontBold, FontUnderline, FontStrikeout. When looking through the font part of the manual, it looks like the style must be passed with the creation of the Font.

Now, I have no problem doing that except that I havent found a way to combine my switches to a usable font creation proc, easily.

For instance. I cant do #PB_Font_Bold + #PB_Font_Underline and then later call the LoadFont with the result, could I?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Sure, but better use the | operator instead of +.
Post Reply