• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************/
2 /*                                                                         */
3 /*  cf2ft.h                                                                */
4 /*                                                                         */
5 /*    FreeType Glue Component to Adobe's Interpreter (specification).      */
6 /*                                                                         */
7 /*  Copyright 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 CF2FT_H_
40 #define CF2FT_H_
41 
42 
43 #include "cf2types.h"
44 
45 
46   /* TODO: disable asserts for now */
47 #define CF2_NDEBUG
48 
49 
50 #include FT_SYSTEM_H
51 
52 #include "cf2glue.h"
53 #include "cffgload.h"    /* for CFF_Decoder */
54 
55 
56 FT_BEGIN_HEADER
57 
58 
59   FT_LOCAL( FT_Error )
60   cf2_decoder_parse_charstrings( CFF_Decoder*  decoder,
61                                  FT_Byte*      charstring_base,
62                                  FT_ULong      charstring_len );
63 
64   FT_LOCAL( CFF_SubFont )
65   cf2_getSubfont( CFF_Decoder*  decoder );
66 
67   FT_LOCAL( CFF_VStore )
68   cf2_getVStore( CFF_Decoder*  decoder );
69 
70   FT_LOCAL( FT_UInt )
71   cf2_getMaxstack( CFF_Decoder*  decoder );
72 
73 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
74   FT_LOCAL( FT_Error )
75   cf2_getNormalizedVector( CFF_Decoder*  decoder,
76                            CF2_UInt     *len,
77                            FT_Fixed*    *vec );
78 #endif
79 
80   FT_LOCAL( CF2_Fixed )
81   cf2_getPpemY( CFF_Decoder*  decoder );
82   FT_LOCAL( CF2_Fixed )
83   cf2_getStdVW( CFF_Decoder*  decoder );
84   FT_LOCAL( CF2_Fixed )
85   cf2_getStdHW( CFF_Decoder*  decoder );
86 
87   FT_LOCAL( void )
88   cf2_getBlueMetrics( CFF_Decoder*  decoder,
89                       CF2_Fixed*    blueScale,
90                       CF2_Fixed*    blueShift,
91                       CF2_Fixed*    blueFuzz );
92   FT_LOCAL( void )
93   cf2_getBlueValues( CFF_Decoder*  decoder,
94                      size_t*       count,
95                      FT_Pos*      *data );
96   FT_LOCAL( void )
97   cf2_getOtherBlues( CFF_Decoder*  decoder,
98                      size_t*       count,
99                      FT_Pos*      *data );
100   FT_LOCAL( void )
101   cf2_getFamilyBlues( CFF_Decoder*  decoder,
102                       size_t*       count,
103                       FT_Pos*      *data );
104   FT_LOCAL( void )
105   cf2_getFamilyOtherBlues( CFF_Decoder*  decoder,
106                            size_t*       count,
107                            FT_Pos*      *data );
108 
109   FT_LOCAL( CF2_Int )
110   cf2_getLanguageGroup( CFF_Decoder*  decoder );
111 
112   FT_LOCAL( CF2_Int )
113   cf2_initGlobalRegionBuffer( CFF_Decoder*  decoder,
114                               CF2_Int       subrNum,
115                               CF2_Buffer    buf );
116   FT_LOCAL( FT_Error )
117   cf2_getSeacComponent( CFF_Decoder*  decoder,
118                         CF2_Int       code,
119                         CF2_Buffer    buf );
120   FT_LOCAL( void )
121   cf2_freeSeacComponent( CFF_Decoder*  decoder,
122                          CF2_Buffer    buf );
123   FT_LOCAL( CF2_Int )
124   cf2_initLocalRegionBuffer( CFF_Decoder*  decoder,
125                              CF2_Int       subrNum,
126                              CF2_Buffer    buf );
127 
128   FT_LOCAL( CF2_Fixed )
129   cf2_getDefaultWidthX( CFF_Decoder*  decoder );
130   FT_LOCAL( CF2_Fixed )
131   cf2_getNominalWidthX( CFF_Decoder*  decoder );
132 
133 
134   /*
135    * FreeType client outline
136    *
137    * process output from the charstring interpreter
138    */
139   typedef struct  CF2_OutlineRec_
140   {
141     CF2_OutlineCallbacksRec  root;        /* base class must be first */
142     CFF_Decoder*             decoder;
143 
144   } CF2_OutlineRec, *CF2_Outline;
145 
146 
147   FT_LOCAL( void )
148   cf2_outline_reset( CF2_Outline  outline );
149   FT_LOCAL( void )
150   cf2_outline_close( CF2_Outline  outline );
151 
152 
153 FT_END_HEADER
154 
155 
156 #endif /* CF2FT_H_ */
157 
158 
159 /* END */
160