ADi-FontEngine  1.0
PDF Optimized FontEngine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FontEngine.h
Go to the documentation of this file.
1 // FontEngine/FontEngine.h
2 //
3 // Copyright 2012 - Andreas Dippe
4 //
5 // This file is part of ADi-FontEngine, 2012
6 //-----------------------------------------------------------------------------
7 
8 #ifndef _FONTENGINE_H_
9 #define _FONTENGINE_H_
10 
16 
17 #include <map>
18 
19 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
21 namespace PostScript
22 {
23  class PSDocument;
24 } // namespace PostScript
25 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
27 namespace FontEngine
28 {
29 
30  // forwarding
31  class CFFFont;
32  class T1Font;
33  class TTFont;
34  //-----------------------------------------------------------------------------
35  //-----------------------------------------------------------------------------
36  //
37  //-----------------------------------------------------------------------------
38  /*! Parameter map to define some working directories to get font encoding resources<br>
39  "etc" - must show to library "../etc" path<br>
40  "cmapres" - must show to cmap resource folder library will normaly expect "../etc/Encoding"<br>
41  "usecmap" - must show to cmap folder in which the usecmap resides
42  */
43  typedef std::map<std::string, FontEngine::TPath> TPathParamMap;
44  //-----------------------------------------------------------------------------
45  //-----------------------------------------------------------------------------
46  //! PostScript CMaps files will be used to define encodings or tounicode mappings
47  //-----------------------------------------------------------------------------
49  {
50  public:
54  //-----------------------------------------------------------------------------
55  public:
56  //! ctor with parameter map
57  TPSCMap( const TPathParamMap & ppm)
58  : _pathParamMap( ppm)
59  , _psdoc( NULL)
60  {}
61  //-----------------------------------------------------------------------------
62  //! copy ctor
63  TPSCMap( const TPSCMap & font);
64  //-----------------------------------------------------------------------------
65  //! assignment operator
66  TPSCMap & operator=( const TPSCMap & font);
67  //-----------------------------------------------------------------------------
68  //! dtor
69  ~TPSCMap();
70  //-----------------------------------------------------------------------------
71  /*! \brief set new parameter map
72  \param ppm the new parameter map, see description at TPathParamMap
73  */
74  void initPathParameter( const TPathParamMap & ppm)
75  {
76  _pathParamMap = ppm;
77  }
78  //-----------------------------------------------------------------------------
79  /*! \brief open a PostScript CMap from file
80  \param fname the complete file path, parsing will begin at front of the file
81  \return an error code or PostScript::eNoError
82  */
83  PostScript::EErrorCodes open( const TPath & fname);
84  //-----------------------------------------------------------------------------
85  /*! \brief open a PostScript CMap from istream
86  \param cmapstream should be an open istream, parsing will begin at current read position
87  \return an error code or PostScript::eNoError
88  */
89  PostScript::EErrorCodes open( std::istream & cmapstream);
90  //-----------------------------------------------------------------------------
91  /*! \brief get number of PostScript CMaps inside the open stream or file
92  \return number of CMaps
93  */
94  unsigned int getCMapSize() const;
95  //-----------------------------------------------------------------------------
96  /*! \brief get PostScript CMap data see TFontCodeMap
97  \param idx index to different CMaps must be lesser than getCMapSize() return
98  \return the CMap data
99  */
100  const TFontCodeMap & getCMapCode( unsigned int idx) const;
101  //-----------------------------------------------------------------------------
102  /*! \brief return the CMap dictionary data, like /WMode or /CMapName
103  \return the CMap dictionary
104  */
105  TCMapDict getCMapDict() const;
106  //-----------------------------------------------------------------------------
107  /*! \brief function return true if a known error was found in CMap PostScript code
108  \return true if error occur
109  */
110  bool containKnownPostScriptBug() const;
111  //-----------------------------------------------------------------------------
112  private:
113  TPathParamMap _pathParamMap;
114  PostScript::PSDocument* _psdoc;
115  };
116  //-----------------------------------------------------------------------------
117  //-----------------------------------------------------------------------------
118  /*! \class TFont
119  \brief The primary font class with short sample to open font and get glyph information:
120  \include ADiFEFontDemo.cpp
121  */
122  //-----------------------------------------------------------------------------
124  {
125  friend struct TFontThreadData;
126  //-----------------------------------------------------------------------------
127  public:
128  //! \brief possible font types
129  enum EFType
130  {
131  eftUnknown //!< no font file or unknown font format
132  , eftCFF //!< cff font (such fonts don't exists as single file, but will be used in pdf files)
133  , eftType1 //!< PostScript Type1 font
134  , eftTrueType //!< TrueType font
135  , eftOpenTypeCFF //!< OpenType font with 'cff ' table
136  , eftTTMacSFNT //!< TrueType font encapsulated in Mac Resource 'sfnt' wrapper
137  , eftOTMacSFNTCFF //!< OpenType font with 'cff ' table encapsulated in Mac Resource 'sfnt' wrapper (never seen such files!)
138  , eftTTCollection //!< TrueType fonts collection
139  , eftOTCollectionCFF //!< OpenType font collection with 'cff ' table (never seen such files!)
140  };
141  //-----------------------------------------------------------------------------
142  //! \brief parameter flags to control glyph dump svg
144  {
145  esfNoBkgd = 0x0001 //!< paint no background (scale paper and origin lines)
146  , esfNoBBox = 0x0002 //!< paint no bounding box and width gray area
147  , esfNoFill = 0x0004 //!< don't fill the glyph with blue
148  , esfNoStroke = 0x0008 //!< don't stroke the glyph outline with black
149  , esfNoPoints = 0x0010 //!< paint no line and curve points
150  , esfNoCross = 0x0020 //!< paint no red hair cross on given cursor pos
151  , esfFitToGlyph = 0x0040 //!< max scale glyph to visible area
152  , esfHStem = 0x0080 //!< paint horizontal stem hints if available
153  , esfVStem = 0x0100 //!< paint vertical stem hints if available
154  , esfHStemCross = 0x0200 //!< the cross parameter is a horz stem hint
155  , esfVStemCross = 0x0400 //!< the cross parameter is a vert stem hint
156  , esfPtTooltip = 0x0800 //!< show a tooltip on each point
157  };
158  typedef unsigned int TSVGFlags; // any combination of ESVGFlags
159  //-----------------------------------------------------------------------------
161  typedef std::pair< TPath, EFType > TFontPath;
162  typedef std::vector< TFontPath > TFontPathVec;
163  typedef unsigned int TGID; //!< glyph id, can be used only in CFF and TrueType fonts
164  //-----------------------------------------------------------------------------
165  public:
166  /*! \brief default ctor
167  \param ppm parameter map, see description at TPathParamMap
168  */
169  TFont( const TPathParamMap & ppm)
170  : _pathParamMap( ppm)
171  , _fonttype( eftUnknown)
172  , _fsize( 0)
173  , _curidx( 0)
174  , _cff( NULL)
175  , _t1( NULL)
176  , _tt( NULL)
177  {}
178  //-----------------------------------------------------------------------------
179  /*! \brief ctor to create a new font
180  \param fontname the font name
181  \param fd ordinary font traits comparable with PDF FontDescriptor
182  \param efp must contain glyph information and output format
183  */
184  TFont( const std::string & fontname, const TFontDictionary & fd, TEmbFontParameter & efp);
185  //-----------------------------------------------------------------------------
186  /*! \brief copy ctor
187  \param font to copy from
188  */
189  TFont( const TFont & font);
190  //-----------------------------------------------------------------------------
191  /*! \brief assignment operator
192  \param font to copy from
193  */
194  TFont & operator=( const TFont & font);
195  //-----------------------------------------------------------------------------
196  /*! \brief dtor
197  */
198  ~TFont();
199  //-----------------------------------------------------------------------------
200  /*! \brief set new parameter map
201  \param ppm the new parameter map, see description at TPathParamMap
202  */
203  void initPathParameter( const TPathParamMap & ppm)
204  {
205  _pathParamMap = ppm;
206  }
207  //-----------------------------------------------------------------------------
208  /*! \brief return true if font engine can identify the given file as font
209  \param fname the font file path to check
210  \return the font type determined by font engine
211  */
212  static EFType isFont( const TPath & fname);
213  //-----------------------------------------------------------------------------
214  /*! \brief open a font file from file path
215  \param fname the font file path to check
216  \param findex the font index if file is a font collection or cid font
217  \param favorit you should get a primary type if you know to open the file quicker
218  \return the font type determined by font engine
219  */
220  EFType open( const TPath & fname, unsigned int findex, EFType favorit = eftUnknown); // favorit can be eftType1, eftCFF or eftTrueType
221  //-----------------------------------------------------------------------------
222  /*! \brief open a font from pdf stream, this can be only one font, i.e. no font collection
223  \param fontstream a font stream used by an pdf file in 'FontFile', 'FontFile2' or 'FontFile3'. the stream must be decoded.
224  \param favorit you should get a primary type if you know to open the file quicker
225  \return the font type determined by font engine
226  */
227  EFType openPDFstream( std::istream & fontstream, EFType favorit); // favorit can be eftType1, eftCFF or eftTrueType
228  //-----------------------------------------------------------------------------
229  /*! \brief open a TrueType or OpenType font from seperate font data buffern
230  \param headBlock a 'head' data block is required and must be not empty
231  \param cmapBlock a 'cmap' data block is required and must be not empty
232  \param glyfBlock a 'glyf' data block is required and must be not empty except if cff_Block is not empty
233  \param hheaBlock a 'hhea' data block is required and must be not empty
234  \param hmtxBlock a 'hmtx' data block is required and must be not empty
235  \param locaBlock a 'loca' data block is required and must be not empty
236  \param maxpBlock a 'maxp' data block is required and must be not empty
237  \param cff_Block a 'cff_' data block is optional and can be empty
238  \param os_2Block a 'os_2' data block is optional and can be empty
239  \param postBlock a 'post' data block is optional and can be empty
240  \param nameBlock a 'name' data block is optional and can be empty
241  \return the font type determined by font engine
242  */
243  EFType openOTBlocks( const TBlock & headBlock, const TBlock & cmapBlock, const TBlock & glyfBlock, const TBlock & hheaBlock,
244  const TBlock & hmtxBlock, const TBlock & locaBlock, const TBlock & maxpBlock,
245  // following 4 can be empty, glyfBlock can be empty if cff_Block is not empty
246  const TBlock & cff_Block, const TBlock & os_2Block, const TBlock & postBlock, const TBlock & nameBlock);
247  //-----------------------------------------------------------------------------
248  /*! \brief make a font dump, all data will be appear in dumparam._dumptext, see TDumpParam
249  \param dumparam the parameter to set how the dump should be performed, see TDumpParam
250  */
251  void getFontDump( TDumpParam & dumparam) const;
252  //-----------------------------------------------------------------------------
253  /*! \brief render a glyph into a ostream in svg format
254  \param svgFile an ostream that will recive the svg code
255  \param gout the glyph outline data, to get call getGCurves(..)
256  \param orghtmlsize the width and heigth of the output svg, can be used to put it into a gui control e.g.
257  \param cursor a cursor pos to draw a hair cross or stem hints, see enum ESVGFlags
258  \param flags a bitmask flag to set output appearance, see enum ESVGFlags
259  */
260  void glyphSVG( std::ostream & svgFile, const TGOutline & gout, const TFPoint & orghtmlsize, const TFPoint & cursor, TSVGFlags flags) const;
261  //-----------------------------------------------------------------------------
262  /*! \brief make a subset from this font, if the font is a PostScript Type font it wil be converted into a CFF font
263  \param efp the subset parameter, see TEmbFontParameter
264  */
265  void subset( TEmbFontParameter & efp);
266  //-----------------------------------------------------------------------------
267  /*! \brief set the font name and family name in this font, if the font is a PostScript Type font it wil be converted into a CFF font
268  \param fontname the new font name, can be required if a font was subseted
269  \param fontfamily the new font family name, can be empty to not change the family name
270  */
271  void setFontName( const std::string & fontname, const std::string & fontfamily);
272  //-----------------------------------------------------------------------------
273  /*! \brief append a new glyph at the end of glyph table, not possible if the font is a PostScript Type font
274  \param efd the glyph data, see TEmbFontData
275  \param as_cid must be true if the font is a cid font
276  \return the new glyph gid
277  */
278  TGID appendGlyph( const TEmbFontData & efd, bool as_cid);
279  //-----------------------------------------------------------------------------
280  /*! \brief get writable state
281  \return true if the font is writable
282  */
283  bool isWriteable() const;
284  //-----------------------------------------------------------------------------
285  /*! \brief write the complete font into a ostream, if the font is a PostScript Type font it wil be converted into a CFF font
286  */
287  void write( std::ostream & fontstream);
288  //-----------------------------------------------------------------------------
289  /*! \brief set the current font index, use this function to select a cid font into an OpenType cid font
290  \param curidx the new font index
291  */
292  void setCurrentFontIndex( unsigned int curidx)
293  {
294  FontEngine_Assert( eftOpenTypeCFF == _fonttype);
295  _curidx = curidx;
296  }
297  //-----------------------------------------------------------------------------
298  /*! \brief get open font state
299  \return return true if a PostScript Type1 font is currently open
300  */
301  bool hasT1Font() const
302  {
303  return (NULL != _t1);
304  }
305  //-----------------------------------------------------------------------------
306  /*! \brief get open font state
307  \return return true if cff font is currently open
308  */
309  bool hasCFFFont() const
310  {
311  return (NULL != _cff);
312  }
313  //-----------------------------------------------------------------------------
314  /*! \brief get open font state
315  \return return true if a TrueType font is currently open
316  */
317  bool hasTTFont() const
318  {
319  return (NULL != _tt);
320  }
321  //-----------------------------------------------------------------------------
322  /*! \brief get open font state
323  \return return type from font is currently open
324  */
326  {
327  return _fonttype;
328  }
329  //-----------------------------------------------------------------------------
330  /*! \brief get number of different fonts in one file. TrueType collections, PostScript Type1 and OpenType-CFF fonts can contain more than one font
331  \return number of different fonts
332  */
333  unsigned int getNumberOfFonts() const
334  {
335  return _fsize;
336  }
337  //-----------------------------------------------------------------------------
338  /*! \brief get all data to fill a Font or FontDecriptor dictionary needed by a pdf file
339  \return the font data
340  */
341  TFontDictionary getFontDict() const;
342  //-----------------------------------------------------------------------------
343  /*! \brief get a data set of alternate font names, these names are collected on any relevant point in the font
344  \return alternate name set
345  */
346  TAltNameSet getAltNames() const;
347  //-----------------------------------------------------------------------------
348  /*! \brief get the font bounding box
349  \return font bounding box
350  */
351  TBBox getFontBBox() const;
352  //-----------------------------------------------------------------------------
353  /*! \brief get the number of all glyphs in the font. TrueType return also all composite glyphs. CFF-CID return all glyphs from whole font file.
354  \return number of all glyphs
355  */
356  unsigned int getNumberOfGlyphs() const;
357  //-----------------------------------------------------------------------------
358  /*! \brief (TrueType only) the number of 'cmap' tables
359  \return number of 'cmap' tables
360  */
361  unsigned int getTTNumberOf_cmap() const;
362  //-----------------------------------------------------------------------------
363  /*! \brief get glyph information to find and identify each glyph in libraries own data base
364  \param egv the data base struct to receive glyph information, see TEncGlyphVec
365  \param forceCIDFont try to identify the font as cid font
366  \return
367  */
368  void getFontEncGlyphs( TEncGlyphVec & egv, bool forceCIDFont) const;
369  //-----------------------------------------------------------------------------
370  /*! \brief get a human readable txt string to specific encoding
371  \param encinfo the encoding to get text
372  \return human readable txt string to specific encoding
373  */
374  std::string getEncodingDump( const TEncInfo & encinfo) const;
375  //-----------------------------------------------------------------------------
376  /*! \brief get glyph width from gid, this can be used for TrueType and cff fonts
377  \param gid the glyph id to get width
378  \return glyph width
379  */
380  TWidth getGWidth( TGID gid) const;
381  //-----------------------------------------------------------------------------
382  /*! \brief get glyph width from glyph name, this can be used for PostScript Type1 and non cid cff fonts
383  \param gname the glyph name to get width
384  \return glyph width
385  */
386  TWidth getGWidth( const std::string & gname) const;
387  //-----------------------------------------------------------------------------
388  /*! \brief get glyph bounding box from gid, this can be used for TrueType and cff fonts
389  \param gid the glyph id to get bounding box
390  \return glyph bounding box
391  */
392  TGlyphBox getGBox( TGID gid) const;
393  //-----------------------------------------------------------------------------
394  /*! \brief get glyph bounding box from glyph name, this can be used for PostScript Type1 and non cid cff fonts
395  \param gname the glyph name to get bounding box
396  \return glyph bounding box
397  */
398  TGlyphBox getGBox( const std::string & gname) const;
399  //-----------------------------------------------------------------------------
400  /*! \brief get glyph outline curves from gid, this can be used for TrueType and cff fonts
401  \param gid the glyph id to get outline curves
402  \param hint_info if true also stem hint info wil be appear into the outline data
403  \param ginfo if unequal to NULL this struct receive encoding info from this glyph
404  \return glyph outline data
405  */
406  TGOutline getGCurves( TGID gid, bool hint_info = false, TGInfoVec* ginfo = NULL) const;
407  //-----------------------------------------------------------------------------
408  /*! \brief get glyph outline curves from glyph name, this can be used for PostScript Type1 and non cid cff fonts
409  \param gname the glyph name to get outline curves
410  \param hint_info if true also stem hint info wil be appear into the outline data
411  \param ginfo if unequal to NULL this struct receive encoding info from this glyph
412  \return glyph outline data
413  */
414  TGOutline getGCurves( const std::string & gname, bool hint_info = false, TGInfoVec* ginfo = NULL) const;
415  //-----------------------------------------------------------------------------
416  /*! \brief get glyph dump data from gid, this can be used for TrueType and cff fonts
417  \param gid the glyph id to get dump data
418  \param dumparam the dump data filled by this function, see TDumpParam
419  */
420  void getGDump( TGID gid, TDumpParam & dumparam) const;
421  //-----------------------------------------------------------------------------
422  /*! \brief get glyph dump data from glyph name, this can be used for PostScript Type1 and non cid cff fonts
423  \param gname the glyph name to get dump data
424  \param dumparam the dump data filled by this function, see TDumpParam
425  */
426  void getGDump( const std::string & gname, TDumpParam & dumparam) const;
427  //-----------------------------------------------------------------------------
428  /*! \brief get CIDSystemInfo from font, this can be used for PostScript Type1 and cid cff fonts
429  \param registry name filled by function
430  \param ordering name filled by function
431  \param supplement integer filled by function
432  \return true if such inforamtion is available
433  */
434  bool getCIDSystemInfo( std::string & registry, std::string & ordering, int & supplement) const;
435  //-----------------------------------------------------------------------------
436  /*! \brief get information if the font is a cid font, this can be used for PostScript Type1 and cid cff fonts
437  \return true if font is a cid font
438  */
439  bool isCIDFont()
440  {
441  std::string registry;
442  std::string ordering;
443  int supplement;
444 
445  return getCIDSystemInfo( registry, ordering, supplement);
446  }
447  //-----------------------------------------------------------------------------
448  // font depended functions, check font type first
449  //-----------------------------------------------------------------------------
450  /*! \brief (TrueType only) get information about the 'post' table
451  \return return true if a 'post' table is present and contain glyph PostScript names
452  */
453  bool hasTTPostScriptInfo() const; // false if no TrueType or no PostScript informations is avail
454  //-----------------------------------------------------------------------------
455  /*! \brief (TrueType only) get glyph PostScript name from gid
456  \param gid the glyph id to get PostScript name
457  \return the glyph PostScript name
458  */
459  TPSName getTTGlyphPSName( TGID gid) const; // for TrueType or OpenType fonts
460  //-----------------------------------------------------------------------------
461  /*! \brief (TrueType only) get the 'os_2' Type flags, this contain license information
462  \return the 'os_2' Type flags in first and present bool in second
463  */
464  TUShortBoolRes getTTOS2TypeFlag() const; // for TrueType or OpenType fonts
465  //-----------------------------------------------------------------------------
466  /*! \brief (TrueType only) determine whether a specific encoding is present in 'cmap' table
467  \param platform the wishing platform
468  \param encoding the wishing encoding
469  \return true if the specific encoding is present
470  */
471  bool cmapTTPresent( unsigned short platform, unsigned short encoding) const; // for TrueType or OpenType fonts
472  //-----------------------------------------------------------------------------
473  /*! \brief (TrueType only) get all encoding information from 'cmap' tables
474  \return encoding information from 'cmap' tables, see TEncInfoVec
475  */
476  TEncInfoVec getTTcmapInfo() const; // for TrueType or OpenType fonts
477  //-----------------------------------------------------------------------------
478  /*! \brief (PostScript Type1 only) get byte lengths from the three PostScript Type1 font parts
479  \return byte lengths struct, see T1PiecesLength
480  */
481  T1PiecesLength getT1PiecesLength() const; // for Type1 (PostScript) fonts
482  //-----------------------------------------------------------------------------
483  /*! \brief (PostScript Type1 only) get size of "WeightVector" vector from MultipleMaster font
484  \return the size of "WeightVector" vector from MultipleMaster font
485  */
486  int getT1NumberOfMMaster() const; // for Type1 (PostScript) fonts
487  //-----------------------------------------------------------------------------
488  /*! \brief (PostScript Type1 only) set the font master index in MultipleMaster font, must be in range of [0 getT1NumberOfMMaster()]
489  \param mmidx the master index
490  */
491  void setT1MMasterIndex( unsigned int mmidx); // for Type1 (PostScript) fonts
492  //-----------------------------------------------------------------------------
493  private:
494  TPathParamMap _pathParamMap;
495  EFType _fonttype; //!< the font type
496  unsigned int _fsize; //!< number of available fonts in most case this is 1 except in TT-Ccollections, CFF-CID or special Type1 fonts
497  unsigned int _curidx; //!< number of current fonts set by open(..) function
498  CFFFont* _cff; //!< cff font instance
499  T1Font* _t1; //!< PostScript Type1 font instance
500  TTFont* _tt; //!< TrueType font instance
501  };
502 
503 } // FontEngine namespace
504 
505 #endif // _FONTENGINETCODE_H_
506 //-----------------------------------------------------------------------------
507 /*!\history
508 ** ADi-2012-12-14: creation
509 ** ADi-2013-01-01: change signature of TFont::open function
510 ** ADi-2013-01-25: add _curidx function getT1PiecesLength()
511 ** ADi-2013-04-11: add function getEncodingDump(..), getT1NumberOfMMaster() and setT1MMasterIndex(..)
512 ** ADi-2013-05-03: add function TPSCMap::containKnownPostScriptBug()
513 ** ADi-2013-08-30: preserve hinting info if Type1 fonts must be converted to CFF
514 ** ADi-2013-09-25: add openTT(..)
515 ** ADi-2013-09-26: rename openTT(..) to openOTBlocks(..)
516 ** ADi-2013-10-07: add support of TGInfoVec in function getGCurves(..) and extend enum ESVGFlags
517 ** ADi-2013-10-14: add function isCIDFont()
518 ** ADi-2013-11-18: remove struct TFontFilesCounter and struct TFontFiles and correct doxygen comments
519 */
ESVGFlags
parameter flags to control glyph dump svg
Definition: FontEngine.h:143
void setCurrentFontIndex(unsigned int curidx)
set the current font index, use this function to select a cid font into an OpenType cid font ...
Definition: FontEngine.h:292
std::pair< const char *, unsigned int > TPSName
Definition: FontEngineTypes.h:34
EFType getFontType() const
get open font state
Definition: FontEngine.h:325
PostScript::TCMapDict TCMapDict
Definition: FontEngine.h:53
contains parameter to create new font or subset existing font
Definition: FontEngineTypes.h:452
bool hasT1Font() const
get open font state
Definition: FontEngine.h:301
The primary font class with short sample to open font and get glyph information:
Definition: FontEngine.h:123
struct to keep glyph bounding box and width
Definition: FontEngineTypes.h:123
unsigned int getNumberOfFonts() const
get number of different fonts in one file. TrueType collections, PostScript Type1 and OpenType-CFF fo...
Definition: FontEngine.h:333
struct to keep single 2D point
Definition: FontEngineTypes.h:87
bool hasCFFFont() const
get open font state
Definition: FontEngine.h:309
FontEngine::TPath TPath
Definition: FontEngine.h:160
std::map< std::string, FontEngine::TPath > TPathParamMap
Definition: FontEngine.h:33
bool isCIDFont()
get information if the font is a cid font, this can be used for PostScript Type1 and cid cff fonts ...
Definition: FontEngine.h:439
std::vector< TGInfo > TGInfoVec
Definition: FontEngineTypes.h:343
the enum to encoding settings, to understand the sense see OpenType Spec http://www.microsoft.com/typography/otspec/name.htm
Definition: FontEngineTypes.h:306
void initPathParameter(const TPathParamMap &ppm)
set new parameter map
Definition: FontEngine.h:203
contain font properties, derived from PDF format, see also FontDescriptor http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
Definition: FontEngineTypes.h:491
EErrorCodes
PostScript error codes.
Definition: PostScriptEngineError.h:25
dump parameter struct to select all dump feature
Definition: FontEngineTypes.h:368
std::vector< TEncGlyph > TEncGlyphVec
Definition: FontEngineTypes.h:339
the CMap storage struct keep all possible CMap data
Definition: PostScriptCMapData.h:125
struct to keep glyph outline, width and stem hint info
Definition: FontEngineTypes.h:70
std::basic_string< char > TBlock
Definition: FontEngineTypes.h:29
std::vector< TFontPath > TFontPathVec
Definition: FontEngine.h:162
TPSCMap(const TPathParamMap &ppm)
ctor with parameter map
Definition: FontEngine.h:57
CMap dict information.
Definition: PostScriptCMapData.h:140
the length of the three parts of PostScript Type 1 fonts
Definition: FontEngineTypes.h:520
struct to keep glyph width info
Definition: FontEngineTypes.h:42
TFont(const TPathParamMap &ppm)
default ctor
Definition: FontEngine.h:169
EFType
possible font types
Definition: FontEngine.h:129
std::vector< TEncInfo > TEncInfoVec
Definition: FontEngineTypes.h:323
void FontEngine_Assert(bool expr)
function to check program process no excption raise
Definition: FontEngineError.h:200
std::wstring TPath
Definition: FontEngineTypes.h:35
PostScript::TFontCodeMap TFontCodeMap
Definition: FontEngine.h:52
unsigned int TGID
glyph id, can be used only in CFF and TrueType fonts
Definition: FontEngine.h:163
unsigned int TSVGFlags
Definition: FontEngine.h:158
std::set< std::string > TAltNameSet
Definition: FontEngineTypes.h:37
#define FONTENGINE_EXPORTS
Definition: FontEngineDLL.h:20
std::pair< unsigned short, bool > TUShortBoolRes
Definition: FontEngineTypes.h:38
PostScript CMaps files will be used to define encodings or tounicode mappings.
Definition: FontEngine.h:48
struct to define glyph decriptions inclusive outline data for input or modify new or existing glyphs ...
Definition: FontEngineTypes.h:409
FontEngine::TPath TPath
Definition: FontEngine.h:51
std::pair< TPath, EFType > TFontPath
Definition: FontEngine.h:161
struct to keep rectangle
Definition: FontEngineTypes.h:104
void initPathParameter(const TPathParamMap &ppm)
set new parameter map
Definition: FontEngine.h:74
bool hasTTFont() const
get open font state
Definition: FontEngine.h:317
InsideFont and ADI-FontEngine : Andreas Dippe, © 2013
http://www.insidefont.de