Loading...
Searching...
No Matches
FontFileabstract

#include <Ultralight/platform/FontLoader.h>

Overview

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

Inheritance diagram for FontFile:
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 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 RefCounted
virtual ~RefCounted ()
 

Constructor & Destructor Documentation

◆ FontFile() [1/2]

FontFile ( )
protected

◆ ~FontFile()

virtual ~FontFile ( )
protectedvirtual

◆ FontFile() [2/2]

FontFile ( const FontFile & )
protected

Member Function Documentation

◆ buffer()

virtual RefPtr< Buffer > buffer ( ) const
pure virtual

The in-memory buffer (if any).

◆ Create() [1/2]

static RefPtr< 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 > Create ( RefPtr< Buffer > buffer)
static

Create a font file from an in-memory buffer.

◆ filepath()

virtual String filepath ( ) const
pure virtual

The file path (if any).

◆ hash()

virtual uint32_t hash ( ) const
pure virtual

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

◆ is_in_memory()

virtual bool is_in_memory ( ) const
pure virtual

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

◆ operator=()

void operator= ( const FontFile & )
protected

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