Defines functions for different font implementations. More...
#include <kanzi/core.ui/font/kzu_font_base.h>
Public Attributes | |
kzsError(* | loadfromKZB )(struct KzuFont *font, struct KzcInputStream *inputStream, const struct KzuBinaryFileInfo *file) |
Loads font from .KZB. More... | |
kzsError(* | setSize )(struct KzuFont *font, kzFloat size) |
Sets the size of the font (in pixels). More... | |
kzsError(* | getSize )(struct KzuFont *font, kzFloat *out_size) |
Returns the size of the font. More... | |
kzsError(* | setColor )(struct KzuFont *font, kanzi::ColorRGBA color) |
Sets the color of the font. More... | |
kzsError(* | getColor )(struct KzuFont *font, kanzi::ColorRGBA &out_color) |
Gets the color of the font. More... | |
kzsError(* | getLineHeight )(struct KzuFont *font, kzFloat *out_lineHeight) |
Returns the line height of the font. More... | |
kzsError(* | getAscender )(struct KzuFont *font, kzFloat *out_ascender) |
Returns the ascender of the font. More... | |
kzsError(* | getDescender )(struct KzuFont *font, kzFloat *out_descender) |
Returns the descender of the font. More... | |
kzsError(* | getGlyphIndex )(struct KzuFont *font, kzUnicodeChar character, kzUint *out_glyphIndex) |
Returns the glyph index in the font for the given unicode code point. More... | |
kzsError(* | getCharacterMetrics )(struct KzuFont *font, kzUint glyphIndex, kzFloat *out_advance, struct KzcRectangle *out_boundingBox) |
Returns the advance of given character using. More... | |
kzsError(* | getKerning )(struct KzuFont *font, kzUint previousGlyphIndex, kzUint glyphIndex, kzFloat *out_kerning) |
Returns the kerning of given character pair using. More... | |
kzsError(* | loadCharacterGlyph )(struct KzuFont *font, kzUint glyphIndex, kzUint *out_width, kzUint *out_height, const kanzi::byte **out_bitmapData, void **out_characterGlyph) |
Loads a bitmap data for a single character glyph. More... | |
kzsError(* | releaseCharacterGlyph )(struct KzuFont *font, void *characterGlyph) |
Releases a loaded character glyph. More... | |
kzsError(* | prepareTextLayout )(struct KzuTextLayout *textLayout, kanzi::Renderer *renderer) |
Prepares the given pre-layouted text for fast rendering. More... | |
kzsError(* | drawTextLayout )(struct KzuTextLayout *textLayout, kanzi::Renderer *renderer, kzFloat x, kzFloat y) |
Draw the given pre-layouted text. More... | |
kzsError(* | drawTextLayout3D )(struct KzuTextLayout *textLayout, kanzi::Renderer *renderer) |
Draw the given pre-layouted text in 3D space. More... | |
kzsError(* | freeTextLayoutData )(struct KzuTextLayout *textLayout) |
Frees the data and resources created by the prepare function. More... | |
Static Public Attributes | |
static const kanzi::ColorRGBA | DefaultFontColor |
Defines functions for different font implementations.
|
static |
kzsError(* KzuFontClass::loadfromKZB) (struct KzuFont *font, struct KzcInputStream *inputStream, const struct KzuBinaryFileInfo *file) |
Loads font from .KZB.
Sets the size of the font (in pixels).
Returns the size of the font.
kzsError(* KzuFontClass::setColor) (struct KzuFont *font, kanzi::ColorRGBA color) |
Sets the color of the font.
kzsError(* KzuFontClass::getColor) (struct KzuFont *font, kanzi::ColorRGBA &out_color) |
Gets the color of the font.
Returns the line height of the font.
Returns the ascender of the font.
Returns the descender of the font.
kzsError(* KzuFontClass::getGlyphIndex) (struct KzuFont *font, kzUnicodeChar character, kzUint *out_glyphIndex) |
Returns the glyph index in the font for the given unicode code point.
kzsError(* KzuFontClass::getCharacterMetrics) (struct KzuFont *font, kzUint glyphIndex, kzFloat *out_advance, struct KzcRectangle *out_boundingBox) |
Returns the advance of given character using.
kzsError(* KzuFontClass::getKerning) (struct KzuFont *font, kzUint previousGlyphIndex, kzUint glyphIndex, kzFloat *out_kerning) |
Returns the kerning of given character pair using.
kzsError(* KzuFontClass::loadCharacterGlyph) (struct KzuFont *font, kzUint glyphIndex, kzUint *out_width, kzUint *out_height, const kanzi::byte **out_bitmapData, void **out_characterGlyph) |
Loads a bitmap data for a single character glyph.
Releases a loaded character glyph.
kzsError(* KzuFontClass::prepareTextLayout) (struct KzuTextLayout *textLayout, kanzi::Renderer *renderer) |
Prepares the given pre-layouted text for fast rendering.
kzsError(* KzuFontClass::drawTextLayout) (struct KzuTextLayout *textLayout, kanzi::Renderer *renderer, kzFloat x, kzFloat y) |
Draw the given pre-layouted text.
kzsError(* KzuFontClass::drawTextLayout3D) (struct KzuTextLayout *textLayout, kanzi::Renderer *renderer) |
Draw the given pre-layouted text in 3D space.
kzsError(* KzuFontClass::freeTextLayoutData) (struct KzuTextLayout *textLayout) |
Frees the data and resources created by the prepare function.