12#ifndef _PDF_FONT_PARSER_TRUETYPE_H_
13#define _PDF_FONT_PARSER_TRUETYPE_H_
16#include <wx/hashmap.h>
17#include <wx/mstream.h>
73 wxPdfFontData* IdentifyFont(
const wxString& fontFileName,
int fontIndex);
75#if defined(__WXMSW__) || defined(__WXMAC__)
90 wxPdfFontData* IdentifyFont(
const char* fontBuffer,
size_t fontBufferSize);
106 int GetCollectionFontCount(
const wxString& fontFileName);
114 static wxMemoryInputStream* LoadTrueTypeFontStream(
const wxFont& font);
119 void ClearTableDirectory();
122 void LockTable(
const wxString& tableName);
128 int CalculateChecksum(
const char* b,
size_t length);
143 void CheckRestrictions();
150 wxString GetBaseFont();
158 wxArrayString GetUniqueNames(
int id);
170 wxArrayString GetNames(
int id,
bool namesOnly =
true);
177 wxString GetEnglishName(
int id);
194 bool ReadGlyphWidths(
int numberOfHMetrics,
int unitsPerEm);
197 void ReadKerning(
int unitsPerEm);
200 bool ReadTableDirectory();
203 wxPdfCMap* ReadFormat0();
206 wxPdfCMap* ReadFormat4();
209 wxPdfCMap* ReadFormat6();
212 wxPdfCMap* ReadFormat12();
215 int GetGlyphWidth(
unsigned int glyph);
221#if defined(__WXMAC__)
222#if wxPDFMACOSX_HAS_CORE_TEXT
224 wxCFRef<CFDataRef> m_tableRef;
234 bool m_subsetAllowed;
239 wxPdfArrayUint16 m_glyphWidths;
243 wxPdfCMap* m_cmapExt;
244 wxPdfKernPairMap* m_kp;
246 wxInputStream* m_savedStream;
Class representing a CMap table entry.
Definition: pdffontparsertruetype.h:46
int m_glyph
glyph number
Definition: pdffontparsertruetype.h:50
wxPdfCMapEntry()
Default constructor.
Definition: pdffontparsertruetype.h:49
int m_width
glyph width
Definition: pdffontparsertruetype.h:51
Base class for all fonts. (For internal use only)
Definition: pdffontdata.h:55
Class representing a font description.
Definition: pdffontdescription.h:24
Class representing a TrueType/OpenType font parser.
Definition: pdffontparsertruetype.h:59
bool m_isMacCoreText
Flag whether a Mac Core Text font is to be parsed.
Definition: pdffontparsertruetype.h:220
wxPdfTableDirectory * m_tableDirectory
table directory of the font
Definition: pdffontparsertruetype.h:218
size_t m_directoryOffset
offset of the table directory
Definition: pdffontparsertruetype.h:217
Class representing font parsers.
Definition: pdffontparser.h:25
Class representing a table directory entry for TrueType fonts (for internal use only)
Definition: pdffontparsertruetype.h:32
wxPdfTableDirectoryEntry()
Default constructor.
Definition: pdffontparsertruetype.h:35
int m_offset
Table offset.
Definition: pdffontparsertruetype.h:37
int m_checksum
Table checksum.
Definition: pdffontparsertruetype.h:36
int m_length
Table length.
Definition: pdffontparsertruetype.h:38
Compile time switches for the wxPdfDocument component.
Interface of the wxPdfFontDescription class.
Definition of Mac OS X specific font data handling.
Interface of the TrueType/OpenType font parsing support classes.
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPdfTableDirectoryEntry *, wxPdfTableDirectory, class WXDLLIMPEXP_PDFDOC)
Hash map class for used/embedded fonts.
WX_DECLARE_HASH_MAP_WITH_DECL(long, wxPdfCMapEntry *, wxIntegerHash, wxIntegerEqual, wxPdfCMap, class WXDLLIMPEXP_PDFDOC)
Hash map class for used/embedded fonts.