1 /***************************************************************************/
5 /* FreeType API for accessing PFR-specific data */
7 /* Copyright 2002 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16 /***************************************************************************/
23 #include FT_FREETYPE_H
29 /*************************************************************************/
38 /* PFR/TrueDoc specific APIs */
41 /* This section contains the declaration of PFR-specific functions. */
43 /*************************************************************************/
46 /**********************************************************************
52 * returns the outline and metrics resolutions of a given PFR
56 * face :: handle to input face. It can be a non-PFR face.
59 * aoutline_resolution ::
60 * outline resolution. This is equivalent to "face->units_per_EM".
61 * optional (parameter can be NULL)
63 * ametrics_resolution ::
64 * metrics_resolution. This is equivalent to "outline_resolution"
65 * for non-PFR fonts. can be NULL
66 * optional (parameter can be NULL)
69 * a 16.16 fixed-point number used to scale distance expressed
70 * in metrics units to device sub-pixels. This is equivalent to
71 * 'face->size->x_scale', but for metrics only.
72 * optional (parameter can be NULL)
75 * same as 'ametrics_x_scale', but for the vertical direction.
76 * optional (parameter can be NULL)
79 * if the input face is not a PFR, this function will return an error.
80 * However, in all cases, it will return valid values.
83 FT_Get_PFR_Metrics( FT_Face face,
84 FT_UInt *aoutline_resolution,
85 FT_UInt *ametrics_resolution,
86 FT_Fixed *ametrics_x_scale,
87 FT_Fixed *ametrics_y_scale );
89 /**********************************************************************
95 * returns the kerning pair corresponding to two glyphs in
96 * a PFR face. The distance is expressed in metrics units, unlike
97 * the result of @FT_Get_Kerning.
100 * face :: handle to input face.
101 * left :: left glyph index
102 * right :: right glyph index
105 * avector :: kerning vector
108 * this function always return distances in original PFR metrics
109 * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
110 * mode, which always return distances converted to outline units.
112 * you can use the value of the 'x_scale' and 'y_scale' parameters
113 * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels
115 FT_EXPORT( FT_Error )
116 FT_Get_PFR_Kerning( FT_Face face,
119 FT_Vector *avector );
121 /**********************************************************************
127 * returns a given glyph advance, expressed in original metrics units,
131 * face :: handle to input face.
132 * gindex :: glyph index
135 * aadvance :: glyph advance in metrics units
138 * error code. 0 means success
141 * you can use the 'x_scale' or 'y_scale' results of @FT_Get_PFR_Metrics
142 * to convert the advance to device sub-pixels (i.e. 1/64th of pixels)
144 FT_EXPORT( FT_Error )
145 FT_Get_PFR_Advance( FT_Face face,
153 #endif /* __FTBDF_H__ */