Declared in <XDraw.h>
Font management class. This is the class object which is used to handle font by encapsulating them
Construction/Destruction
Attach/Detach Semantics
Font Specification
XGFont::GetFontFlags
XGFont::GetFontName
XGFont::GetFontSize
XGFont::GetFontVariant
XGFont::LoadFont
XGFont::SetFontFlags
XGFont::SetFontName
XGFont::SetFontSize
Construction/Destruction
Usage: XGFont::XGFont()
Create a font, marked as attached.
Usage: XGFont::~XGFont()
Delete a font. Normally you should use the 'Detach' method instead of directly destroying this object; otherwise, the font cache can become confused.
Attach/Detach Semantics
Usage: void Attach(void)
This increments the 'attach' count of the font. When the font is first created, it's created with an attach count of one.
Usage: void XGFont::Detach(void)
Detach; this detaches this font, and when this hits zero, delete
Font Specification
Usage: short GetFontFlags()const
Get the flags associated with this font. This returns the 'bold', 'italic' and 'underline' settings
Usage: void XGFont::GetFontName(char*f)const
Get the name of this font
Usage: short GetFontSize(void)const
Returns the current size of this font in points.
Usage: XGFont*XGFont::GetFontVariant(XGFont*f,short newflags)
This allows me to get a font which is exactly like the font I have on hand, but with the 'underline', 'italic', or 'bold' attributes different. This also sets the 'attach' flag
Usage: XGFont*XGFont::LoadFont(short resID)
Load the font from a resource
Usage: void XGFont::SetFontFlags(short f)
Set the font flags. This <<only>> works if there is only one attached object; the assumption is that this is not in use or shared with someone else
Usage: void XGFont::SetFontName(const char*f)
Set the font name. This <<only>> works if there is only one attached object; the assumption is that this is not in use or shared with someone else
Usage: void XGFont::SetFontSize(short f)
Set the font size. This <<only>> works if there is only one attached object; the assumption is that this is not in use or shared with someone else