Unravel Engine C++ Reference
Loading...
Searching...
No Matches
gfx::true_type_font Class Reference

Public Member Functions

auto init (const uint8_t *buffer, uint32_t buffer_size, int32_t font_index, uint32_t pixel_height, int16_t width_padding, int16_t height_padding) -> bool
 
auto get_font_info () const -> font_info
 return the font descriptor of the current font
 
auto bake_glyph_alpha (code_point codepoint, glyph_info &out_info, uint8_t *out_buffer) -> bool
 
auto bake_glyph_distance (code_point codepoint, glyph_info &out_info, uint8_t *out_buffer) -> bool
 
auto bake_glyph_distance_fast (code_point codepoint, glyph_info &out_info, uint8_t *out_buffer) -> bool
 
auto bake_glyph_distance_stb (code_point codepoint, glyph_info &out_info, uint8_t *out_buffer) -> bool
 

Friends

class font_manager
 

Detailed Description

Definition at line 65 of file font_manager.cpp.

Member Function Documentation

◆ bake_glyph_alpha()

auto gfx::true_type_font::bake_glyph_alpha ( code_point codepoint,
glyph_info & out_info,
uint8_t * out_buffer ) -> bool

raster a glyph as 8bit alpha to a memory buffer update the GlyphInfo according to the raster strategy @ remark buffer min size: glyphInfo.m_width * glyphInfo * height * sizeof(char)

Definition at line 192 of file font_manager.cpp.

◆ bake_glyph_distance()

auto gfx::true_type_font::bake_glyph_distance ( code_point codepoint,
glyph_info & out_info,
uint8_t * out_buffer ) -> bool

raster a glyph as 8bit signed distance to a memory buffer update the GlyphInfo according to the raster strategy @ remark buffer min size: glyphInfo.m_width * glyphInfo * height * sizeof(char)

Definition at line 227 of file font_manager.cpp.

◆ bake_glyph_distance_fast()

auto gfx::true_type_font::bake_glyph_distance_fast ( code_point codepoint,
glyph_info & out_info,
uint8_t * out_buffer ) -> bool

Definition at line 237 of file font_manager.cpp.

◆ bake_glyph_distance_stb()

auto gfx::true_type_font::bake_glyph_distance_stb ( code_point codepoint,
glyph_info & out_info,
uint8_t * out_buffer ) -> bool

Definition at line 322 of file font_manager.cpp.

◆ get_font_info()

auto gfx::true_type_font::get_font_info ( ) const -> font_info

return the font descriptor of the current font

Definition at line 142 of file font_manager.cpp.

◆ init()

auto gfx::true_type_font::init ( const uint8_t * buffer,
uint32_t buffer_size,
int32_t font_index,
uint32_t pixel_height,
int16_t width_padding,
int16_t height_padding ) -> bool

Initialize from an external buffer

Remarks
The ownership of the buffer is external, and you must ensure it stays valid up to this object lifetime
Returns
true if the initialization succeed

Definition at line 108 of file font_manager.cpp.

Friends And Related Symbol Documentation

◆ font_manager

friend class font_manager
friend

Definition at line 94 of file font_manager.cpp.


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