Project Alice
Loading...
Searching...
No Matches
text::font_manager Class Reference

#include <fonts.hpp>

Public Member Functions

 font_manager ()
 
 ~font_manager ()
 
dcon::locale_id get_current_locale () const
 
void change_locale (sys::state &state, dcon::locale_id l)
 
fontget_font (sys::state &state, font_selection s=font_selection::body_font)
 
void load_font (font &fnt, char const *file_data, uint32_t file_size)
 
float line_height (sys::state &state, uint16_t font_id)
 
float text_extent (sys::state &state, stored_glyphs const &txt, uint32_t starting_offset, uint32_t count, uint16_t font_id)
 
void set_classic_fonts (bool v)
 

Public Attributes

ankerl::unordered_dense::map< uint16_t, dcon::text_key > font_names
 
ankerl::unordered_dense::map< uint16_t, bm_fontbitmap_fonts
 
FT_Library ft_library
 
std::vector< uint8_tcompiled_ubrk_rules
 
bool map_font_is_black = false
 

Detailed Description

Definition at line 173 of file fonts.hpp.

Constructor & Destructor Documentation

◆ font_manager()

text::font_manager::font_manager ( )

Definition at line 158 of file fonts.cpp.

◆ ~font_manager()

text::font_manager::~font_manager ( )

Definition at line 161 of file fonts.cpp.

Member Function Documentation

◆ change_locale()

void text::font_manager::change_locale ( sys::state state,
dcon::locale_id  l 
)

Definition at line 281 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_current_locale()

dcon::locale_id text::font_manager::get_current_locale ( ) const
inline

Definition at line 188 of file fonts.hpp.

◆ get_font()

font & text::font_manager::get_font ( sys::state state,
font_selection  s = font_selection::body_font 
)

Definition at line 423 of file fonts.cpp.

Here is the caller graph for this function:

◆ line_height()

float text::font_manager::line_height ( sys::state state,
uint16_t  font_id 
)

Definition at line 151 of file fonts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_font()

void text::font_manager::load_font ( font fnt,
char const *  file_data,
uint32_t  file_size 
)

Definition at line 438 of file fonts.cpp.

Here is the caller graph for this function:

◆ set_classic_fonts()

void text::font_manager::set_classic_fonts ( bool  v)

Definition at line 885 of file fonts.cpp.

◆ text_extent()

float text::font_manager::text_extent ( sys::state state,
stored_glyphs const &  txt,
uint32_t  starting_offset,
uint32_t  count,
uint16_t  font_id 
)

Definition at line 138 of file fonts.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ bitmap_fonts

ankerl::unordered_dense::map<uint16_t, bm_font> text::font_manager::bitmap_fonts

Definition at line 179 of file fonts.hpp.

◆ compiled_ubrk_rules

std::vector<uint8_t> text::font_manager::compiled_ubrk_rules

Definition at line 185 of file fonts.hpp.

◆ font_names

ankerl::unordered_dense::map<uint16_t, dcon::text_key> text::font_manager::font_names

Definition at line 178 of file fonts.hpp.

◆ ft_library

FT_Library text::font_manager::ft_library

Definition at line 180 of file fonts.hpp.

◆ map_font_is_black

bool text::font_manager::map_font_is_black = false

Definition at line 186 of file fonts.hpp.


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