LibreOffice Module vcl (master) 1
|
#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 | |
TrueTypeTable * | FindTable (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... | |
vcl::TrueTypeCreator::TrueTypeCreator | ( | sal_uInt32 | tag | ) |
TrueTypeCreator constructor.
Allocates all internal structures.
Definition at line 126 of file ttcr.cxx.
References m_tag.
vcl::TrueTypeCreator::~TrueTypeCreator | ( | ) |
TrueTypeCreator destructor.
It calls destructors for all TrueTypeTables added to it.
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().
|
private |
|
private |
Definition at line 871 of file ttcr.cxx.
References AddTable(), vcl::ARG_1_AND_2_ARE_WORDS, FindTable(), vcl::GetInt16(), vcl::GetUInt16(), vcl::HEAD_indexToLocFormat_offset, vcl::HEAD_xMax_offset, vcl::HEAD_xMin_offset, vcl::HEAD_yMax_offset, vcl::HEAD_yMin_offset, i, index, vcl::TrueTypeTableHead::m_head, vcl::TrueTypeTableHhea::m_hhea, vcl::TrueTypeTableGlyf::m_list, vcl::TrueTypeTableMaxp::m_maxp, vcl::TrueTypeTable::m_rawdata, vcl::MAXP_maxCompositeContours_offset, vcl::MAXP_maxCompositePoints_offset, vcl::MAXP_maxContours_offset, vcl::MAXP_maxPoints_offset, vcl::MAXP_numGlyphs_offset, vcl::MORE_COMPONENTS, vcl::PutInt16(), vcl::PutUInt16(), vcl::PutUInt32(), RemoveTable(), SAL_WARN, vcl::T_glyf, vcl::T_head, vcl::T_hhea, vcl::T_hmtx, vcl::T_loca, vcl::T_maxp, vcl::ttmalloc(), vcl::WE_HAVE_A_SCALE, vcl::WE_HAVE_A_TWO_BY_TWO, vcl::WE_HAVE_AN_X_AND_Y_SCALE, and z.
Referenced by StreamToMemory().
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.
Definition at line 138 of file ttcr.cxx.
References m_tables.
Referenced by ProcessTables().
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.
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().
|
private |
List of table tags and pointers.
Definition at line 87 of file ttcr.hxx.
Referenced by AddTable(), FindTable(), RemoveTable(), and StreamToMemory().
|
private |
TrueType file tag.
Definition at line 86 of file ttcr.hxx.
Referenced by StreamToMemory(), and TrueTypeCreator().