Collaboration diagram for CEGUI::Font:
Public Member Functions | |
size_t | drawText (const String &text, const Rect &draw_area, float z, const Rect &clip_rect, TextFormatting fmt, const ColourRect &colours, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display. | |
size_t | drawText (const String &text, const Rect &draw_area, float z, const Rect &clip_rect, TextFormatting fmt, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display using default colours. | |
void | drawText (const String &text, const Rect &draw_area, float z, const Rect &clip_rect, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display with default colours and default formatting (LeftAligned). | |
size_t | drawText (const String &text, const Rect &draw_area, float z, TextFormatting fmt, const ColourRect &colours, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display. | |
size_t | drawText (const String &text, const Rect &draw_area, float z, TextFormatting fmt, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display with default colours. | |
void | drawText (const String &text, const Rect &draw_area, float z, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text into a specified area of the display with default colours and default formatting (LeftAligned). | |
void | drawText (const String &text, const Vector3 &position, const Rect &clip_rect, const ColourRect &colours, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text at the specified location. | |
void | drawText (const String &text, const Vector3 &position, const Rect &clip_rect, float x_scale=1.0f, float y_scale=1.0f) const |
Draw text at the specified location with default colours. | |
void | defineFontGlyphs (const String &glyph_set) |
Define the set of code points to be renderable by the font. | |
void | defineFontGlyphs (utf32 first_code_point, utf32 last_code_point) |
Define the range of code points to be renderable by the font. | |
void | setNativeResolution (const Size &size) |
Set the native resolution for this Font. | |
void | notifyScreenResolution (const Size &size) |
Notify the Font of the current (usually new) display resolution. | |
void | setAutoScalingEnabled (bool setting) |
Enable or disable auto-scaling for this Font. | |
void | setAntiAliased (bool setting) |
Set whether the font is anti-aliased or not. Only relevant for dynamic fonts, this setting is ignored for bitmapped fonts. | |
float | getTextExtent (const String &text, float x_scale=1.0f) const |
Return the pixel width of the specified text if rendered with this Font. | |
float | getLineSpacing (float y_scale=1.0f) const |
Return the pixel line spacing value for. | |
float | getFontHeight (float y_scale=1.0f) const |
return the exact pixel height of the font. | |
float | getBaseline (float y_scale=1.0f) const |
Return the number of pixels from the top of the highest glyph to the baseline. | |
size_t | getCharAtPixel (const String &text, float pixel, float x_scale=1.0f) const |
Return the index of the closest text character in String text that corresponds to pixel location pixel if the text were rendered. | |
size_t | getCharAtPixel (const String &text, size_t start_char, float pixel, float x_scale=1.0f) const |
Return the index of the closest text character in String text, starting at character index start_char, that corresponds to pixel location pixel if the text were to be rendered. | |
const String & | getName (void) const |
Return the name of this font. | |
Size | getNativeResolution (void) const |
Return the native display size for this Font. This is only relevant if the Font is being auto-scaled. | |
bool | isAutoScaled (void) const |
Return whether this Font is auto-scaled. | |
bool | isCodepointAvailable (utf32 cp) const |
Return whether this Font can currently draw the specified code-point. | |
size_t | getFormattedLineCount (const String &text, const Rect &format_area, TextFormatting fmt, float x_scale=1.0f) const |
Return the number of lines the given text would be formatted to. | |
float | getFormattedTextExtent (const String &text, const Rect &format_area, TextFormatting fmt, float x_scale=1.0f) const |
Return the horizontal pixel extent given text would be formatted to. | |
bool | isAntiAliased (void) const |
Return whether this font is anti-aliased or not. This is only relevant for dynamic fonts created from a TrueType font file. | |
const String & | getAvailableGlyphs (void) const |
Return a String object that contains the code-points that the font is currently configured to render. | |
uint | getPointSize (void) const |
Return the point size of a dynamic (ttf based) font. | |
~Font (void) | |
Destroys a Font object. | |
Static Public Attributes | |
static const argb_t | DefaultColour = 0xFFFFFFFF |
Colour value used whenever a colour is not specified. | |
Friends | |
class | Font_xmlHandler |
class | FontManager |
Classes | |
struct | FontImplData |
struct | glyphDat |
struct to hold extra details about a glyph (required for proper rendering) |
A Font object is created for each unique typeface required. The Font class provides methods for loading typefaces from various sources, and then for outputting text via the Renderer object.
|
Define the range of code points to be renderable by the font.
|
|
Define the set of code points to be renderable by the font.
|
|
Draw text at the specified location with default colours.
|
|
Draw text at the specified location.
|
|
Draw text into a specified area of the display with default colours and default formatting (LeftAligned).
|
|
Draw text into a specified area of the display with default colours.
|
|
Draw text into a specified area of the display.
|
|
Draw text into a specified area of the display with default colours and default formatting (LeftAligned).
|
|
Draw text into a specified area of the display using default colours.
|
|
Draw text into a specified area of the display.
|
|
Return a String object that contains the code-points that the font is currently configured to render.
|
|
Return the number of pixels from the top of the highest glyph to the baseline.
|
|
Return the index of the closest text character in String text, starting at character index start_char, that corresponds to pixel location pixel if the text were to be rendered.
|
|
Return the index of the closest text character in String text that corresponds to pixel location pixel if the text were rendered.
|
|
return the exact pixel height of the font.
|
|
Return the number of lines the given text would be formatted to. Since text formatting can result in multiple lines of text being output, it can be useful to know how many lines would be output without actually rendering the text.
|
|
Return the horizontal pixel extent given text would be formatted to. The value return by this method is basically the extent of the widest line within the formatted text.
|
|
Return the pixel line spacing value for.
|
|
Return the name of this font.
|
|
Return the native display size for this Font. This is only relevant if the Font is being auto-scaled.
|
|
Return the point size of a dynamic (ttf based) font.
|
|
Return the pixel width of the specified text if rendered with this Font.
|
|
Return whether this font is anti-aliased or not. This is only relevant for dynamic fonts created from a TrueType font file.
|
|
Return whether this Font is auto-scaled.
|
|
Return whether this Font can currently draw the specified code-point.
|
|
Notify the Font of the current (usually new) display resolution.
|
|
Set whether the font is anti-aliased or not. Only relevant for dynamic fonts, this setting is ignored for bitmapped fonts.
|
|
Enable or disable auto-scaling for this Font.
|
|
Set the native resolution for this Font.
|