Struct BitmapFont

Inheritance Relationships

Base Types

Struct Documentation

struct BitmapFont : public CE::Text::Legacy::Font, public CE::State::Singleton<BitmapFont>

Declaration: final

Deprecated legacy bitmap font with native-short widths and a separate whitefont.png atlas.

Recovered inputs remain usable by this binary loader; prefer CE::Text::Legacy::AsciiFont to bake metrics and an atlas from a supplied font file.

Deprecated:

Use CE::Text::Legacy::AsciiFont with a system or bundled font file.

Public Functions

inline explicit BitmapFont(const BitmapFontData &data)

Copy the width table and retain geometry/atlas.

Configure the singleton once with initialize(load_ffont(…)) before readers start; get() only retrieves the published instance.

~BitmapFont() override = default

Release this legacy font’s logical resource handles; retained draw packets keep their own handles.

virtual std::vector<GlyphPlacement> layout(std::string_view text, LayoutOptions options = LayoutOptions{}) const override

Declaration: [[nodiscard]]

Interpret bytes as printable ASCII, replacing other bytes with ?

. Newline resets X and moves Y by -1/128; CR is ignored. Widths are divided by 128. alternate_bank adds128 to glyph indices; spaces advance without draws. This deprecated path does not decode UTF-8 or shape text; allocation failures propagate.

Public Static Functions

static BitmapFontData load_ffont(const std::filesystem::path &path, CE::Rendering::Resources::Provider &provider)

Read256 native shorts before uploading geometry.

Incomplete reads fail; trailing bytes are ignored. Requires whitefont.png already present in the image manager. Metadata/endian semantics remain unverified. Uses the provider loading owner/current context; file/provider/allocation failures propagate and partial native resources retire normally.