Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
cf2font.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* cf2font.h */
4 /* */
5 /* Adobe's code for font instances (specification). */
6 /* */
7 /* Copyright 2007-2013 Adobe Systems Incorporated. */
8 /* */
9 /* This software, and all works of authorship, whether in source or */
10 /* object code form as indicated by the copyright notice(s) included */
11 /* herein (collectively, the "Work") is made available, and may only be */
12 /* used, modified, and distributed under the FreeType Project License, */
13 /* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
14 /* FreeType Project License, each contributor to the Work hereby grants */
15 /* to any individual or legal entity exercising permissions granted by */
16 /* the FreeType Project License and this section (hereafter, "You" or */
17 /* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
18 /* royalty-free, irrevocable (except as stated in this section) patent */
19 /* license to make, have made, use, offer to sell, sell, import, and */
20 /* otherwise transfer the Work, where such license applies only to those */
21 /* patent claims licensable by such contributor that are necessarily */
22 /* infringed by their contribution(s) alone or by combination of their */
23 /* contribution(s) with the Work to which such contribution(s) was */
24 /* submitted. If You institute patent litigation against any entity */
25 /* (including a cross-claim or counterclaim in a lawsuit) alleging that */
26 /* the Work or a contribution incorporated within the Work constitutes */
27 /* direct or contributory patent infringement, then any patent licenses */
28 /* granted to You under this License for that Work shall terminate as of */
29 /* the date such litigation is filed. */
30 /* */
31 /* By using, modifying, or distributing the Work you indicate that you */
32 /* have read and understood the terms and conditions of the */
33 /* FreeType Project License as well as those provided in this section, */
34 /* and you accept them fully. */
35 /* */
36 /***************************************************************************/
37 
38 
39 #ifndef __CF2FONT_H__
40 #define __CF2FONT_H__
41 
42 
43 #include "cf2ft.h"
44 #include "cf2blues.h"
45 
46 
48 
49 
50 #define CF2_OPERAND_STACK_SIZE 48
51 #define CF2_MAX_SUBR 10 /* maximum subroutine nesting */
52 
53 
54  /* typedef is in `cf2glue.h' */
55  struct CF2_FontRec_
56  {
58  FT_Error error; /* shared error for this instance */
59 
61 
62  /* variables that depend on Transform: */
63  /* the following have zero translation; */
64  /* inner * outer = font * original */
65 
66  CF2_Matrix currentTransform; /* original client matrix */
67  CF2_Matrix innerTransform; /* for hinting; erect, scaled */
68  CF2_Matrix outerTransform; /* post hinting; includes rotations */
69  CF2_Fixed ppem; /* transform-dependent */
70 
72 
73  CF2_Fixed syntheticEmboldeningAmountX; /* character space units */
74  CF2_Fixed syntheticEmboldeningAmountY; /* character space units */
75 
76  /* FreeType related members */
77  CF2_OutlineRec outline; /* freetype glyph outline functions */
79  CFF_SubFont lastSubfont; /* FreeType parsed data; */
80  /* top font or subfont */
81 
82  /* these flags can vary from one call to the next */
84  FT_Bool darkened; /* true if stemDarkened or synthetic bold */
85  /* i.e. darkenX != 0 || darkenY != 0 */
87 
88  /* variables that depend on both FontDict and Transform */
89  CF2_Fixed stdVW; /* in character space; depends on dict entry */
90  CF2_Fixed stdHW; /* in character space; depends on dict entry */
91  CF2_Fixed darkenX; /* character space units */
92  CF2_Fixed darkenY; /* depends on transform */
93  /* and private dict (StdVW) */
94  FT_Bool reverseWinding; /* darken assuming */
95  /* counterclockwise winding */
96 
97  CF2_BluesRec blues; /* computed zone data */
98  };
99 
100 
101  FT_LOCAL( FT_Error )
103  CF2_Buffer charstring,
104  const CF2_Matrix* transform,
105  CF2_F16Dot16* glyphWidth );
106 
107 
109 
110 
111 #endif /* __CF2FONT_H__ */
112 
113 
114 /* END */
#define CF2_Int
Definition: cf2types.h:65
int FT_Error
Definition: fttypes.h:296
FT_Bool reverseWinding
Definition: cf2font.h:94
#define FT_END_HEADER
Definition: ftheader.h:54
CF2_Fixed stdHW
Definition: cf2font.h:90
CFF_SubFont lastSubfont
Definition: cf2font.h:79
CF2_Fixed darkenY
Definition: cf2font.h:92
CF2_Fixed syntheticEmboldeningAmountY
Definition: cf2font.h:74
FT_Memory memory
Definition: cf2font.h:57
CF2_Fixed syntheticEmboldeningAmountX
Definition: cf2font.h:73
FT_Bool stemDarkened
Definition: cf2font.h:86
CF2_Matrix outerTransform
Definition: cf2font.h:68
FT_Error error
Definition: cf2font.h:58
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
CF2_OutlineRec outline
Definition: cf2font.h:77
CF2_RenderingFlags renderingFlags
Definition: cf2font.h:60
CF2_Fixed ppem
Definition: cf2font.h:69
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
CF2_Int CF2_RenderingFlags
Definition: cf2glue.h:61
FT_Bool hinted
Definition: cf2font.h:83
CF2_Matrix innerTransform
Definition: cf2font.h:67
#define FT_LOCAL(x)
Definition: ftconfig.h:235
cf2_getGlyphWidth(CF2_Font font, CF2_Buffer charstring, const CF2_Matrix *transform, CF2_F16Dot16 *glyphWidth)
Definition: cf2font.c:321
#define CF2_Fixed
Definition: cf2fixed.h:48
FT_Bool darkened
Definition: cf2font.h:84
CF2_BluesRec blues
Definition: cf2font.h:97
FT_Int32 CF2_F16Dot16
Definition: cf2types.h:69
CFF_Decoder * decoder
Definition: cf2font.h:78
CF2_Matrix currentTransform
Definition: cf2font.h:66
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
GLuint GLenum GLenum transform
CF2_Int unitsPerEm
Definition: cf2font.h:71
CF2_Fixed stdVW
Definition: cf2font.h:89
FT_BEGIN_HEADER struct CF2_BufferRec_ * CF2_Buffer
CF2_Fixed darkenX
Definition: cf2font.h:91