12#ifndef _PDF_FONT_DATA_TRUETYPE_H_
13#define _PDF_FONT_DATA_TRUETYPE_H_
16#include <wx/strconv.h>
19#include <wx/xml/xml.h>
47 virtual double GetStringWidth(
const wxString& s,
const wxPdfEncoding* encoding = NULL,
bool withKerning =
false,
double charSpacing = 0)
const;
66 wxPdfSortedArrayInt* usedGlyphs = NULL,
67 wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
76 virtual wxString
GetWidthsAsString(
bool subset =
false, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
92 virtual size_t WriteFontData(wxOutputStream* fontData, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL);
99 virtual wxMBConv* GetEncodingConv()
const {
return m_conv; }
102 virtual void CreateDefaultEncodingConv();
113class WXDLLIMPEXP_PDFDOC wxPdfFontDataTrueTypeUnicode :
public wxPdfFontData
117 wxPdfFontDataTrueTypeUnicode();
120 virtual ~wxPdfFontDataTrueTypeUnicode();
132 virtual bool HasVoltData()
const {
return m_volt != NULL; }
150 bool withKerning =
false,
double charSpacing = 0)
const;
169 wxPdfSortedArrayInt* usedGlyphs = NULL,
170 wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
181 wxPdfSortedArrayInt* usedGlyphs = NULL,
182 wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
191 virtual wxString
GetWidthsAsString(
bool subset, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
207 virtual size_t WriteFontData(wxOutputStream* fontData, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL);
219 wxPdfSortedArrayInt* usedGlyphs = NULL,
220 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
232 wxPdfSortedArrayInt* usedGlyphs = NULL,
233 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
243 virtual size_t WriteCIDSet(wxOutputStream* setData,
245 wxPdfSortedArrayInt* usedGlyphs = NULL,
246 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
252 virtual wxMBConv* GetEncodingConv()
const {
return m_conv; }
255 virtual void CreateDefaultEncodingConv();
264 wxPdfArrayUint16* m_gw;
Class representing a font encoding.
Definition: pdfencoding.h:25
Class representing TrueType fonts. (For internal use only)
Definition: pdffontdatatruetype.h:31
wxMBConv * m_conv
Associated encoding converter.
Definition: pdffontdatatruetype.h:106
Base class for all fonts. (For internal use only)
Definition: pdffontdata.h:55
virtual bool HasVoltData() const
Check whether VOLT data are available.
Definition: pdffontdata.h:537
virtual size_t WriteCIDSet(wxOutputStream *setData, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
Write CID set.
Definition: pdffontdata.cpp:748
virtual size_t WriteUnicodeMap(wxOutputStream *mapData, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
Write character/glyph to unicode mapping.
Definition: pdffontdata.cpp:726
virtual wxString GetWidthsAsString(bool subset=false, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
Get the character width array as string.
Definition: pdffontdata.cpp:691
virtual wxString ConvertGlyph(wxUint32 glyph, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
Convert glyph number to string.
Definition: pdffontdata.cpp:834
virtual bool Initialize()
Initialize font data.
Definition: pdffontdata.cpp:679
virtual size_t WriteFontData(wxOutputStream *fontData, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
Write font data.
Definition: pdffontdata.cpp:717
virtual double GetStringWidth(const wxString &s, const wxPdfEncoding *encoding=NULL, bool withKerning=false, double charSpacing=0) const
Get the width of a string.
Definition: pdffontdata.cpp:700
virtual size_t WriteCIDToGIDMap(wxOutputStream *mapData, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL)
Write CID to GID mapping.
Definition: pdffontdata.cpp:737
virtual void SetGlyphWidths(const wxPdfArrayUint16 &glyphWidths)
Set the glyph widths.
Definition: pdffontdata.cpp:860
virtual bool CanShow(const wxString &s, const wxPdfEncoding *encoding=NULL) const
Check whether the font can show all characters of a given string.
Definition: pdffontdata.cpp:778
virtual wxString ApplyVoltData(const wxString &s) const
Apply VOLT data.
Definition: pdffontdata.h:544
virtual wxString ConvertCID2GID(const wxString &s, const wxPdfEncoding *encoding=NULL, wxPdfSortedArrayInt *usedGlyphs=NULL, wxPdfChar2GlyphMap *subsetGlyphs=NULL) const
Convert character codes to glyph numbers.
Definition: pdffontdata.cpp:821
virtual bool LoadFontMetrics(wxXmlNode *root)
Load the font metrics XML file.
Definition: pdffontdata.cpp:771
Class representing the Adobe core fonts. (For internal use only)
Definition: pdffontvolt.h:28
Definition of array types.
Compile time switches for the wxPdfDocument component.