• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***************************************************************************/
2 /*                                                                         */
3 /*  cffload.h                                                              */
4 /*                                                                         */
5 /*    OpenType & CFF data/program tables loader (specification).           */
6 /*                                                                         */
7 /*  Copyright 1996-2017 by                                                 */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
10 /*  This file is part of the FreeType project, and may only be used,       */
11 /*  modified, and distributed under the terms of the FreeType project      */
12 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
13 /*  this file you indicate that you have read the license and              */
14 /*  understand and accept it fully.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17 
18 
19 #ifndef CFFLOAD_H_
20 #define CFFLOAD_H_
21 
22 
23 #include <ft2build.h>
24 #include "cfftypes.h"
25 #include "cffparse.h"
26 #include "cffobjs.h"  /* for CFF_Face */
27 
28 
29 FT_BEGIN_HEADER
30 
31   FT_LOCAL( FT_UShort )
32   cff_get_standard_encoding( FT_UInt  charcode );
33 
34 
35   FT_LOCAL( FT_String* )
36   cff_index_get_string( CFF_Font  font,
37                         FT_UInt   element );
38 
39   FT_LOCAL( FT_String* )
40   cff_index_get_sid_string( CFF_Font  font,
41                             FT_UInt   sid );
42 
43 
44   FT_LOCAL( FT_Error )
45   cff_index_access_element( CFF_Index  idx,
46                             FT_UInt    element,
47                             FT_Byte**  pbytes,
48                             FT_ULong*  pbyte_len );
49 
50   FT_LOCAL( void )
51   cff_index_forget_element( CFF_Index  idx,
52                             FT_Byte**  pbytes );
53 
54   FT_LOCAL( FT_String* )
55   cff_index_get_name( CFF_Font  font,
56                       FT_UInt   element );
57 
58 
59   FT_LOCAL( FT_UInt )
60   cff_charset_cid_to_gindex( CFF_Charset  charset,
61                              FT_UInt      cid );
62 
63 
64   FT_LOCAL( FT_Error )
65   cff_font_load( FT_Library  library,
66                  FT_Stream   stream,
67                  FT_Int      face_index,
68                  CFF_Font    font,
69                  FT_Bool     pure_cff,
70                  FT_Bool     cff2 );
71 
72   FT_LOCAL( void )
73   cff_font_done( CFF_Font  font );
74 
75 
76   FT_LOCAL( FT_Error )
77   cff_load_private_dict( CFF_Font     font,
78                          CFF_SubFont  subfont,
79                          FT_UInt      lenNDV,
80                          FT_Fixed*    NDV );
81 
82   FT_LOCAL( FT_Byte )
83   cff_fd_select_get( CFF_FDSelect  fdselect,
84                      FT_UInt       glyph_index );
85 
86   FT_LOCAL( FT_Bool )
87   cff_blend_check_vector( CFF_Blend  blend,
88                           FT_UInt    vsindex,
89                           FT_UInt    lenNDV,
90                           FT_Fixed*  NDV );
91 
92   FT_LOCAL( FT_Error )
93   cff_blend_build_vector( CFF_Blend  blend,
94                           FT_UInt    vsindex,
95                           FT_UInt    lenNDV,
96                           FT_Fixed*  NDV );
97 
98   FT_LOCAL( void )
99   cff_blend_clear( CFF_SubFont  subFont );
100 
101   FT_LOCAL( FT_Error )
102   cff_blend_doBlend( CFF_SubFont  subfont,
103                      CFF_Parser   parser,
104                      FT_UInt      numBlends );
105 
106 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
107   FT_LOCAL( FT_Error )
108   cff_get_var_blend( CFF_Face     face,
109                      FT_UInt     *num_coords,
110                      FT_Fixed*   *coords,
111                      FT_MM_Var*  *mm_var );
112 
113   FT_LOCAL( void )
114   cff_done_blend( CFF_Face  face );
115 #endif
116 
117 
118 FT_END_HEADER
119 
120 #endif /* CFFLOAD_H_ */
121 
122 
123 /* END */
124