CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoTypeCore::TypefaceData Class Reference

#include <cartotype_graphics_context.h>

Public Member Functions

 TypefaceData (const MString &aName)
 
 TypefaceData (const char *aName)
 
 TypefaceData (const uint8_t *aData, size_t aLength, bool aCopyData)
 
bool InMemory () const
 
const MStringName () const
 
const uint8_t * Data () const
 
size_t DataLength () const
 

Detailed Description

The data for a typeface is either a filename or a pointer to memory.

Constructor & Destructor Documentation

◆ TypefaceData() [1/3]

CartoTypeCore::TypefaceData::TypefaceData ( const MString aName)
inlineexplicit

Creates a typeface data object representing a filename.

◆ TypefaceData() [2/3]

CartoTypeCore::TypefaceData::TypefaceData ( const char *  aName)
inlineexplicit

Creates a typeface data object representing a filename in UTF-8.

◆ TypefaceData() [3/3]

CartoTypeCore::TypefaceData::TypefaceData ( const uint8_t *  aData,
size_t  aLength,
bool  aCopyData 
)
inline

Creates a typeface data object for data in memory. If aCopyData is true the data is copied, otherwise only the pointer is stored.

Member Function Documentation

◆ Data()

const uint8_t * CartoTypeCore::TypefaceData::Data ( ) const
inline

Returns a pointer to the in-memory data.

◆ DataLength()

size_t CartoTypeCore::TypefaceData::DataLength ( ) const
inline

Returns the length of the in-memory data in bytes.

◆ InMemory()

bool CartoTypeCore::TypefaceData::InMemory ( ) const
inline

Returns true if the data is in memory.

◆ Name()

const MString & CartoTypeCore::TypefaceData::Name ( ) const
inline

Returns the name of the file, if the data is in a file.


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