CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::TTypefaceData Class Reference

#include <cartotype_graphics_context.h>

Public Member Functions

 TTypefaceData (const MString &aName)
 
 TTypefaceData (const char *aName)
 
 TTypefaceData (const uint8_t *aData, size_t aLength, bool aCopyData)
 
bool InMemory () const
 
const MStringName () const
 
void GetData (const uint8_t *&aData, size_t &aLength) const
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TTypefaceData() [1/3]

CartoType::TTypefaceData::TTypefaceData ( const MString aName)
inlineexplicit

Creates a typeface data object representing a filename.

◆ TTypefaceData() [2/3]

CartoType::TTypefaceData::TTypefaceData ( const char *  aName)
inlineexplicit

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

◆ TTypefaceData() [3/3]

CartoType::TTypefaceData::TTypefaceData ( 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

◆ GetData()

void CartoType::TTypefaceData::GetData ( const uint8_t *&  aData,
size_t &  aLength 
) const
inline

Gets a pointer to the in-memory data and its length in bytes.

◆ InMemory()

bool CartoType::TTypefaceData::InMemory ( ) const
inline

Returns true if the data is in memory.

◆ Name()

const MString & CartoType::TTypefaceData::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: