|
|
|
@ -4,7 +4,7 @@ |
|
|
|
|
/* */ |
|
|
|
|
/* FreeType API for accessing PFR-specific data (body). */ |
|
|
|
|
/* */ |
|
|
|
|
/* Copyright 2002, 2003, 2004 by */ |
|
|
|
|
/* Copyright 2002, 2003, 2004, 2008 by */ |
|
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
|
|
|
|
/* */ |
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */ |
|
|
|
@ -46,6 +46,9 @@ |
|
|
|
|
FT_Service_PfrMetrics service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( !face ) |
|
|
|
|
return FT_Err_Invalid_Argument; |
|
|
|
|
|
|
|
|
|
service = ft_pfr_check( face ); |
|
|
|
|
if ( service ) |
|
|
|
|
{ |
|
|
|
@ -55,14 +58,17 @@ |
|
|
|
|
ametrics_x_scale, |
|
|
|
|
ametrics_y_scale ); |
|
|
|
|
} |
|
|
|
|
else if ( face ) |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
FT_Fixed x_scale, y_scale; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* this is not a PFR font */ |
|
|
|
|
*aoutline_resolution = face->units_per_EM; |
|
|
|
|
*ametrics_resolution = face->units_per_EM; |
|
|
|
|
if ( aoutline_resolution ) |
|
|
|
|
*aoutline_resolution = face->units_per_EM; |
|
|
|
|
|
|
|
|
|
if ( ametrics_resolution ) |
|
|
|
|
*ametrics_resolution = face->units_per_EM; |
|
|
|
|
|
|
|
|
|
x_scale = y_scale = 0x10000L; |
|
|
|
|
if ( face->size ) |
|
|
|
@ -70,11 +76,15 @@ |
|
|
|
|
x_scale = face->size->metrics.x_scale; |
|
|
|
|
y_scale = face->size->metrics.y_scale; |
|
|
|
|
} |
|
|
|
|
*ametrics_x_scale = x_scale; |
|
|
|
|
*ametrics_y_scale = y_scale; |
|
|
|
|
|
|
|
|
|
if ( ametrics_x_scale ) |
|
|
|
|
*ametrics_x_scale = x_scale; |
|
|
|
|
|
|
|
|
|
if ( ametrics_y_scale ) |
|
|
|
|
*ametrics_y_scale = y_scale; |
|
|
|
|
|
|
|
|
|
error = FT_Err_Unknown_File_Format; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
error = FT_Err_Invalid_Argument; |
|
|
|
|
|
|
|
|
|
return error; |
|
|
|
|
} |
|
|
|
@ -92,14 +102,15 @@ |
|
|
|
|
FT_Service_PfrMetrics service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( !face ) |
|
|
|
|
return FT_Err_Invalid_Argument; |
|
|
|
|
|
|
|
|
|
service = ft_pfr_check( face ); |
|
|
|
|
if ( service ) |
|
|
|
|
error = service->get_kerning( face, left, right, avector ); |
|
|
|
|
else if ( face ) |
|
|
|
|
else |
|
|
|
|
error = FT_Get_Kerning( face, left, right, |
|
|
|
|
FT_KERNING_UNSCALED, avector ); |
|
|
|
|
else |
|
|
|
|
error = FT_Err_Invalid_Argument; |
|
|
|
|
|
|
|
|
|
return error; |
|
|
|
|
} |
|
|
|
|