LoadFont() and SelectedFontName()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

LoadFont() and SelectedFontName()

Post by jamirokwai »

Dear board,

please add a procedure to get the REAL font-name.

Code: Select all

RealFontName$ = SelectedFontRealName()
I tried to load a font called "Bank Gothic" on Mac OS X, which PB didn't load (2 seconds before putting a bug-report). The font is called "Bank Gothic Medium" internally, but you cannot read the real name from the SelectedFontName()-function as it goes under the name "Bank Gothic" in the FontRequester. This always happens when a font does not have a "Standard"-typeface.

Would also be great to have something like this:

Code: Select all

RealFontName$ = GetFontRealName(FontName$)
FontName$ = GetFontName(RealFontName$)
SelectedFontTypeFace() ; this one is possibly Mac-only?
It's a lot easier to use the FontRequester with LoadFont without having the need to store the real names internally...
Regards,
JamiroKwai