87 std::vector<std::unique_ptr<TrueTypeTable>>
m_tables;
147 sal_uInt16 unitsPerEm,
150 sal_uInt16 lowestRecPPEM,
151 sal_Int16 fontDirectionHint);
168 sal_Int16 caretSlopeRise,
169 sal_Int16 caretSlopeRun);
233 std::vector<std::unique_ptr<GlyphData>>
m_list;
249 void cmapAdd(sal_uInt32
id, sal_uInt32 c, sal_uInt32 g);
278 sal_Int32 italicAngle,
279 sal_Int16 underlinePosition,
280 sal_Int16 underlineThickness,
281 sal_uInt32 isFixedPitch);
sal_uInt32 m_tag
TrueType file tag.
TrueTypeTable * FindTable(sal_uInt32 tag)
TrueTypeCreator(sal_uInt32 tag)
TrueTypeCreator constructor.
void RemoveTable(sal_uInt32 tag)
Removes a TrueType table from the TrueType creator if it is stored there.
~TrueTypeCreator()
TrueTypeCreator destructor.
SFErrCodes StreamToMemory(std::vector< sal_uInt8 > &rOutBuffer)
Writes a TrueType font generated by the TrueTypeCreator to a segment of memory that this method alloc...
void AddTable(std::unique_ptr< TrueTypeTable > table)
Adds a TrueType table to the TrueType creator.
std::vector< std::unique_ptr< TrueTypeTable > > m_tables
List of table tags and pointers.
Creates a new empty 'cmap' table.
void cmapAdd(sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
Add a character/glyph pair to a cmap table.
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
virtual ~TrueTypeTableCmap() override
std::unique_ptr< table_cmap > m_cmap
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
std::unique_ptr< sal_uInt8[]> m_ptr
TrueTypeTableGeneric(sal_uInt32 tag, sal_uInt32 nbytes, const sal_uInt8 *ptr)
Creates a new raw TrueType table.
virtual ~TrueTypeTableGeneric() override
Creates a new empty 'glyf' table.
sal_uInt32 glyfAdd(std::unique_ptr< GlyphData > glyphdata, AbstractTrueTypeFont *fnt)
Add a glyph to a glyf table.
std::vector< std::unique_ptr< GlyphData > > m_list
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
virtual ~TrueTypeTableGlyf() override
sal_uInt32 glyfCount()
Query the number of glyphs currently stored in the 'glyf' table.
Creates a new 'head' table for a TrueType font.
std::unique_ptr< sal_uInt8[]> m_head
TrueTypeTableHead(sal_uInt32 fontRevision, sal_uInt16 flags, sal_uInt16 unitsPerEm, const sal_uInt8 *created, sal_uInt16 macStyle, sal_uInt16 lowestRecPPEM, sal_Int16 fontDirectionHint)
virtual ~TrueTypeTableHead() override
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
Creates a new 'hhea' table for a TrueType font.
TrueTypeTableHhea(sal_Int16 ascender, sal_Int16 descender, sal_Int16 linegap, sal_Int16 caretSlopeRise, sal_Int16 caretSlopeRun)
virtual ~TrueTypeTableHhea() override
std::unique_ptr< sal_uInt8[]> m_hhea
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
Creates a new empty 'loca' table for a TrueType font.
virtual ~TrueTypeTableLoca() override
std::unique_ptr< tdata_loca > m_loca
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
Creates a new 'maxp' table based on an existing maxp table.
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
virtual ~TrueTypeTableMaxp() override
TrueTypeTableMaxp(const sal_uInt8 *maxp, int size)
std::unique_ptr< sal_uInt8[]> m_maxp
Creates a new 'name' table.
TrueTypeTableName(std::vector< NameRecord > nr)
virtual ~TrueTypeTableName() override
std::vector< NameRecord > m_list
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
Creates a new 'post' table of one of the supported formats.
sal_Int16 m_underlineThickness
virtual int GetRawData(TableEntry *) override
This function converts the data of a TrueType table to a raw array of bytes.
TrueTypeTablePost(sal_Int32 format, sal_Int32 italicAngle, sal_Int16 underlinePosition, sal_Int16 underlineThickness, sal_uInt32 isFixedPitch)
sal_uInt32 m_isFixedPitch
virtual ~TrueTypeTablePost() override
sal_Int16 m_underlinePosition
virtual int GetRawData(TableEntry *)=0
This function converts the data of a TrueType table to a raw array of bytes.
std::unique_ptr< sal_uInt8[]> m_rawdata
TrueTypeTable(sal_uInt32 tag_)
SFErrCodes
Return value of OpenTTFont() and CreateT3FromTTGlyphs()
TTCRErrCodes
Error codes for most functions.
@ TTCR_UNKNOWN
Unknown TrueType table
@ TTCR_POSTFORMAT
unsupported format of a 'post' table
@ TTCR_ZEROGLYPHS
At least one glyph should be defined
@ TTCR_NONAMES
'name' table does not contain any names
@ TTCR_NAMETOOLONG
'name' table is too long (string data > 64K)