Add +hb_font_get_glyph_advances_for_direction
New API: +hb_font_get_glyph_advances_for_direction
This commit is contained in:
parent
28e2f467e1
commit
b0ff79acd8
|
@ -225,6 +225,7 @@ hb_font_get_face
|
|||
hb_font_get_glyph
|
||||
hb_font_get_glyph_advance_for_direction
|
||||
hb_font_get_glyph_advance_func_t
|
||||
hb_font_get_glyph_advances_for_direction
|
||||
hb_font_get_glyph_contour_point
|
||||
hb_font_get_glyph_contour_point_for_origin
|
||||
hb_font_get_glyph_contour_point_func_t
|
||||
|
|
|
@ -376,6 +376,18 @@ struct hb_font_t
|
|||
else
|
||||
*y = get_glyph_v_advance (glyph);
|
||||
}
|
||||
inline void get_glyph_advances_for_direction (hb_direction_t direction,
|
||||
unsigned count,
|
||||
hb_codepoint_t *first_glyph,
|
||||
unsigned glyph_stride,
|
||||
hb_position_t *first_advance,
|
||||
unsigned advance_stride)
|
||||
{
|
||||
if (likely (HB_DIRECTION_IS_HORIZONTAL (direction)))
|
||||
get_glyph_h_advances (count, first_glyph, glyph_stride, first_advance, advance_stride);
|
||||
else
|
||||
get_glyph_v_advances (count, first_glyph, glyph_stride, first_advance, advance_stride);
|
||||
}
|
||||
|
||||
inline void guess_v_origin_minus_h_origin (hb_codepoint_t glyph,
|
||||
hb_position_t *x, hb_position_t *y)
|
||||
|
|
|
@ -1024,6 +1024,26 @@ hb_font_get_glyph_advance_for_direction (hb_font_t *font,
|
|||
{
|
||||
return font->get_glyph_advance_for_direction (glyph, direction, x, y);
|
||||
}
|
||||
/**
|
||||
* hb_font_get_glyph_advances_for_direction:
|
||||
* @font: a font.
|
||||
* @direction:
|
||||
*
|
||||
*
|
||||
*
|
||||
* Since: REPLACEME
|
||||
**/
|
||||
HB_EXTERN void
|
||||
hb_font_get_glyph_advances_for_direction (hb_font_t* font,
|
||||
hb_direction_t direction,
|
||||
unsigned count,
|
||||
hb_codepoint_t *first_glyph,
|
||||
unsigned glyph_stride,
|
||||
hb_position_t *first_advance,
|
||||
unsigned advance_stride)
|
||||
{
|
||||
font->get_glyph_advances_for_direction (direction, count, first_glyph, glyph_stride, first_advance, advance_stride);
|
||||
}
|
||||
|
||||
/**
|
||||
* hb_font_get_glyph_origin_for_direction:
|
||||
|
|
|
@ -529,6 +529,14 @@ hb_font_get_glyph_advance_for_direction (hb_font_t *font,
|
|||
hb_direction_t direction,
|
||||
hb_position_t *x, hb_position_t *y);
|
||||
HB_EXTERN void
|
||||
hb_font_get_glyph_advances_for_direction (hb_font_t* font,
|
||||
hb_direction_t direction,
|
||||
unsigned count,
|
||||
hb_codepoint_t *first_glyph,
|
||||
unsigned glyph_stride,
|
||||
hb_position_t *first_advance,
|
||||
unsigned advance_stride);
|
||||
HB_EXTERN void
|
||||
hb_font_get_glyph_origin_for_direction (hb_font_t *font,
|
||||
hb_codepoint_t glyph,
|
||||
hb_direction_t direction,
|
||||
|
|
Loading…
Reference in New Issue