Home | History | Annotate | Download | only in src

Lines Matching full:font

33 #include "hb-font-private.hh"
50 hb_font_get_glyph_nil (hb_font_t *font,
57 if (font->parent)
58 return font->parent->get_glyph (unicode, variation_selector, glyph);
65 hb_font_get_glyph_h_advance_nil (hb_font_t *font,
70 if (font->parent)
71 return font->parent_scale_x_distance (font->parent->get_glyph_h_advance (glyph));
73 return font->x_scale;
77 hb_font_get_glyph_v_advance_nil (hb_font_t *font,
82 if (font->parent)
83 return font->parent_scale_y_distance (font->parent->get_glyph_v_advance (glyph));
85 return font->y_scale;
89 hb_font_get_glyph_h_origin_nil (hb_font_t *font,
96 if (font->parent) {
97 hb_bool_t ret = font->parent->get_glyph_h_origin (glyph, x, y);
99 font->parent_scale_position (x, y);
108 hb_font_get_glyph_v_origin_nil (hb_font_t *font,
115 if (font->parent) {
116 hb_bool_t ret = font->parent->get_glyph_v_origin (glyph, x, y);
118 font->parent_scale_position (x, y);
127 hb_font_get_glyph_h_kerning_nil (hb_font_t *font,
133 if (font->parent)
134 return font->parent_scale_x_distance (font->parent->get_glyph_h_kerning (left_glyph, right_glyph));
140 hb_font_get_glyph_v_kerning_nil (hb_font_t *font,
146 if (font->parent)
147 return font->parent_scale_y_distance (font->parent->get_glyph_v_kerning (top_glyph, bottom_glyph));
153 hb_font_get_glyph_extents_nil (hb_font_t *font,
159 if (font->parent) {
160 hb_bool_t ret = font->parent->get_glyph_extents (glyph, extents);
162 font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
163 font->parent_scale_distance (&extents->width, &extents->height);
173 hb_font_get_glyph_contour_point_nil (hb_font_t *font,
181 if (font->parent) {
182 hb_bool_t ret = font->parent->get_glyph_contour_point (glyph, point_index, x, y);
184 font->parent_scale_position (x, y);
193 hb_font_get_glyph_name_nil (hb_font_t *font,
199 if (font->parent)
200 return font->parent->get_glyph_name (glyph, name, size);
207 hb_font_get_glyph_from_name_nil (hb_font_t *font,
213 if (font->parent)
214 return font->parent->get_glyph_from_name (name, len, glyph);
341 hb_font_get_glyph (hb_font_t *font,
345 return font->get_glyph (unicode, variation_selector, glyph);
349 hb_font_get_glyph_h_advance (hb_font_t *font,
352 return font->get_glyph_h_advance (glyph);
356 hb_font_get_glyph_v_advance (hb_font_t *font,
359 return font->get_glyph_v_advance (glyph);
363 hb_font_get_glyph_h_origin (hb_font_t *font,
367 return font->get_glyph_h_origin (glyph, x, y);
371 hb_font_get_glyph_v_origin (hb_font_t *font,
375 return font->get_glyph_v_origin (glyph, x, y);
379 hb_font_get_glyph_h_kerning (hb_font_t *font,
382 return font->get_glyph_h_kerning (left_glyph, right_glyph);
386 hb_font_get_glyph_v_kerning (hb_font_t *font,
389 return font->get_glyph_v_kerning (left_glyph, right_glyph);
393 hb_font_get_glyph_extents (hb_font_t *font,
397 return font->get_glyph_extents (glyph, extents);
401 hb_font_get_glyph_contour_point (hb_font_t *font,
405 return font->get_glyph_contour_point (glyph, point_index, x, y);
409 hb_font_get_glyph_name (hb_font_t *font,
413 return font->get_glyph_name (glyph, name, size);
417 hb_font_get_glyph_from_name (hb_font_t *font,
421 return font->get_glyph_from_name (name, len, glyph);
428 hb_font_get_glyph_advance_for_direction (hb_font_t *font,
433 return font->get_glyph_advance_for_direction (glyph, direction, x, y);
437 hb_font_get_glyph_origin_for_direction (hb_font_t *font,
442 return font->get_glyph_origin_for_direction (glyph, direction, x, y);
446 hb_font_add_glyph_origin_for_direction (hb_font_t *font,
451 return font->add_glyph_origin_for_direction (glyph, direction, x, y);
455 hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
460 return font->subtract_glyph_origin_for_direction (glyph, direction, x, y);
464 hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
469 return font->get_glyph_kerning_for_direction (first_glyph, second_glyph, direction, x, y);
473 hb_font_get_glyph_extents_for_origin (hb_font_t *font,
478 return font->get_glyph_extents_for_origin (glyph, direction, extents);
482 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
487 return font->get_glyph_contour_point_for_origin (glyph, point_index, direction, x, y);
492 hb_font_glyph_to_string (hb_font_t *font,
496 font->glyph_to_string (glyph, s, size);
501 hb_font_glyph_from_string (hb_font_t *font,
505 return font->glyph_from_string (s, len, glyph);
784 hb_font_t *font;
790 if (!(font = hb_object_create<hb_font_t> ()))
794 font->face = hb_face_reference (face);
795 font->klass = hb_font_funcs_get_empty ();
797 return font;
806 hb_font_t *font = hb_font_create (parent->face);
808 if (unlikely (hb_object_is_inert (font)))
809 return font;
812 font->parent = hb_font_reference (parent);
814 font->x_scale = parent->x_scale;
815 font->y_scale = parent->y_scale;
816 font->x_ppem = parent->x_ppem;
817 font->y_ppem = parent->y_ppem;
819 return font;
854 hb_font_reference (hb_font_t *font)
856 return hb_object_reference (font);
860 hb_font_destroy (hb_font_t *font)
862 if (!hb_object_destroy (font)) return;
864 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_DESTROY(shaper, font);
868 if (font->destroy)
869 font->destroy (font->user_data);
871 hb_font_destroy (font->parent);
872 hb_face_destroy (font->face);
873 hb_font_funcs_destroy (font->klass);
875 free (font);
879 hb_font_set_user_data (hb_font_t *font,
885 return hb_object_set_user_data (font, key, data, destroy, replace);
889 hb_font_get_user_data (hb_font_t *font,
892 return hb_object_get_user_data (font, key);
896 hb_font_make_immutable (hb_font_t *font)
898 if (hb_object_is_inert (font))
901 font->immutable = true;
905 hb_font_is_immutable (hb_font_t *font)
907 return font->immutable;
911 hb_font_get_parent (hb_font_t *font)
913 return font->parent;
917 hb_font_get_face (hb_font_t *font)
919 return font->face;
924 hb_font_set_funcs (hb_font_t *font,
929 if (font->immutable) {
935 if (font->destroy)
936 font->destroy (font->user_data);
942 hb_font_funcs_destroy (font->klass);
943 font->klass = klass;
944 font->user_data = user_data;
945 font->destroy = destroy;
949 hb_font_set_funcs_data (hb_font_t *font,
954 if (font->immutable) {
960 if (font->destroy)
961 font->destroy (font->user_data);
963 font->user_data = user_data;
964 font->destroy = destroy;
969 hb_font_set_scale (hb_font_t *font,
973 if (font->immutable)
976 font->x_scale = x_scale;
977 font->y_scale = y_scale;
981 hb_font_get_scale (hb_font_t *font,
985 if (x_scale) *x_scale = font->x_scale;
986 if (y_scale) *y_scale = font->y_scale;
990 hb_font_set_ppem (hb_font_t *font,
994 if (font->immutable)
997 font->x_ppem = x_ppem;
998 font->y_ppem = y_ppem;
1002 hb_font_get_ppem (hb_font_t *font,
1006 if (x_ppem) *x_ppem = font->x_ppem;
1007 if (y_ppem) *y_ppem = font->y_ppem;