MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Text::FontFace Class Reference

Owns a single FT_Face loaded from a file path. More...

#include <FontFace.hpp>

+ Collaboration diagram for MayaFlux::Portal::Text::FontFace:

Public Member Functions

 FontFace ()=default
 
 FontFace (const FontFace &)=delete
 
 FontFace (FontFace &&)=delete
 
FT_Face get_face () const
 Raw FT_Face handle for use by GlyphAtlas.
 
bool is_loaded () const
 Returns true after a successful load() call.
 
bool load (const std::string &path, FT_Long index=0)
 Load a font file from disk.
 
FontFaceoperator= (const FontFace &)=delete
 
FontFaceoperator= (FontFace &&)=delete
 
const std::string & path () const
 Path passed to load(), empty if not yet loaded.
 
void unload ()
 Release the FT_Face handle.
 
 ~FontFace ()
 

Private Attributes

FT_Face m_face { nullptr }
 
std::string m_path
 

Detailed Description

Owns a single FT_Face loaded from a file path.

A FontFace is the source from which GlyphAtlas instances at specific pixel sizes are constructed. One FontFace may serve any number of atlases; the FT_Face handle is shared by reference and must not be used concurrently from multiple threads without external locking.

The face index parameter handles font collections (.ttc, .otc); pass 0 for single-face files.

FontFace does not call FT_Set_Pixel_Sizes – that is GlyphAtlas's responsibility immediately before each rasterization call, ensuring the face is configured for the atlas's declared size.

Definition at line 26 of file FontFace.hpp.


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