TDW file

TDW

struct Tdw

Stores bitmap font character widths for an included TIM image.

Public Functions

Tdw() = default

Default constructor.

inline explicit Tdw([[maybe_unused]] std::span<const char> buffer)

Constructs a Tdw object from a buffer.

Parameters:

buffer – The input buffer containing Tdw data.

inline auto operator[](size_t i) const

Accesses the character width at the specified index.

Parameters:

i – The index of the character width.

Returns:

The character width at the specified index.

inline auto size() const

Returns the number of character widths stored.

Returns:

The number of character widths.

inline const Tim &tim() const

Accesses the TIM image.

Returns:

A const reference to the TIM image.

template<class ...Ts>
inline void save(Ts&&... ts)

Saves the TIM image.

Template Parameters:

Ts – Parameter pack for the arguments to be forwarded.

Parameters:

ts – Arguments to be forwarded to the save function of the TIM image.

inline Uint8Range<std::vector<Bit4Values>> widths() const noexcept

Accesses the vector of character widths.

Returns:

A const reference to the vector of character widths.