ReactOS  0.4.15-dev-439-g292f67a
psfont.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* psfont.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 PSFONT_H_
40 #define PSFONT_H_
41 
42 
43 #include FT_SERVICE_CFF_TABLE_LOAD_H
44 
45 #include "psft.h"
46 #include "psblues.h"
47 
48 
50 
51 
52 #define CF2_OPERAND_STACK_SIZE 48
53 #define CF2_MAX_SUBR 16 /* maximum subroutine nesting; */
54  /* only 10 are allowed but there exist */
55  /* fonts like `HiraKakuProN-W3.ttf' */
56  /* (Hiragino Kaku Gothic ProN W3; */
57  /* 8.2d6e1; 2014-12-19) that exceed */
58  /* this limit */
59 #define CF2_STORAGE_SIZE 32
60 
61 
62  /* typedef is in `cf2glue.h' */
63  struct CF2_FontRec_
64  {
66  FT_Error error; /* shared error for this instance */
67 
71 
72  /* variables that depend on Transform: */
73  /* the following have zero translation; */
74  /* inner * outer = font * original */
75 
76  CF2_Matrix currentTransform; /* original client matrix */
77  CF2_Matrix innerTransform; /* for hinting; erect, scaled */
78  CF2_Matrix outerTransform; /* post hinting; includes rotations */
79  CF2_Fixed ppem; /* transform-dependent */
80 
81  /* variation data */
82  CFF_BlendRec blend; /* cached charstring blend vector */
83  CF2_UInt vsindex; /* current vsindex */
84  CF2_UInt lenNDV; /* current length NDV or zero */
85  FT_Fixed* NDV; /* ptr to current NDV or NULL */
86 
88 
89  CF2_Fixed syntheticEmboldeningAmountX; /* character space units */
90  CF2_Fixed syntheticEmboldeningAmountY; /* character space units */
91 
92  /* FreeType related members */
93  CF2_OutlineRec outline; /* freetype glyph outline functions */
95  CFF_SubFont lastSubfont; /* FreeType parsed data; */
96  /* top font or subfont */
97 
98  /* these flags can vary from one call to the next */
100  FT_Bool darkened; /* true if stemDarkened or synthetic bold */
101  /* i.e. darkenX != 0 || darkenY != 0 */
103 
104  FT_Int darkenParams[8]; /* 1000 unit character space */
105 
106  /* variables that depend on both FontDict and Transform */
107  CF2_Fixed stdVW; /* in character space; depends on dict entry */
108  CF2_Fixed stdHW; /* in character space; depends on dict entry */
109  CF2_Fixed darkenX; /* character space units */
110  CF2_Fixed darkenY; /* depends on transform */
111  /* and private dict (StdVW) */
112  FT_Bool reverseWinding; /* darken assuming */
113  /* counterclockwise winding */
114 
115  CF2_BluesRec blues; /* computed zone data */
116 
117  FT_Service_CFFLoad cffload; /* pointer to cff functions */
118  };
119 
120 
121  FT_LOCAL( FT_Error )
123  CF2_Buffer charstring,
124  const CF2_Matrix* transform,
125  CF2_F16Dot16* glyphWidth );
126 
127 
129 
130 
131 #endif /* PSFONT_H_ */
132 
133 
134 /* END */
#define CF2_UInt
Definition: pstypes.h:64
FT_BEGIN_HEADER struct CF2_BufferRec_ * CF2_Buffer
int FT_Error
Definition: fttypes.h:300
CF2_Fixed syntheticEmboldeningAmountX
Definition: psfont.h:89
FT_Int32 CF2_F16Dot16
Definition: pstypes.h:69
CF2_Fixed darkenY
Definition: psfont.h:110
#define FT_END_HEADER
Definition: ftheader.h:54
Definition: mk_font.cpp:20
signed int FT_Int
Definition: fttypes.h:220
CF2_UInt lenNDV
Definition: psfont.h:84
FT_Fixed * NDV
Definition: psfont.h:85
CF2_UInt vsindex
Definition: psfont.h:83
FT_Bool isCFF2
Definition: psfont.h:69
CF2_Fixed darkenX
Definition: psfont.h:109
FT_Bool isT1
Definition: psfont.h:68
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
FT_Bool stemDarkened
Definition: psfont.h:102
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
CF2_Int CF2_RenderingFlags
Definition: psglue.h:61
FT_Bool reverseWinding
Definition: psfont.h:112
#define FT_LOCAL(x)
Definition: ftconfig.h:387
CF2_Matrix currentTransform
Definition: psfont.h:76
CF2_Fixed stdVW
Definition: psfont.h:107
CF2_BluesRec blues
Definition: psfont.h:115
FT_Bool hinted
Definition: psfont.h:99
FT_Int darkenParams[8]
Definition: psfont.h:104
FT_Error error
Definition: psfont.h:66
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
CF2_Int unitsPerEm
Definition: psfont.h:87
CF2_RenderingFlags renderingFlags
Definition: psfont.h:70
FT_Service_CFFLoad cffload
Definition: psfont.h:117
CF2_Fixed syntheticEmboldeningAmountY
Definition: psfont.h:90
signed long FT_Fixed
Definition: fttypes.h:288
CF2_Fixed ppem
Definition: psfont.h:79
PS_Decoder * decoder
Definition: psfont.h:94
#define CF2_Int
Definition: pstypes.h:65
CF2_Fixed stdHW
Definition: psfont.h:108
CF2_Matrix innerTransform
Definition: psfont.h:77
GLuint GLenum GLenum transform
Definition: glext.h:9407
cf2_getGlyphOutline(CF2_Font font, CF2_Buffer charstring, const CF2_Matrix *transform, CF2_F16Dot16 *glyphWidth)
Definition: psfont.c:487
CF2_OutlineRec outline
Definition: psfont.h:93
CFF_BlendRec blend
Definition: psfont.h:82
CF2_Matrix outerTransform
Definition: psfont.h:78
CFF_SubFont lastSubfont
Definition: psfont.h:95
FT_Bool darkened
Definition: psfont.h:100
FT_Memory memory
Definition: psfont.h:65
#define CF2_Fixed
Definition: psfixed.h:48