• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *
3  * cffload.h
4  *
5  *   OpenType & CFF data/program tables loader (specification).
6  *
7  * Copyright 1996-2018 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 FT_INTERNAL_CFF_TYPES_H
25 #include "cffparse.h"
26 #include FT_INTERNAL_CFF_OBJECTS_TYPES_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                  CFF_Face    face,
70                  FT_Bool     pure_cff,
71                  FT_Bool     cff2 );
72 
73   FT_LOCAL( void )
74   cff_font_done( CFF_Font  font );
75 
76 
77   FT_LOCAL( FT_Error )
78   cff_load_private_dict( CFF_Font     font,
79                          CFF_SubFont  subfont,
80                          FT_UInt      lenNDV,
81                          FT_Fixed*    NDV );
82 
83   FT_LOCAL( FT_Byte )
84   cff_fd_select_get( CFF_FDSelect  fdselect,
85                      FT_UInt       glyph_index );
86 
87   FT_LOCAL( FT_Bool )
88   cff_blend_check_vector( CFF_Blend  blend,
89                           FT_UInt    vsindex,
90                           FT_UInt    lenNDV,
91                           FT_Fixed*  NDV );
92 
93   FT_LOCAL( FT_Error )
94   cff_blend_build_vector( CFF_Blend  blend,
95                           FT_UInt    vsindex,
96                           FT_UInt    lenNDV,
97                           FT_Fixed*  NDV );
98 
99   FT_LOCAL( void )
100   cff_blend_clear( CFF_SubFont  subFont );
101 
102   FT_LOCAL( FT_Error )
103   cff_blend_doBlend( CFF_SubFont  subfont,
104                      CFF_Parser   parser,
105                      FT_UInt      numBlends );
106 
107 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
108   FT_LOCAL( FT_Error )
109   cff_get_var_blend( CFF_Face     face,
110                      FT_UInt     *num_coords,
111                      FT_Fixed*   *coords,
112                      FT_Fixed*   *normalizedcoords,
113                      FT_MM_Var*  *mm_var );
114 
115   FT_LOCAL( void )
116   cff_done_blend( CFF_Face  face );
117 #endif
118 
119 
120 FT_END_HEADER
121 
122 #endif /* CFFLOAD_H_ */
123 
124 
125 /* END */
126