2 * Copyright © 2022 Red Hat, Inc.
4 * This is part of HarfBuzz, a text shaping library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Red Hat Author(s): Matthias Clasen
36 HB_EXTERN cairo_font_face_t
*
37 hb_cairo_font_face_create_for_font (hb_font_t
*font
);
40 hb_cairo_font_face_get_font (cairo_font_face_t
*font_face
);
42 HB_EXTERN cairo_font_face_t
*
43 hb_cairo_font_face_create_for_face (hb_face_t
*face
);
46 hb_cairo_font_face_get_face (cairo_font_face_t
*font_face
);
49 * hb_cairo_font_init_func_t:
50 * @font: The #hb_font_t being created
51 * @scaled_font: The respective #cairo_scaled_font_t
52 * @user_data: User data accompanying this method
54 * The type of a virtual method to be called when a cairo
55 * face created using hb_cairo_font_face_create_for_face()
56 * creates an #hb_font_t for a #cairo_scaled_font_t.
58 * Return value: the #hb_font_t value to use; in most cases same as @font
62 typedef hb_font_t
* (*hb_cairo_font_init_func_t
) (hb_font_t
*font
,
63 cairo_scaled_font_t
*scaled_font
,
67 hb_cairo_font_face_set_font_init_func (cairo_font_face_t
*font_face
,
68 hb_cairo_font_init_func_t func
,
70 hb_destroy_func_t destroy
);
73 hb_cairo_scaled_font_get_font (cairo_scaled_font_t
*scaled_font
);
76 hb_cairo_font_face_set_scale_factor (cairo_font_face_t
*font_face
,
77 unsigned int scale_factor
);
79 HB_EXTERN
unsigned int
80 hb_cairo_font_face_get_scale_factor (cairo_font_face_t
*font_face
);
83 hb_cairo_glyphs_from_buffer (hb_buffer_t
*buffer
,
84 hb_bool_t utf8_clusters
,
85 double x_scale_factor
,
86 double y_scale_factor
,
91 cairo_glyph_t
**glyphs
,
92 unsigned int *num_glyphs
,
93 cairo_text_cluster_t
**clusters
,
94 unsigned int *num_clusters
,
95 cairo_text_cluster_flags_t
*cluster_flags
);
99 #endif /* HB_CAIRO_H */