50 virtual uint32_t
hash()
const = 0;
111 bool italic)
const = 0;
#define UExport
Definition Exports.h:25
Represents a font file, either on-disk path or in-memory file contents.
Definition FontLoader.h:18
FontFile(const FontFile &)
static RefPtr< FontFile > Create(RefPtr< Buffer > buffer)
Create a font file from an in-memory buffer.
static RefPtr< FontFile > Create(const String &filepath)
Create a font file from an on-disk file path.
virtual RefPtr< Buffer > buffer() 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).
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).
void operator=(const FontFile &)
User-defined font loader interface.
Definition FontLoader.h:86
virtual String fallback_font_for_characters(const String &characters, int weight, bool italic) const =0
Fallback font family name that can render the specified characters.
virtual RefPtr< FontFile > Load(const String &family, int weight, bool italic)=0
Get the actual font file data (TTF/OTF) for a given font description.
virtual String fallback_font() const =0
Fallback font family name.
Interface for all ref-counted objects that will be managed using the RefPtr<> smart pointer.
Definition RefPtr.h:47
A nullable smart pointer.
Definition RefPtr.h:79
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:34