Struct Font
Defined in File font.h
Inheritance Relationships
Base Type
protected CE::Assets::Content2D(Struct Content2D)
Derived Types
public CE::Text::Legacy::AsciiFont(Struct AsciiFont)public CE::Text::Legacy::BitmapFont(Struct BitmapFont)
Struct Documentation
-
struct Font : protected CE::Assets::Content2D
Retains glyph geometry/atlas; direct base construction does not validate them.
Immutable implementations support CPU layout without a graphics context.
Subclassed by CE::Text::Legacy::AsciiFont, CE::Text::Legacy::BitmapFont
Public Functions
Retain supplied geometry, atlas and optional material without validating resources.
Implementations determine metrics/encoding; callers must preserve the resource backend domain for native use.
-
virtual ~Font()
Release logical resource ownership; final native retirement follows the original backend rules.
-
virtual std::vector<GlyphPlacement> layout(std::string_view text, LayoutOptions options = LayoutOptions{}) const = 0
Declaration:
[[nodiscard]]Return owned placements without retaining the input bytes or requiring graphics calls.
Encoding, metrics and supported options belong to the concrete implementation; the interface promises no shaping.
- Parameters:
text – Borrowed only for this call.
options – Legacy bank selection, where supported.
-
inline const std::shared_ptr<CE::Rendering::Geometry::Buffer2D> &glyph_geometry_handle() const
Declaration:
[[nodiscard]]Borrow the retained geometry handle.
Copy it to retain ownership beyond this font; native use still requires the original live backend.