sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
ftpfr.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* ftpfr.h
4
*
5
* FreeType API for accessing PFR-specific data (specification only).
6
*
7
* Copyright (C) 2002-2025 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
23
#ifndef FTPFR_H_
24
#define FTPFR_H_
25
26
#include <
freetype/freetype.h
>
27
28
#ifdef FREETYPE_H
29
#error "freetype.h of FreeType 1 has been loaded!"
30
#error "Please fix the directory search order for header files"
31
#error "so that freetype.h of FreeType 2 is found first."
32
#endif
33
34
35
FT_BEGIN_HEADER
36
37
38
/**************************************************************************
39
*
40
* @section:
41
* pfr_fonts
42
*
43
* @title:
44
* PFR Fonts
45
*
46
* @abstract:
47
* PFR/TrueDoc-specific API.
48
*
49
* @description:
50
* This section contains the declaration of PFR-specific functions.
51
*
52
*/
53
54
55
/**************************************************************************
56
*
57
* @function:
58
* FT_Get_PFR_Metrics
59
*
60
* @description:
61
* Return the outline and metrics resolutions of a given PFR face.
62
*
63
* @input:
64
* face ::
65
* Handle to the input face. It can be a non-PFR face.
66
*
67
* @output:
68
* aoutline_resolution ::
69
* Outline resolution. This is equivalent to `face->units_per_EM` for
70
* non-PFR fonts. Optional (parameter can be `NULL`).
71
*
72
* ametrics_resolution ::
73
* Metrics resolution. This is equivalent to `outline_resolution` for
74
* non-PFR fonts. Optional (parameter can be `NULL`).
75
*
76
* ametrics_x_scale ::
77
* A 16.16 fixed-point number used to scale distance expressed in
78
* metrics units to device subpixels. This is equivalent to
79
* `face->size->x_scale`, but for metrics only. Optional (parameter
80
* can be `NULL`).
81
*
82
* ametrics_y_scale ::
83
* Same as `ametrics_x_scale` but for the vertical direction.
84
* optional (parameter can be `NULL`).
85
*
86
* @return:
87
* FreeType error code. 0~means success.
88
*
89
* @note:
90
* If the input face is not a PFR, this function will return an error.
91
* However, in all cases, it will return valid values.
92
*/
93
FT_EXPORT( FT_Error )
94
FT_Get_PFR_Metrics( FT_Face face,
95
FT_UInt *aoutline_resolution,
96
FT_UInt *ametrics_resolution,
97
FT_Fixed *ametrics_x_scale,
98
FT_Fixed *ametrics_y_scale );
99
100
101
/**************************************************************************
102
*
103
* @function:
104
* FT_Get_PFR_Kerning
105
*
106
* @description:
107
* Return the kerning pair corresponding to two glyphs in a PFR face.
108
* The distance is expressed in metrics units, unlike the result of
109
* @FT_Get_Kerning.
110
*
111
* @input:
112
* face ::
113
* A handle to the input face.
114
*
115
* left ::
116
* Index of the left glyph.
117
*
118
* right ::
119
* Index of the right glyph.
120
*
121
* @output:
122
* avector ::
123
* A kerning vector.
124
*
125
* @return:
126
* FreeType error code. 0~means success.
127
*
128
* @note:
129
* This function always return distances in original PFR metrics units.
130
* This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode,
131
* which always returns distances converted to outline units.
132
*
133
* You can use the value of the `x_scale` and `y_scale` parameters
134
* returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
135
*/
136
FT_EXPORT( FT_Error )
137
FT_Get_PFR_Kerning( FT_Face face,
138
FT_UInt left,
139
FT_UInt right,
140
FT_Vector *avector );
141
142
143
/**************************************************************************
144
*
145
* @function:
146
* FT_Get_PFR_Advance
147
*
148
* @description:
149
* Return a given glyph advance, expressed in original metrics units,
150
* from a PFR font.
151
*
152
* @input:
153
* face ::
154
* A handle to the input face.
155
*
156
* gindex ::
157
* The glyph index.
158
*
159
* @output:
160
* aadvance ::
161
* The glyph advance in metrics units.
162
*
163
* @return:
164
* FreeType error code. 0~means success.
165
*
166
* @note:
167
* You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics
168
* to convert the advance to device subpixels (i.e., 1/64 of pixels).
169
*/
170
FT_EXPORT( FT_Error )
171
FT_Get_PFR_Advance( FT_Face face,
172
FT_UInt gindex,
173
FT_Pos *aadvance );
174
175
/* */
176
177
178
FT_END_HEADER
179
180
#endif
/* FTPFR_H_ */
181
182
183
/* END */
freetype.h
freetype
include
freetype
ftpfr.h
Generated by
1.18.0