33#include <NDEVR/Model.h>
34#include <NDEVR/Geometry.h>
35#include <NDEVR/Font.h>
36#include <NDEVR/Pointer.h>
48 FT_LibraryRec_* m_ftLibrary;
54 FreeTypeFace(
const FreeTypeLibrary &library,
const Font& font);
55 FreeTypeFace(FreeTypeFace&& face);
57 FreeTypeFace& operator=(FreeTypeFace&& face)
noexcept;
58 FT_FaceRec_* m_ftFace;
64 TextConstructor(
const String& app_font,
bool cache_font_geometry =
true);
65 TextConstructor(
const Font& font,
bool cache_font_geometry =
true);
66 Geometry getCharMesh(Model& parent, wchar symbol);
67 void ensureCharExists(wchar symbol);
69 Vector<2, fltp08> symbolAdvance(wchar symbol)
const;
70 Vector<2, fltp08> symbolAdvance(wchar symbol_a, wchar symbol_b)
const;
71 Vector<2, fltp08> fontSize()
const;
72 void setFont(Font font,
bool cache_font_geometry =
true);
73 const Font& currentFont()
const {
return m_current_font; }
74 bool canConstructGeometry()
const;
76 static DynamicPointer< TextConstructor> DefaultConstructor(Font font);
78 void LoadGlyph(wchar symbol)
const;
79 bool OutlineExists()
const;
80 void ExtractOutline();
81 void ComputeViewBox();
83 static int MoveToFunction(
const FT_Vector_ *to,
void *user);
84 static int LineToFunction(
const FT_Vector_ *to,
void *user);
85 static int ConicToFunction(
const FT_Vector_ *control,
const FT_Vector_ *to,
void *user);
86 static int CubicToFunction(
const FT_Vector_ *controlOne,
const FT_Vector_ *controlTwo,
const FT_Vector_ *to,
void *user);
87 Geometry currentMesh();
90 UUID textUUID(wchar symbol)
const;
94 FreeTypeLibrary m_library;
97 DynamicPointer<Model> m_font_model;
98 mutable Dictionary<UUID, Vector<2, fltp08>> m_symbol_advance;
99 mutable Dictionary<UUID, Dictionary<UUID, uint04>> m_model_copy;
100 Dictionary<UUID, Geometry> m_geometry;
101 wchar m_current_char;
102 Vector<2, fltp08> m_last_point;
wchar_t wchar
Definition BaseValues.hpp:184
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181