Lines Matching refs:ft_face
71 FT_Face ft_face; member
77 _hb_ft_font_create (FT_Face ft_face, bool unref) in _hb_ft_font_create() argument
84 ft_font->ft_face = ft_face; in _hb_ft_font_create()
96 FT_Done_Face (ft_font->ft_face); in _hb_ft_font_destroy()
152 return ft_font->ft_face; in hb_ft_font_get_face()
165 unsigned int g = FT_Get_Char_Index (ft_font->ft_face, unicode); in hb_ft_get_nominal_glyph()
183 unsigned int g = FT_Face_GetCharVariantIndex (ft_font->ft_face, unicode, variation_selector); in hb_ft_get_variation_glyph()
201 if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags, &v))) in hb_ft_get_glyph_h_advance()
219 …if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags | FT_LOAD_VERTICAL_LAYO… in hb_ft_get_glyph_v_advance()
239 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_v_origin() local
241 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_v_origin()
246 *x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX; in hb_ft_get_glyph_v_origin()
247 *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY); in hb_ft_get_glyph_v_origin()
268 if (FT_Get_Kerning (ft_font->ft_face, left_glyph, right_glyph, mode, &kerningv)) in hb_ft_get_glyph_h_kerning()
282 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_extents() local
284 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_extents()
287 extents->x_bearing = ft_face->glyph->metrics.horiBearingX; in hb_ft_get_glyph_extents()
288 extents->y_bearing = ft_face->glyph->metrics.horiBearingY; in hb_ft_get_glyph_extents()
289 extents->width = ft_face->glyph->metrics.width; in hb_ft_get_glyph_extents()
290 extents->height = -ft_face->glyph->metrics.height; in hb_ft_get_glyph_extents()
314 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_contour_point() local
316 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_contour_point()
319 if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE)) in hb_ft_get_glyph_contour_point()
322 if (unlikely (point_index >= (unsigned int) ft_face->glyph->outline.n_points)) in hb_ft_get_glyph_contour_point()
325 *x = ft_face->glyph->outline.points[point_index].x; in hb_ft_get_glyph_contour_point()
326 *y = ft_face->glyph->outline.points[point_index].y; in hb_ft_get_glyph_contour_point()
340 hb_bool_t ret = !FT_Get_Glyph_Name (ft_font->ft_face, glyph, name, size); in hb_ft_get_glyph_name()
355 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_from_name() local
358 *glyph = FT_Get_Name_Index (ft_face, (FT_String *) name); in hb_ft_get_glyph_from_name()
365 *glyph = FT_Get_Name_Index (ft_face, buf); in hb_ft_get_glyph_from_name()
372 if (!FT_Get_Glyph_Name(ft_face, 0, buf, sizeof (buf)) && in hb_ft_get_glyph_from_name()
387 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_font_h_extents() local
388 metrics->ascender = ft_face->size->metrics.ascender; in hb_ft_get_font_h_extents()
389 metrics->descender = ft_face->size->metrics.descender; in hb_ft_get_font_h_extents()
390 …metrics->line_gap = ft_face->size->metrics.height - (ft_face->size->metrics.ascender - ft_face->si… in hb_ft_get_font_h_extents()
411 _hb_ft_font_set_funcs (hb_font_t *font, FT_Face ft_face, bool unref) in _hb_ft_font_set_funcs() argument
449 _hb_ft_font_create (ft_face, unref), in _hb_ft_font_set_funcs()
457 FT_Face ft_face = (FT_Face) user_data; in reference_table() local
464 error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length); in reference_table()
472 error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length); in reference_table()
492 hb_ft_face_create (FT_Face ft_face, in hb_ft_face_create() argument
497 if (ft_face->stream->read == NULL) { in hb_ft_face_create()
500 blob = hb_blob_create ((const char *) ft_face->stream->base, in hb_ft_face_create()
501 (unsigned int) ft_face->stream->size, in hb_ft_face_create()
503 ft_face, destroy); in hb_ft_face_create()
504 face = hb_face_create (blob, ft_face->face_index); in hb_ft_face_create()
507 face = hb_face_create_for_tables (reference_table, ft_face, destroy); in hb_ft_face_create()
510 hb_face_set_index (face, ft_face->face_index); in hb_ft_face_create()
511 hb_face_set_upem (face, ft_face->units_per_EM); in hb_ft_face_create()
526 hb_ft_face_create_referenced (FT_Face ft_face) in hb_ft_face_create_referenced() argument
528 FT_Reference_Face (ft_face); in hb_ft_face_create_referenced()
529 return hb_ft_face_create (ft_face, (hb_destroy_func_t) FT_Done_Face); in hb_ft_face_create_referenced()
533 hb_ft_face_finalize (FT_Face ft_face) in hb_ft_face_finalize() argument
535 hb_face_destroy ((hb_face_t *) ft_face->generic.data); in hb_ft_face_finalize()
548 hb_ft_face_create_cached (FT_Face ft_face) in hb_ft_face_create_cached() argument
550 …if (unlikely (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft… in hb_ft_face_create_cached()
552 if (ft_face->generic.finalizer) in hb_ft_face_create_cached()
553 ft_face->generic.finalizer (ft_face); in hb_ft_face_create_cached()
555 ft_face->generic.data = hb_ft_face_create (ft_face, NULL); in hb_ft_face_create_cached()
556 ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize; in hb_ft_face_create_cached()
559 return hb_face_reference ((hb_face_t *) ft_face->generic.data); in hb_ft_face_create_cached()
574 hb_ft_font_create (FT_Face ft_face, in hb_ft_font_create() argument
580 face = hb_ft_face_create (ft_face, destroy); in hb_ft_font_create()
583 _hb_ft_font_set_funcs (font, ft_face, false); in hb_ft_font_create()
585 …(int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >>… in hb_ft_font_create()
586 …(int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >>… in hb_ft_font_create()
589 ft_face->size->metrics.x_ppem, in hb_ft_font_create()
590 ft_face->size->metrics.y_ppem); in hb_ft_font_create()
606 hb_ft_font_create_referenced (FT_Face ft_face) in hb_ft_font_create_referenced() argument
608 FT_Reference_Face (ft_face); in hb_ft_font_create_referenced()
609 return hb_ft_font_create (ft_face, (hb_destroy_func_t) FT_Done_Face); in hb_ft_font_create_referenced()
651 _release_blob (FT_Face ft_face) in _release_blob() argument
653 hb_blob_destroy ((hb_blob_t *) ft_face->generic.data); in _release_blob()
665 FT_Face ft_face = NULL; in hb_ft_font_set_funcs() local
670 &ft_face); in hb_ft_font_set_funcs()
678 FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE); in hb_ft_font_set_funcs()
680 FT_Set_Char_Size (ft_face, in hb_ft_font_set_funcs()
691 FT_Set_Transform (ft_face, &matrix, NULL); in hb_ft_font_set_funcs()
694 ft_face->generic.data = blob; in hb_ft_font_set_funcs()
695 ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; in hb_ft_font_set_funcs()
697 _hb_ft_font_set_funcs (font, ft_face, true); in hb_ft_font_set_funcs()