LibreOffice Module vcl (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
vcl::TrueTypeCreator Class Reference

#include <ttcr.hxx>

Public Member Functions

 TrueTypeCreator (sal_uInt32 tag)
 TrueTypeCreator constructor. More...
 
 ~TrueTypeCreator ()
 TrueTypeCreator destructor. More...
 
void AddTable (std::unique_ptr< TrueTypeTable > table)
 Adds a TrueType table to the TrueType creator. More...
 
void RemoveTable (sal_uInt32 tag)
 Removes a TrueType table from the TrueType creator if it is stored there. More...
 
SFErrCodes StreamToMemory (std::vector< sal_uInt8 > &rOutBuffer)
 Writes a TrueType font generated by the TrueTypeCreator to a segment of memory that this method allocates. More...
 

Private Member Functions

TrueTypeTableFindTable (sal_uInt32 tag)
 
void ProcessTables ()
 

Private Attributes

sal_uInt32 m_tag
 TrueType file tag. More...
 
std::vector< std::unique_ptr< TrueTypeTable > > m_tables
 List of table tags and pointers. More...
 

Detailed Description

Definition at line 54 of file ttcr.hxx.

Constructor & Destructor Documentation

◆ TrueTypeCreator()

vcl::TrueTypeCreator::TrueTypeCreator ( sal_uInt32  tag)

TrueTypeCreator constructor.

Allocates all internal structures.

Definition at line 126 of file ttcr.cxx.

References m_tag.

◆ ~TrueTypeCreator()

vcl::TrueTypeCreator::~TrueTypeCreator ( )

TrueTypeCreator destructor.

It calls destructors for all TrueTypeTables added to it.

Definition at line 1090 of file ttcr.cxx.

Member Function Documentation

◆ AddTable()

void vcl::TrueTypeCreator::AddTable ( std::unique_ptr< TrueTypeTable table)

Adds a TrueType table to the TrueType creator.

Definition at line 131 of file ttcr.cxx.

References m_tables, and table.

Referenced by vcl::CreateT42FromTTGlyphs(), vcl::CreateTTFromTTGlyphs(), and ProcessTables().

◆ FindTable()

TrueTypeTable * vcl::TrueTypeCreator::FindTable ( sal_uInt32  tag)
private

Definition at line 846 of file ttcr.cxx.

References m_tables, and p.

Referenced by ProcessTables().

◆ ProcessTables()

void vcl::TrueTypeCreator::ProcessTables ( )
private

◆ RemoveTable()

void vcl::TrueTypeCreator::RemoveTable ( sal_uInt32  tag)

Removes a TrueType table from the TrueType creator if it is stored there.

It also calls a TrueTypeTable destructor. Note: all generic tables (with tag 0) will be removed if this function is called with the second argument of 0.

Returns
value of SFErrCodes type

Definition at line 138 of file ttcr.cxx.

References m_tables.

Referenced by ProcessTables().

◆ StreamToMemory()

SFErrCodes vcl::TrueTypeCreator::StreamToMemory ( std::vector< sal_uInt8 > &  rOutBuffer)

Writes a TrueType font generated by the TrueTypeCreator to a segment of memory that this method allocates.

When it is not needed anymore the caller is supposed to call free() on it.

Returns
value of SFErrCodes type

Definition at line 151 of file ttcr.cxx.

References vcl::CheckSum(), i, length, m_tables, m_tag, vcl::Ok, p, ProcessTables(), vcl::PutUInt16(), vcl::PutUInt32(), vcl::T_head, vcl::TableEntryCompareF(), and vcl::TtFormat.

Referenced by vcl::CreateT42FromTTGlyphs(), and vcl::CreateTTFromTTGlyphs().

Member Data Documentation

◆ m_tables

std::vector<std::unique_ptr<TrueTypeTable> > vcl::TrueTypeCreator::m_tables
private

List of table tags and pointers.

Definition at line 87 of file ttcr.hxx.

Referenced by AddTable(), FindTable(), RemoveTable(), and StreamToMemory().

◆ m_tag

sal_uInt32 vcl::TrueTypeCreator::m_tag
private

TrueType file tag.

Definition at line 86 of file ttcr.hxx.

Referenced by StreamToMemory(), and TrueTypeCreator().


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