xref: /inferno-os/libfreetype/cffobjs.h (revision 7ef44d652ae9e5e1f5b3465d73684e4a54de73c0)
1 /***************************************************************************/
2 /*                                                                         */
3 /*  cffobjs.h                                                              */
4 /*                                                                         */
5 /*    OpenType objects manager (specification).                            */
6 /*                                                                         */
7 /*  Copyright 1996-2001, 2002 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 __CFFOBJS_H__
20 #define __CFFOBJS_H__
21 
22 
23 #include <ft2build.h>
24 #include FT_INTERNAL_OBJECTS_H
25 #include FT_INTERNAL_CFF_TYPES_H
26 #include FT_INTERNAL_TRUETYPE_TYPES_H
27 #include FT_INTERNAL_POSTSCRIPT_NAMES_H
28 
29 
30 FT_BEGIN_HEADER
31 
32 
33   /*************************************************************************/
34   /*                                                                       */
35   /* <Type>                                                                */
36   /*    CFF_Driver                                                         */
37   /*                                                                       */
38   /* <Description>                                                         */
39   /*    A handle to an OpenType driver object.                             */
40   /*                                                                       */
41   typedef struct CFF_DriverRec_*  CFF_Driver;
42 
43   typedef TT_Face  CFF_Face;
44 
45 
46   /*************************************************************************/
47   /*                                                                       */
48   /* <Type>                                                                */
49   /*    CFF_Size                                                           */
50   /*                                                                       */
51   /* <Description>                                                         */
52   /*    A handle to an OpenType size object.                               */
53   /*                                                                       */
54   typedef FT_Size  CFF_Size;
55 
56 
57   /*************************************************************************/
58   /*                                                                       */
59   /* <Type>                                                                */
60   /*    CFF_GlyphSlot                                                      */
61   /*                                                                       */
62   /* <Description>                                                         */
63   /*    A handle to an OpenType glyph slot object.                         */
64   /*                                                                       */
65   typedef struct  CFF_GlyphSlotRec_
66   {
67     FT_GlyphSlotRec  root;
68 
69     FT_Bool          hint;
70     FT_Bool          scaled;
71 
72     FT_Fixed         x_scale;
73     FT_Fixed         y_scale;
74 
75   } CFF_GlyphSlotRec, *CFF_GlyphSlot;
76 
77 
78 
79   /*************************************************************************/
80   /*                                                                       */
81   /* Subglyph transformation record.                                       */
82   /*                                                                       */
83   typedef struct  CFF_Transform_
84   {
85     FT_Fixed    xx, xy;     /* transformation matrix coefficients */
86     FT_Fixed    yx, yy;
87     FT_F26Dot6  ox, oy;     /* offsets        */
88 
89   } CFF_Transform;
90 
91 
92   /* this is only used in the case of a pure CFF font with no charmap */
93   typedef struct  CFF_CharMapRec_
94   {
95     TT_CharMapRec  root;
96     PS_Unicodes    unicodes;
97 
98   } CFF_CharMapRec, *CFF_CharMap;
99 
100 
101   /***********************************************************************/
102   /*                                                                     */
103   /* TrueType driver class.                                              */
104   /*                                                                     */
105   typedef struct  CFF_DriverRec_
106   {
107     FT_DriverRec  root;
108     void*         extension_component;
109 
110   } CFF_DriverRec;
111 
112 
113   FT_LOCAL( FT_Error )
114   cff_size_init( CFF_Size  size );
115 
116   FT_LOCAL( void )
117   cff_size_done( CFF_Size  size );
118 
119   FT_LOCAL( FT_Error )
120   cff_size_reset( CFF_Size  size );
121 
122   FT_LOCAL( void )
123   cff_slot_done( CFF_GlyphSlot  slot );
124 
125   FT_LOCAL( FT_Error )
126   cff_slot_init( CFF_GlyphSlot   slot );
127 
128 
129   /*************************************************************************/
130   /*                                                                       */
131   /* Face functions                                                        */
132   /*                                                                       */
133   FT_LOCAL( FT_Error )
134   cff_face_init( FT_Stream      stream,
135                  CFF_Face       face,
136                  FT_Int         face_index,
137                  FT_Int         num_params,
138                  FT_Parameter*  params );
139 
140   FT_LOCAL( void )
141   cff_face_done( CFF_Face  face );
142 
143 
144   /*************************************************************************/
145   /*                                                                       */
146   /* Driver functions                                                      */
147   /*                                                                       */
148   FT_LOCAL( FT_Error )
149   cff_driver_init( CFF_Driver  driver );
150 
151   FT_LOCAL( void )
152   cff_driver_done( CFF_Driver  driver );
153 
154 
155 FT_END_HEADER
156 
157 #endif /* __CFFOBJS_H__ */
158 
159 
160 /* END */
161