ReactOS 0.4.16-dev-2357-g35d0dfe
ftpfr.h File Reference
Include dependency graph for ftpfr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FT_BEGIN_HEADER FT_Get_PFR_Metrics (FT_Face face, FT_UInt *aoutline_resolution, FT_UInt *ametrics_resolution, FT_Fixed *ametrics_x_scale, FT_Fixed *ametrics_y_scale)
 
 FT_Get_PFR_Kerning (FT_Face face, FT_UInt left, FT_UInt right, FT_Vector *avector)
 
 FT_Get_PFR_Advance (FT_Face face, FT_UInt gindex, FT_Pos *aadvance)
 

Function Documentation

◆ FT_Get_PFR_Advance()

FT_Get_PFR_Advance ( FT_Face  face,
FT_UInt  gindex,
FT_Pos aadvance 
)

Definition at line 127 of file ftpfr.c.

130 {
132 FT_Service_PfrMetrics service;
133
134
135 if ( !face )
136 return FT_THROW( Invalid_Face_Handle );
137
138 if ( !aadvance )
139 return FT_THROW( Invalid_Argument );
140
141 service = ft_pfr_check( face );
142 if ( service )
143 error = service->get_advance( face, gindex, aadvance );
144 else
145 /* XXX: TODO: PROVIDE ADVANCE-LOADING METHOD TO ALL FONT DRIVERS */
146 error = FT_THROW( Invalid_Argument );
147
148 return error;
149 }
#define FT_THROW(e)
Definition: ftdebug.h:243
static FT_Service_PfrMetrics ft_pfr_check(FT_Face face)
Definition: ftpfr.c:26
int FT_Error
Definition: fttypes.h:299
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define error(str)
Definition: mkdosfs.c:1605

◆ FT_Get_PFR_Kerning()

FT_Get_PFR_Kerning ( FT_Face  face,
FT_UInt  left,
FT_UInt  right,
FT_Vector avector 
)

Definition at line 98 of file ftpfr.c.

102 {
104 FT_Service_PfrMetrics service;
105
106
107 if ( !face )
108 return FT_THROW( Invalid_Face_Handle );
109
110 if ( !avector )
111 return FT_THROW( Invalid_Argument );
112
113 service = ft_pfr_check( face );
114 if ( service )
115 error = service->get_kerning( face, left, right, avector );
116 else
118 FT_KERNING_UNSCALED, avector );
119
120 return error;
121 }
FT_Get_Kerning(FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning)
Definition: ftobjs.c:3411
@ FT_KERNING_UNSCALED
Definition: freetype.h:3408
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726

◆ FT_Get_PFR_Metrics()

FT_BEGIN_HEADER FT_Get_PFR_Metrics ( FT_Face  face,
FT_UInt aoutline_resolution,
FT_UInt ametrics_resolution,
FT_Fixed ametrics_x_scale,
FT_Fixed ametrics_y_scale 
)

Definition at line 41 of file ftpfr.c.

46 {
48 FT_Service_PfrMetrics service;
49
50
51 if ( !face )
52 return FT_THROW( Invalid_Face_Handle );
53
54 service = ft_pfr_check( face );
55 if ( service )
56 {
57 error = service->get_metrics( face,
58 aoutline_resolution,
59 ametrics_resolution,
60 ametrics_x_scale,
61 ametrics_y_scale );
62 }
63 else
64 {
65 FT_Fixed x_scale, y_scale;
66
67
68 /* this is not a PFR font */
69 if ( aoutline_resolution )
70 *aoutline_resolution = face->units_per_EM;
71
72 if ( ametrics_resolution )
73 *ametrics_resolution = face->units_per_EM;
74
75 x_scale = y_scale = 0x10000L;
76 if ( face->size )
77 {
78 x_scale = face->size->metrics.x_scale;
79 y_scale = face->size->metrics.y_scale;
80 }
81
82 if ( ametrics_x_scale )
83 *ametrics_x_scale = x_scale;
84
85 if ( ametrics_y_scale )
86 *ametrics_y_scale = y_scale;
87
88 error = FT_THROW( Unknown_File_Format );
89 }
90
91 return error;
92 }
return FT_Err_Ok
Definition: ftbbox.c:526
signed long FT_Fixed
Definition: fttypes.h:287