SolidKit3D.Drawing.Font class

From Solid Graphics Wiki

Jump to: navigation, search
SolidKit3D.Drawing.Font class
Namespace: SolidKit3D.Drawing
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET

The Font class provides capability to print texture-based text into an OpenGL window. The font object can print texts using 256 characters glyphs only, the characters codepage must be specified when the font is loaded to memory.


Constructors

The Font class constructors create texture font based on provided System.Drawing.Font object.

Fields

Field name Type Description
IsLoaded bool Returns true if font texture is loaded into the font object, otherwise returns false.
Height int Font characters height in pixels.
CodePage int Font's codepage.
FontSource System.Drawing.Font System.Drawing.Font object which is a source of loaded font.
FontTexture SolidKit3D.Drawing.Texture SolidKit3D.Drawing.Texture object which contains texture of the font characters.
CharSizes float[] Horizontal sizes of the font characters.

Methods

Method name Description
Load Loads the font from a file, memory, application-attached-resource or an image class object.
Clear Release all font object related resources (such as texture) from the memory or OpenGL rendering context. When this method finishes the font is considered "unloaded".
DrawText Draws text into an OpenGL window to specified location using specified text color.
PrepareTextDrawing Prepares font object for drawing text in prepared mode.
PreparedDrawText Draws text. The font must be set to prepared mode using PrepareTextDrawing method before PreparedDrawText can be used. Setting font to prepared mode and then call PreparedDrawText multiple times gives better performance then calling DrawText method multiple times.
FinishTextDrawing Ends font's prepared mode. Every call to FinishTextDrawing method must be matched to prior call to the PrepareTextDrawing method.
MeasureText Measures text size.

Operators

The class has no public operators defined.

See Also

   


SolidKit Library Documentation

Personal tools