KzuFontClass Struct Reference

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
 

Detailed Description

Defines functions for different font implementations.

Member Data Documentation

const kanzi::ColorRGBA KzuFontClass::DefaultFontColor
static
kzsError(* KzuFontClass::loadfromKZB) (struct KzuFont *font, struct KzcInputStream *inputStream, const struct KzuBinaryFileInfo *file)

Loads font from .KZB.

kzsError(* KzuFontClass::setSize) (struct KzuFont *font, kzFloat size)

Sets the size of the font (in pixels).

kzsError(* KzuFontClass::getSize) (struct KzuFont *font, kzFloat *out_size)

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.

kzsError(* KzuFontClass::getLineHeight) (struct KzuFont *font, kzFloat *out_lineHeight)

Returns the line height of the font.

kzsError(* KzuFontClass::getAscender) (struct KzuFont *font, kzFloat *out_ascender)

Returns the ascender of the font.

kzsError(* KzuFontClass::getDescender) (struct KzuFont *font, kzFloat *out_descender)

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.

kzsError(* KzuFontClass::releaseCharacterGlyph) (struct KzuFont *font, void *characterGlyph)

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.


The documentation for this struct was generated from the following file: