Lines Matching refs:ft_face
74 FT_Face ft_face; member
81 _hb_ft_font_create (FT_Face ft_face, bool symbol, bool unref) in _hb_ft_font_create() argument
88 ft_font->ft_face = ft_face; in _hb_ft_font_create()
98 _hb_ft_face_destroy (FT_Face ft_face) in _hb_ft_face_destroy() argument
100 FT_Done_Face (ft_face); in _hb_ft_face_destroy()
107 _hb_ft_face_destroy (ft_font->ft_face); in _hb_ft_font_destroy()
163 return ft_font->ft_face; in hb_ft_font_get_face()
176 unsigned int g = FT_Get_Char_Index (ft_font->ft_face, unicode); in hb_ft_get_nominal_glyph()
187 g = FT_Get_Char_Index (ft_font->ft_face, 0xF000u + unicode); in hb_ft_get_nominal_glyph()
208 unsigned int g = FT_Face_GetCharVariantIndex (ft_font->ft_face, unicode, variation_selector); in hb_ft_get_variation_glyph()
226 if (unlikely (FT_Get_Advance (ft_font->ft_face, glyph, ft_font->load_flags, &v))) in hb_ft_get_glyph_h_advance()
244 …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()
264 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_v_origin() local
266 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_v_origin()
271 *x = ft_face->glyph->metrics.horiBearingX - ft_face->glyph->metrics.vertBearingX; in hb_ft_get_glyph_v_origin()
272 *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY); in hb_ft_get_glyph_v_origin()
293 if (FT_Get_Kerning (ft_font->ft_face, left_glyph, right_glyph, mode, &kerningv)) in hb_ft_get_glyph_h_kerning()
307 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_extents() local
309 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_extents()
312 extents->x_bearing = ft_face->glyph->metrics.horiBearingX; in hb_ft_get_glyph_extents()
313 extents->y_bearing = ft_face->glyph->metrics.horiBearingY; in hb_ft_get_glyph_extents()
314 extents->width = ft_face->glyph->metrics.width; in hb_ft_get_glyph_extents()
315 extents->height = -ft_face->glyph->metrics.height; in hb_ft_get_glyph_extents()
339 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_contour_point() local
341 if (unlikely (FT_Load_Glyph (ft_face, glyph, ft_font->load_flags))) in hb_ft_get_glyph_contour_point()
344 if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE)) in hb_ft_get_glyph_contour_point()
347 if (unlikely (point_index >= (unsigned int) ft_face->glyph->outline.n_points)) in hb_ft_get_glyph_contour_point()
350 *x = ft_face->glyph->outline.points[point_index].x; in hb_ft_get_glyph_contour_point()
351 *y = ft_face->glyph->outline.points[point_index].y; in hb_ft_get_glyph_contour_point()
365 hb_bool_t ret = !FT_Get_Glyph_Name (ft_font->ft_face, glyph, name, size); in hb_ft_get_glyph_name()
380 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_glyph_from_name() local
383 *glyph = FT_Get_Name_Index (ft_face, (FT_String *) name); in hb_ft_get_glyph_from_name()
390 *glyph = FT_Get_Name_Index (ft_face, buf); in hb_ft_get_glyph_from_name()
397 if (!FT_Get_Glyph_Name(ft_face, 0, buf, sizeof (buf)) && in hb_ft_get_glyph_from_name()
412 FT_Face ft_face = ft_font->ft_face; in hb_ft_get_font_h_extents() local
413 metrics->ascender = ft_face->size->metrics.ascender; in hb_ft_get_font_h_extents()
414 metrics->descender = ft_face->size->metrics.descender; in hb_ft_get_font_h_extents()
415 …metrics->line_gap = ft_face->size->metrics.height - (ft_face->size->metrics.ascender - ft_face->si… in hb_ft_get_font_h_extents()
436 _hb_ft_font_set_funcs (hb_font_t *font, FT_Face ft_face, bool unref) in _hb_ft_font_set_funcs() argument
472 bool symbol = ft_face->charmap && ft_face->charmap->encoding == FT_ENCODING_MS_SYMBOL; in _hb_ft_font_set_funcs()
476 _hb_ft_font_create (ft_face, symbol, unref), in _hb_ft_font_set_funcs()
484 FT_Face ft_face = (FT_Face) user_data; in reference_table() local
491 error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length); in reference_table()
499 error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length); in reference_table()
519 hb_ft_face_create (FT_Face ft_face, in hb_ft_face_create() argument
524 if (ft_face->stream->read == NULL) { in hb_ft_face_create()
527 blob = hb_blob_create ((const char *) ft_face->stream->base, in hb_ft_face_create()
528 (unsigned int) ft_face->stream->size, in hb_ft_face_create()
530 ft_face, destroy); in hb_ft_face_create()
531 face = hb_face_create (blob, ft_face->face_index); in hb_ft_face_create()
534 face = hb_face_create_for_tables (reference_table, ft_face, destroy); in hb_ft_face_create()
537 hb_face_set_index (face, ft_face->face_index); in hb_ft_face_create()
538 hb_face_set_upem (face, ft_face->units_per_EM); in hb_ft_face_create()
553 hb_ft_face_create_referenced (FT_Face ft_face) in hb_ft_face_create_referenced() argument
555 FT_Reference_Face (ft_face); in hb_ft_face_create_referenced()
556 return hb_ft_face_create (ft_face, (hb_destroy_func_t) _hb_ft_face_destroy); in hb_ft_face_create_referenced()
560 hb_ft_face_finalize (FT_Face ft_face) in hb_ft_face_finalize() argument
562 hb_face_destroy ((hb_face_t *) ft_face->generic.data); in hb_ft_face_finalize()
575 hb_ft_face_create_cached (FT_Face ft_face) in hb_ft_face_create_cached() argument
577 …if (unlikely (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft… in hb_ft_face_create_cached()
579 if (ft_face->generic.finalizer) in hb_ft_face_create_cached()
580 ft_face->generic.finalizer (ft_face); in hb_ft_face_create_cached()
582 ft_face->generic.data = hb_ft_face_create (ft_face, NULL); in hb_ft_face_create_cached()
583 ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize; in hb_ft_face_create_cached()
586 return hb_face_reference ((hb_face_t *) ft_face->generic.data); in hb_ft_face_create_cached()
601 hb_ft_font_create (FT_Face ft_face, in hb_ft_font_create() argument
607 face = hb_ft_face_create (ft_face, destroy); in hb_ft_font_create()
610 _hb_ft_font_set_funcs (font, ft_face, false); in hb_ft_font_create()
612 …(int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1u<<15)) >… in hb_ft_font_create()
613 …(int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1u<<15)) >… in hb_ft_font_create()
616 ft_face->size->metrics.x_ppem, in hb_ft_font_create()
617 ft_face->size->metrics.y_ppem); in hb_ft_font_create()
622 if (!FT_Get_MM_Var (ft_face, &mm_var)) in hb_ft_font_create()
628 if (!FT_Get_Var_Blend_Coordinates (ft_face, mm_var->num_axis, ft_coords)) in hb_ft_font_create()
655 hb_ft_font_create_referenced (FT_Face ft_face) in hb_ft_font_create_referenced() argument
657 FT_Reference_Face (ft_face); in hb_ft_font_create_referenced()
658 return hb_ft_font_create (ft_face, (hb_destroy_func_t) _hb_ft_face_destroy); in hb_ft_font_create_referenced()
700 _release_blob (FT_Face ft_face) in _release_blob() argument
702 hb_blob_destroy ((hb_blob_t *) ft_face->generic.data); in _release_blob()
714 FT_Face ft_face = NULL; in hb_ft_font_set_funcs() local
719 &ft_face); in hb_ft_font_set_funcs()
727 if (FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE)) in hb_ft_font_set_funcs()
728 FT_Select_Charmap (ft_face, FT_ENCODING_MS_SYMBOL); in hb_ft_font_set_funcs()
730 FT_Set_Char_Size (ft_face, in hb_ft_font_set_funcs()
741 FT_Set_Transform (ft_face, &matrix, NULL); in hb_ft_font_set_funcs()
753 FT_Set_Var_Blend_Coordinates (ft_face, num_coords, ft_coords); in hb_ft_font_set_funcs()
758 ft_face->generic.data = blob; in hb_ft_font_set_funcs()
759 ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob; in hb_ft_font_set_funcs()
761 _hb_ft_font_set_funcs (font, ft_face, true); in hb_ft_font_set_funcs()