1 /*******************************************************************
5 * Gasp table support API extension body
7 * Copyright 1996-1999 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.
17 * The gasp table is currently loaded by the core engine, but the
18 * standard API doesn't give access to it. This file is used to
19 * demonstrate the use of a simple API extension.
21 ******************************************************************/
31 TT_Error
TT_Get_Face_Gasp_Flags( TT_Face face
,
34 TT_Bool
* smooth_font
)
36 PFace faze
= HANDLE_Face( face
);
41 return TT_Err_Invalid_Face_Handle
;
43 if ( faze
->gasp
.numRanges
== 0 || !faze
->gasp
.gaspRanges
)
44 return TT_Err_Table_Missing
;
46 for ( i
= 0; i
< faze
->gasp
.numRanges
; i
++ )
48 if ( point_size
<= faze
->gasp
.gaspRanges
[i
].maxPPEM
)
50 flag
= faze
->gasp
.gaspRanges
[i
].gaspFlag
;
52 *grid_fit
= ( (flag
& GASP_GRIDFIT
) != 0 );
53 *smooth_font
= ( (flag
& GASP_DOGRAY
) != 0 );
59 /* for very large fonts we enable font smoothing and discard */