3#include "freetype/freetype.h"
4#include "freetype/ftglyph.h"
5#include "unordered_dense.h"
47 return codepoint >= 0x10000;
57 uint32_t h = ((v >> 10) & 0x03FF) | 0xD800;
104 font& operator=(
font const&) =
delete;
143 o.font_face =
nullptr;
145 o.hb_font_face =
nullptr;
159 o.font_face =
nullptr;
161 o.hb_font_face =
nullptr;
178 ankerl::unordered_dense::map<uint16_t, dcon::text_key>
font_names;
182 std::vector<font> font_array;
183 dcon::locale_id current_locale;
189 return current_locale;
void change_locale(sys::state &state, dcon::locale_id l)
std::vector< uint8_t > compiled_ubrk_rules
dcon::locale_id get_current_locale() const
void load_font(font &fnt, char const *file_data, uint32_t file_size)
float line_height(sys::state &state, uint16_t font_id)
ankerl::unordered_dense::map< uint16_t, bm_font > bitmap_fonts
float text_extent(sys::state &state, stored_glyphs const &txt, uint32_t starting_offset, uint32_t count, uint16_t font_id)
font & get_font(sys::state &state, font_selection s=font_selection::body_font)
ankerl::unordered_dense::map< uint16_t, dcon::text_key > font_names
void set_classic_fonts(bool v)
float top_adjustment(int32_t size) const
float descender(int32_t size) const
float line_height(int32_t size) const
std::array< FT_ULong, 256 > win1252_codepoints
float text_extent(sys::state &state, stored_glyphs const &txt, uint32_t starting_offset, uint32_t count, int32_t size)
ankerl::unordered_dense::map< char32_t, glyph_sub_offset > glyph_positions
font & operator=(font &&o) noexcept
float ascender(int32_t size) const
std::unique_ptr< FT_Byte[]> file_data
void remake_cache(sys::state &state, font_selection type, stored_glyphs &txt, std::string const &source)
void remake_bidiless_cache(sys::state &state, font_selection type, stored_glyphs &txt, std::span< uint16_t > source)
float base_glyph_width(char32_t ch_in)
void make_glyph(char32_t ch_in)
bool can_display(char32_t ch_in) const
float internal_line_height
std::vector< uint32_t > textures
constexpr int magnification_factor
std::string_view classic_unligate_utf8(text::font &font, char32_t c)
int32_t size_from_font_id(uint16_t id)
constexpr uint32_t max_texture_layers
bool is_black_from_font_id(uint16_t id)
surrogate_pair make_surrogate_pair(uint32_t val) noexcept
uint16_t name_into_font_id(sys::state &state, std::string_view txt)
bool requires_surrogate_pair(uint32_t codepoint)
font_selection font_index_from_font_id(sys::state &state, uint16_t id)
stored_glyph() noexcept=default
stored_glyphs(stored_glyphs const &other) noexcept=default
std::vector< stored_glyph > glyph_info
void set_text(sys::state &state, font_selection type, std::string const &s)
stored_glyphs(stored_glyphs &&other) noexcept=default