Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::FontFile Class Referenceabstract

#include <Ultralight/platform/FontLoader.h>

Details

Represents a font file, either on-disk path or in-memory file contents.

Inheritance diagram for ultralight::FontFile:
ultralight::RefCounted

Static Public Member Functions

static RefPtr< FontFileCreate (const String &filepath)
 Create a font file from an on-disk file path.
 
static RefPtr< FontFileCreate (RefPtr< Buffer > buffer)
 Create a font file from an in-memory buffer.
 

Public Member Functions

virtual bool is_in_memory () const =0
 Whether or not this font file was created from an in-memory buffer.
 
virtual String filepath () const =0
 The file path (if any).
 
virtual RefPtr< Bufferbuffer () const =0
 The in-memory buffer (if any).
 
virtual uint32_t hash () const =0
 Unique hash (if this is a filepath, only the path string is hashed).
 
- Public Member Functions inherited from ultralight::RefCounted
virtual void AddRef () const =0
 
virtual void Release () const =0
 
virtual int ref_count () const =0
 

Protected Member Functions

 FontFile ()
 
virtual ~FontFile ()
 
 FontFile (const FontFile &)
 
void operator= (const FontFile &)
 
- Protected Member Functions inherited from ultralight::RefCounted
virtual ~RefCounted ()
 

Constructor & Destructor Documentation

◆ FontFile() [1/2]

ultralight::FontFile::FontFile ( )
protected

◆ ~FontFile()

virtual ultralight::FontFile::~FontFile ( )
protectedvirtual

◆ FontFile() [2/2]

ultralight::FontFile::FontFile ( const FontFile )
protected

Member Function Documentation

◆ buffer()

virtual RefPtr< Buffer > ultralight::FontFile::buffer ( ) const
pure virtual

The in-memory buffer (if any).

◆ Create() [1/2]

static RefPtr< FontFile > ultralight::FontFile::Create ( const String filepath)
static

Create a font file from an on-disk file path.

Note
The file path should already exist.

◆ Create() [2/2]

static RefPtr< FontFile > ultralight::FontFile::Create ( RefPtr< Buffer buffer)
static

Create a font file from an in-memory buffer.

◆ filepath()

virtual String ultralight::FontFile::filepath ( ) const
pure virtual

The file path (if any).

◆ hash()

virtual uint32_t ultralight::FontFile::hash ( ) const
pure virtual

Unique hash (if this is a filepath, only the path string is hashed).

◆ is_in_memory()

virtual bool ultralight::FontFile::is_in_memory ( ) const
pure virtual

Whether or not this font file was created from an in-memory buffer.

◆ operator=()

void ultralight::FontFile::operator= ( const FontFile )
protected

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