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 /***************************************************************************/
19 #include FT_INTERNAL_PFR_H
20 #include FT_INTERNAL_OBJECTS_H
23 /* check the format */
25 ft_pfr_check( FT_Face face,
26 FT_PFR_Service *aservice )
28 FT_Error error = FT_Err_Bad_Argument;
30 if ( face && face->driver )
32 FT_Module module = (FT_Module) face->driver;
33 const char* name = module->clazz->module_name;
35 if ( name[0] == 'p' &&
40 *aservice = (FT_PFR_Service) module->clazz->module_interface;
49 FT_EXPORT_DEF( FT_Error )
50 FT_Get_PFR_Metrics( FT_Face face,
51 FT_UInt *aoutline_resolution,
52 FT_UInt *ametrics_resolution,
53 FT_Fixed *ametrics_x_scale,
54 FT_Fixed *ametrics_y_scale )
57 FT_PFR_Service service;
59 error = ft_pfr_check( face, &service );
62 error = service->get_metrics( face,
71 FT_EXPORT_DEF( FT_Error )
72 FT_Get_PFR_Kerning( FT_Face face,
78 FT_PFR_Service service;
80 error = ft_pfr_check( face, &service );
83 error = service->get_kerning( face, left, right, avector );
89 FT_EXPORT_DEF( FT_Error )
90 FT_Get_PFR_Advance( FT_Face face,
95 FT_PFR_Service service;
97 error = ft_pfr_check( face, &service );
100 error = service->get_advance( face, gindex, aadvance );