12#ifndef _PDF_FONT_DATA_OPENTYPE_H_
13#define _PDF_FONT_DATA_OPENTYPE_H_
19#include <wx/strconv.h>
22#include <wx/xml/xml.h>
31class WXDLLIMPEXP_PDFDOC wxPdfFontDataOpenTypeUnicode :
public wxPdfFontData
35 wxPdfFontDataOpenTypeUnicode();
38 virtual ~wxPdfFontDataOpenTypeUnicode();
54 virtual double GetStringWidth(
const wxString& s,
const wxPdfEncoding* encoding = NULL,
bool withKerning =
false,
double charSpacing = 0)
const;
73 wxPdfSortedArrayInt* usedGlyphs = NULL,
74 wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
85 wxPdfSortedArrayInt* usedGlyphs = NULL,
86 wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
95 virtual wxString
GetWidthsAsString(
bool subset, wxPdfSortedArrayInt* usedGlyphs = NULL, wxPdfChar2GlyphMap* subsetGlyphs = NULL)
const;
112 wxPdfSortedArrayInt* usedGlyphs = NULL,
113 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
125 wxPdfSortedArrayInt* usedGlyphs = NULL,
126 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
136 virtual size_t WriteCIDSet(wxOutputStream* setData,
138 wxPdfSortedArrayInt* usedGlyphs = NULL,
139 wxPdfChar2GlyphMap* subsetGlyphs = NULL);
145 virtual wxMBConv* GetEncodingConv()
const {
return m_conv; }
148 virtual void CreateDefaultEncodingConv();
154 void SetCffOffset(
size_t cffOffset) { m_cffOffset = cffOffset; }
160 void SetCffLength(
size_t cffLength) { m_cffLength = cffLength; }
169 wxPdfArrayUint16* m_gw;
Class representing a font encoding.
Definition: pdfencoding.h:25
Base class for all fonts. (For internal use only)
Definition: pdffontdata.h:55
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 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 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
Definition of array types.
Compile time switches for the wxPdfDocument component.