Class FontCollection
Defined in File font-collection.h
Class Documentation
-
class FontCollection
Immutable font bytes and ordered scalable Unicode faces.
CPU-only loading resolves preferred names from application assets before installed fonts, snapshots the selected bytes, then appends an embedded DejaVu Sans fallback. Missing names and files are skipped; an unreadable/unsupported explicit file fails the whole load. No provider is used.
Public Functions
-
std::span<const ::CE::Text::FontFaceInfo> faces() const noexcept
Declaration:
[[nodiscard]]Borrow ordered metadata; empty after move.
Keep retained collection data alive while using the view. No discovery or loading occurs.
-
bool covers(char32_t scalar) const
Declaration:
[[nodiscard]]Test character-map coverage across retained faces.
Surrogates/out-of-range values return false; a moved-from collection or face-opening failure may reject valid queries. No whole-grapheme selection or shaping is performed.
Public Static Functions
-
static FontCollection load(const ::CE::Text::FontSelection &selection = {})
Declaration:
[[nodiscard]]Load an owned immutable CPU snapshot, ending in embedded DejaVu Sans.
Missing names/files and unusable discovery candidates are skipped; invalid names and unreadable/unsupported explicit files reject the load. Allocation failures propagate. No provider/graphics context is used.
See also
- Parameters:
selection – Ordered names/sources and discovery roots, borrowed for this call.
- Returns:
Shared immutable ordered faces; copies retain the same bytes.
-
std::span<const ::CE::Text::FontFaceInfo> faces() const noexcept