Lines Matching refs:font_handle

26     GXS_FONT_LIBRARY_HANDLE *font_handle;  in gx_studio_font_util_open()  local
31 font_handle = (GXS_FONT_LIBRARY_HANDLE*)malloc(sizeof(GXS_FONT_LIBRARY_HANDLE)); in gx_studio_font_util_open()
32 if(font_handle == 0) in gx_studio_font_util_open()
35 memset(font_handle, 0, sizeof(GXS_FONT_LIBRARY_HANDLE)); in gx_studio_font_util_open()
37 error = FT_Init_FreeType(&(font_handle -> library)); /* initialize library */ in gx_studio_font_util_open()
40 free(font_handle); in gx_studio_font_util_open()
44 …error = FT_New_Face(font_handle -> library, font_file, 0, &(font_handle -> face) );/* create face … in gx_studio_font_util_open()
47 FT_Done_FreeType( font_handle -> library ); in gx_studio_font_util_open()
48 free(font_handle); in gx_studio_font_util_open()
52 font_handle -> size = 0; in gx_studio_font_util_open()
53 font_handle -> initialized = 1; in gx_studio_font_util_open()
55 *handle = font_handle; in gx_studio_font_util_open()
61 int gx_studio_font_util_get_glyph(GXS_FONT_LIBRARY_HANDLE *font_handle, int font_index, int pt, int… in gx_studio_font_util_get_glyph() argument
68 if(font_handle -> initialized != 1) in gx_studio_font_util_get_glyph()
72 if(font_handle -> size != pt) in gx_studio_font_util_get_glyph()
74 error = FT_Set_Char_Size(font_handle -> face, pt * 64, 0, 72, 0); in gx_studio_font_util_get_glyph()
79 font_handle -> size = pt; in gx_studio_font_util_get_glyph()
82 slot = font_handle -> face -> glyph; in gx_studio_font_util_get_glyph()
84 glyph_index = FT_Get_Char_Index(font_handle -> face, font_index); in gx_studio_font_util_get_glyph()
85 error = FT_Load_Glyph(font_handle -> face, glyph_index, 0); in gx_studio_font_util_get_glyph()
87 if(font_handle -> face -> glyph -> format != FT_GLYPH_FORMAT_BITMAP) in gx_studio_font_util_get_glyph()
90 error = FT_Render_Glyph(font_handle -> face -> glyph, FT_RENDER_MODE_NORMAL); in gx_studio_font_util_get_glyph()
92 error = FT_Render_Glyph(font_handle -> face -> glyph, FT_RENDER_MODE_MONO); in gx_studio_font_util_get_glyph()
97 error = FT_Load_Glyph(font_handle->face, glyph_index, FT_LOAD_NO_BITMAP | FT_LOAD_RENDER); in gx_studio_font_util_get_glyph()
100 metrics = &(font_handle -> face -> glyph -> metrics); in gx_studio_font_util_get_glyph()
114 int gx_studio_font_util_get_kerning_info(GXS_FONT_LIBRARY_HANDLE *font_handle, int font_index, in gx_studio_font_util_get_kerning_info() argument
129 if (font_handle->initialized != 1) in gx_studio_font_util_get_kerning_info()
132 if (FT_HAS_KERNING(font_handle->face) == 0) in gx_studio_font_util_get_kerning_info()
153 right_glyph_index = FT_Get_Char_Index(font_handle->face, font_index); in gx_studio_font_util_get_kerning_info()
169 left_glyph_index = FT_Get_Char_Index(font_handle->face, index); in gx_studio_font_util_get_kerning_info()
177 …error = FT_Get_Kerning(font_handle->face, left_glyph_index, right_glyph_index, FT_KERNING_DEFAULT,… in gx_studio_font_util_get_kerning_info()
214 void gx_studio_font_util_close(GXS_FONT_LIBRARY_HANDLE *font_handle) in gx_studio_font_util_close() argument
216 if(!font_handle) in gx_studio_font_util_close()
219 if(font_handle -> initialized == 1) in gx_studio_font_util_close()
222 if(font_handle -> face) in gx_studio_font_util_close()
223 FT_Done_Face(font_handle -> face); in gx_studio_font_util_close()
224 if(font_handle -> library) in gx_studio_font_util_close()
225 FT_Done_FreeType(font_handle -> library); in gx_studio_font_util_close()
228 free(font_handle); in gx_studio_font_util_close()