1 /***************************************************************************/
5 /* Adobe's code for font instances (specification). */
7 /* Copyright 2007-2013 Adobe Systems Incorporated. */
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. */
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. */
36 /***************************************************************************/
51 #define CF2_OPERAND_STACK_SIZE 48
52 #define CF2_MAX_SUBR 16 /* maximum subroutine nesting; */
53 /* only 10 are allowed but there exist */
54 /* fonts like `HiraKakuProN-W3.ttf' */
55 /* (Hiragino Kaku Gothic ProN W3; */
56 /* 8.2d6e1; 2014-12-19) that exceed */
58 #define CF2_STORAGE_SIZE 32
61 /* typedef is in `cf2glue.h' */
65 FT_Error error
; /* shared error for this instance */
68 CF2_RenderingFlags renderingFlags
;
70 /* variables that depend on Transform: */
71 /* the following have zero translation; */
72 /* inner * outer = font * original */
74 CF2_Matrix currentTransform
; /* original client matrix */
75 CF2_Matrix innerTransform
; /* for hinting; erect, scaled */
76 CF2_Matrix outerTransform
; /* post hinting; includes rotations */
77 CF2_Fixed ppem
; /* transform-dependent */
80 CFF_BlendRec blend
; /* cached charstring blend vector */
81 CF2_UInt vsindex
; /* current vsindex */
82 CF2_UInt lenNDV
; /* current length NDV or zero */
83 FT_Fixed
* NDV
; /* ptr to current NDV or NULL */
87 CF2_Fixed syntheticEmboldeningAmountX
; /* character space units */
88 CF2_Fixed syntheticEmboldeningAmountY
; /* character space units */
90 /* FreeType related members */
91 CF2_OutlineRec outline
; /* freetype glyph outline functions */
93 CFF_SubFont lastSubfont
; /* FreeType parsed data; */
94 /* top font or subfont */
96 /* these flags can vary from one call to the next */
98 FT_Bool darkened
; /* true if stemDarkened or synthetic bold */
99 /* i.e. darkenX != 0 || darkenY != 0 */
100 FT_Bool stemDarkened
;
102 FT_Int darkenParams
[8]; /* 1000 unit character space */
104 /* variables that depend on both FontDict and Transform */
105 CF2_Fixed stdVW
; /* in character space; depends on dict entry */
106 CF2_Fixed stdHW
; /* in character space; depends on dict entry */
107 CF2_Fixed darkenX
; /* character space units */
108 CF2_Fixed darkenY
; /* depends on transform */
109 /* and private dict (StdVW) */
110 FT_Bool reverseWinding
; /* darken assuming */
111 /* counterclockwise winding */
113 CF2_BluesRec blues
; /* computed zone data */
118 cf2_getGlyphOutline( CF2_Font font
,
119 CF2_Buffer charstring
,
120 const CF2_Matrix
* transform
,
121 CF2_F16Dot16
* glyphWidth
);
127 #endif /* CF2FONT_H_ */