libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::Font Class Reference

A resource representing a loaded font file (e.g. TTF). More...

#include <Font.h>

Inheritance diagram for Ship::Font:
[legend]
Collaboration diagram for Ship::Font:
[legend]

Public Member Functions

 Font ()
 Constructs an empty Font resource.
 
virtual ~Font ()
 Destructor.
 
void * GetPointer () override
 Returns a pointer to the raw font data.
 
size_t GetPointerSize () override
 Returns the size of the raw font data in bytes.
 
- Public Member Functions inherited from Ship::Resource< void >
void * GetRawPointer () override
 Returns a type-erased raw pointer to the underlying resource data.
 
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
- Public Member Functions inherited from Ship::IResource
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
virtual ~IResource ()
 
bool IsDirty ()
 Returns true if the resource has been marked dirty.
 
void Dirty ()
 Marks the resource as dirty.
 
std::shared_ptr< ResourceInitDataGetInitData ()
 Returns the initialization data used to load this resource.
 

Public Attributes

char * Data = nullptr
 Raw font file data.
 
size_t DataSize
 Size of the font data buffer in bytes.
 

Additional Inherited Members

- Static Public Attributes inherited from Ship::IResource
static const std::string gAltAssetPrefix = "alt/"
 Path prefix that identifies an "alt asset" override.
 

Detailed Description

A resource representing a loaded font file (e.g. TTF).

Font wraps raw font data loaded from an archive so that it can be registered with ImGui or another text rendering system.

Constructor & Destructor Documentation

◆ Font()

Ship::Font::Font ( )

Constructs an empty Font resource.

◆ ~Font()

virtual Ship::Font::~Font ( )
virtual

Destructor.

Member Function Documentation

◆ GetPointer()

void * Ship::Font::GetPointer ( )
overridevirtual

Returns a pointer to the raw font data.

Returns
Pointer to the font byte buffer.

Implements Ship::Resource< void >.

◆ GetPointerSize()

size_t Ship::Font::GetPointerSize ( )
overridevirtual

Returns the size of the raw font data in bytes.

Returns
Size of the font data buffer.

Implements Ship::IResource.

Member Data Documentation

◆ Data

char* Ship::Font::Data = nullptr

Raw font file data.

◆ DataSize

size_t Ship::Font::DataSize

Size of the font data buffer in bytes.


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