42 #define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \
43 HB_FONT_FUNC_IMPLEMENT (font_h_extents) \
44 HB_FONT_FUNC_IMPLEMENT (font_v_extents) \
45 HB_FONT_FUNC_IMPLEMENT (nominal_glyph) \
46 HB_FONT_FUNC_IMPLEMENT (nominal_glyphs) \
47 HB_FONT_FUNC_IMPLEMENT (variation_glyph) \
48 HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \
49 HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \
50 HB_FONT_FUNC_IMPLEMENT (glyph_h_advances) \
51 HB_FONT_FUNC_IMPLEMENT (glyph_v_advances) \
52 HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
53 HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
54 HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
55 HB_IF_NOT_DEPRECATED (HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning)) \
56 HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
57 HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \
58 HB_FONT_FUNC_IMPLEMENT (glyph_name) \
59 HB_FONT_FUNC_IMPLEMENT (glyph_from_name) \
60 HB_FONT_FUNC_IMPLEMENT (glyph_shape) \
68 #define HB_FONT_FUNC_IMPLEMENT(name) void *name;
70 #undef HB_FONT_FUNC_IMPLEMENT
74 #define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
76 #undef HB_FONT_FUNC_IMPLEMENT
82 #define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
84 #undef HB_FONT_FUNC_IMPLEMENT
100 #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INSTANTIATE_SHAPERS(shaper, font);
102 #undef HB_SHAPER_IMPLEMENT
185 #define HB_FONT_FUNC_IMPLEMENT(name) \
187 has_##name##_func () \
189 hb_font_funcs_t *funcs = this->klass; \
190 unsigned int i = offsetof (hb_font_funcs_t::get_t::get_funcs_t, name) / sizeof (funcs->get.array[0]); \
191 return has_func (i); \
194 has_##name##_func_set () \
196 hb_font_funcs_t *funcs = this->klass; \
197 unsigned int i = offsetof (hb_font_funcs_t::get_t::get_funcs_t, name) / sizeof (funcs->get.array[0]); \
198 return has_func_set (i); \
201 #undef HB_FONT_FUNC_IMPLEMENT
205 memset (extents, 0,
sizeof (*extents));
212 memset (extents, 0,
sizeof (*extents));
235 unsigned int unicode_stride,
237 unsigned int glyph_stride)
241 first_unicode, unicode_stride,
242 first_glyph, glyph_stride,
252 unicode, variation_selector, glyph,
272 unsigned int glyph_stride,
274 unsigned int advance_stride)
278 first_glyph, glyph_stride,
279 first_advance, advance_stride,
285 unsigned int glyph_stride,
287 unsigned int advance_stride)
291 first_glyph, glyph_stride,
292 first_advance, advance_stride,
317 #ifdef HB_DISABLE_DEPRECATED
329 #ifdef HB_DISABLE_DEPRECATED
333 top_glyph, bottom_glyph,
341 memset (extents, 0,
sizeof (*extents));
384 draw_funcs, draw_data,
432 unsigned glyph_stride,
434 unsigned advance_stride)
590 char *
s,
unsigned int size)
594 if (
size && snprintf (
s,
size,
"gid%u", glyph) < 0)
608 if (hb_codepoint_parse (
s,
len, 10, glyph))
615 hb_codepoint_parse (
s + 3,
len - 3, 10, glyph))
621 hb_codepoint_parse (
s + 3,
len - 3, 16, &unichar) &&
631 signed upem =
face->get_upem ();
644 {
return (
float)
v *
scale /
face->get_upem (); }
small capitals from c petite p scientific i
[1]
#define HB_FONT_FUNC_IMPLEMENT(name)
DECLARE_NULL_INSTANCE(hb_font_funcs_t)
#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
int PRIV() strncmp(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len)
PCRE2_SIZE PRIV() strlen(PCRE2_SPTR str)
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLenum GLenum GLenum GLenum GLenum scale
void(* hb_destroy_func_t)(void *user_data)
HB_BEGIN_DECLS typedef int hb_bool_t
#define HB_DIRECTION_IS_VERTICAL(dir)
#define HB_DIRECTION_IS_HORIZONTAL(dir)
hb_object_header_t header
union hb_font_funcs_t::get_t get
struct hb_font_funcs_t::@117 destroy
struct hb_font_funcs_t::@116 user_data
hb_bool_t get_glyph_contour_point_for_origin(hb_codepoint_t glyph, unsigned int point_index, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
hb_position_t em_mult(int16_t v, int64_t mult)
hb_bool_t get_glyph_extents(hb_codepoint_t glyph, hb_glyph_extents_t *extents)
hb_position_t get_glyph_h_advance(hb_codepoint_t glyph)
hb_position_t em_scalef_y(float v)
hb_bool_t get_glyph_v_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
hb_position_t get_glyph_v_advance(hb_codepoint_t glyph)
void get_v_extents_with_fallback(hb_font_extents_t *extents)
hb_position_t parent_scale_y_position(hb_position_t v)
int64_t dir_mult(hb_direction_t direction)
void get_glyph_advances_for_direction(hb_direction_t direction, unsigned int count, const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride)
hb_shaper_object_dataset_t< hb_font_t > data
void get_glyph_h_advances(unsigned int count, const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride)
hb_object_header_t header
void add_glyph_h_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
void get_h_extents_with_fallback(hb_font_extents_t *extents)
bool has_glyph(hb_codepoint_t unicode)
hb_position_t parent_scale_x_distance(hb_position_t v)
hb_position_t em_scale_dir(int16_t v, hb_direction_t direction)
unsigned int get_nominal_glyphs(unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, unsigned int glyph_stride)
void get_extents_for_direction(hb_direction_t direction, hb_font_extents_t *extents)
hb_position_t parent_scale_x_position(hb_position_t v)
hb_position_t em_scalef_x(float v)
void parent_scale_position(hb_position_t *x, hb_position_t *y)
hb_bool_t glyph_from_string(const char *s, int len, hb_codepoint_t *glyph)
hb_bool_t get_glyph_contour_point(hb_codepoint_t glyph, unsigned int point_index, hb_position_t *x, hb_position_t *y)
hb_bool_t get_glyph_h_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
void glyph_to_string(hb_codepoint_t glyph, char *s, unsigned int size)
void subtract_glyph_h_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
void get_glyph_h_origin_with_fallback(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
float em_fscalef_y(float v)
float em_fscale(int16_t v, int scale)
void get_glyph_advance_for_direction(hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
hb_position_t get_glyph_h_kerning(hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
void get_glyph_origin_for_direction(hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
HB_INTERNAL bool has_func(unsigned int i)
hb_bool_t get_nominal_glyph(hb_codepoint_t unicode, hb_codepoint_t *glyph, hb_codepoint_t not_found=0)
void get_glyph_v_advances(unsigned int count, const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride)
void parent_scale_distance(hb_position_t *x, hb_position_t *y)
void guess_v_origin_minus_h_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
hb_position_t em_scale_x(int16_t v)
hb_bool_t get_glyph_name(hb_codepoint_t glyph, char *name, unsigned int size)
hb_position_t parent_scale_y_distance(hb_position_t v)
void add_glyph_origin_for_direction(hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
hb_position_t em_scalef(float v, int scale)
hb_position_t get_glyph_v_kerning(hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph)
HB_INTERNAL bool has_func_set(unsigned int i)
hb_position_t em_scale_y(int16_t v)
hb_destroy_func_t destroy
hb_bool_t get_variation_glyph(hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph, hb_codepoint_t not_found=0)
float em_fscale_y(int16_t v)
hb_bool_t get_glyph_from_name(const char *name, int len, hb_codepoint_t *glyph)
void add_glyph_v_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
float em_fscalef(float v, int scale)
float em_fscale_x(int16_t v)
void subtract_glyph_origin_for_direction(hb_codepoint_t glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
void get_glyph_kerning_for_direction(hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, hb_direction_t direction, hb_position_t *x, hb_position_t *y)
hb_bool_t get_font_v_extents(hb_font_extents_t *extents)
float em_fscalef_x(float v)
void get_glyph_v_origin_with_fallback(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
hb_bool_t get_glyph_extents_for_origin(hb_codepoint_t glyph, hb_direction_t direction, hb_glyph_extents_t *extents)
void get_glyph_shape(hb_codepoint_t glyph, hb_draw_funcs_t *draw_funcs, void *draw_data)
HB_FONT_FUNCS_IMPLEMENT_CALLBACKS hb_bool_t get_font_h_extents(hb_font_extents_t *extents)
void subtract_glyph_v_origin(hb_codepoint_t glyph, hb_position_t *x, hb_position_t *y)
FT_UInt FT_UInt right_glyph
struct hb_font_funcs_t::get_t::get_funcs_t f