4 * Copyright (C) 2011-2012 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
20 TA_table_build_gasp(FT_Byte
** gasp
)
25 buf
= (FT_Byte
*)malloc(GASP_LEN
);
27 return FT_Err_Out_Of_Memory
;
37 /* entry valid for all sizes */
41 buf
[7] = 0x0F; /* always use grayscale rendering with grid-fitting, */
42 /* symmetric grid-fitting and symmetric smoothing */
51 TA_sfnt_build_gasp_table(SFNT
* sfnt
,
59 error
= TA_sfnt_add_table_info(sfnt
);
63 error
= TA_table_build_gasp(&gasp_buf
);
67 /* in case of success, `gasp_buf' gets linked */
68 /* and is eventually freed in `TA_font_unload' */
69 error
= TA_font_add_table(font
,
70 &sfnt
->table_infos
[sfnt
->num_table_infos
- 1],
71 TTAG_gasp
, GASP_LEN
, gasp_buf
);