[draw] Rename internal draw_session_t to hb_draw_session_t

This commit is contained in:
Behdad Esfahbod 2022-02-04 18:40:44 -06:00
parent 5d2df1208a
commit 370bec938b
7 changed files with 17 additions and 17 deletions

View File

@ -157,12 +157,12 @@ struct hb_draw_funcs_t
};
DECLARE_NULL_INSTANCE (hb_draw_funcs_t);
struct draw_session_t
struct hb_draw_session_t
{
draw_session_t (hb_draw_funcs_t *funcs_, void *draw_data_)
hb_draw_session_t (hb_draw_funcs_t *funcs_, void *draw_data_)
: funcs {funcs_}, draw_data {draw_data_}, st HB_DRAW_STATE_DEFAULT {}
~draw_session_t () { close_path (); }
~hb_draw_session_t () { close_path (); }
void move_to (float to_x, float to_y)
{

View File

@ -445,7 +445,7 @@ bool OT::cff1::accelerator_t::get_extents (hb_font_t *font, hb_codepoint_t glyph
struct cff1_path_param_t
{
cff1_path_param_t (const OT::cff1::accelerator_t *cff_, hb_font_t *font_,
draw_session_t &draw_session_, point_t *delta_)
hb_draw_session_t &draw_session_, point_t *delta_)
{
draw_session = &draw_session_;
cff = cff_;
@ -484,7 +484,7 @@ struct cff1_path_param_t
void end_path () { draw_session->close_path (); }
hb_font_t *font;
draw_session_t *draw_session;
hb_draw_session_t *draw_session;
point_t *delta;
const OT::cff1::accelerator_t *cff;
@ -512,7 +512,7 @@ struct cff1_path_procs_path_t : path_procs_t<cff1_path_procs_path_t, cff1_cs_int
};
static bool _get_path (const OT::cff1::accelerator_t *cff, hb_font_t *font, hb_codepoint_t glyph,
draw_session_t &draw_session, bool in_seac = false, point_t *delta = nullptr);
hb_draw_session_t &draw_session, bool in_seac = false, point_t *delta = nullptr);
struct cff1_cs_opset_path_t : cff1_cs_opset_t<cff1_cs_opset_path_t, cff1_path_param_t, cff1_path_procs_path_t>
{
@ -536,7 +536,7 @@ struct cff1_cs_opset_path_t : cff1_cs_opset_t<cff1_cs_opset_path_t, cff1_path_pa
};
bool _get_path (const OT::cff1::accelerator_t *cff, hb_font_t *font, hb_codepoint_t glyph,
draw_session_t &draw_session, bool in_seac, point_t *delta)
hb_draw_session_t &draw_session, bool in_seac, point_t *delta)
{
if (unlikely (!cff->is_valid () || (glyph >= cff->num_glyphs))) return false;
@ -554,7 +554,7 @@ bool _get_path (const OT::cff1::accelerator_t *cff, hb_font_t *font, hb_codepoin
return true;
}
bool OT::cff1::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, draw_session_t &draw_session) const
bool OT::cff1::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const
{
#ifdef HB_NO_OT_FONT_CFF
/* XXX Remove check when this code moves to .hh file. */

View File

@ -1347,7 +1347,7 @@ struct cff1
HB_INTERNAL bool get_extents (hb_font_t *font, hb_codepoint_t glyph, hb_glyph_extents_t *extents) const;
HB_INTERNAL bool get_seac_components (hb_codepoint_t glyph, hb_codepoint_t *base, hb_codepoint_t *accent) const;
HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, draw_session_t &draw_session) const;
HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const;
private:
struct gname_t

View File

@ -145,7 +145,7 @@ bool OT::cff2::accelerator_t::get_extents (hb_font_t *font,
struct cff2_path_param_t
{
cff2_path_param_t (hb_font_t *font_, draw_session_t &draw_session_)
cff2_path_param_t (hb_font_t *font_, hb_draw_session_t &draw_session_)
{
draw_session = &draw_session_;
font = font_;
@ -165,7 +165,7 @@ struct cff2_path_param_t
}
protected:
draw_session_t *draw_session;
hb_draw_session_t *draw_session;
hb_font_t *font;
};
@ -192,7 +192,7 @@ struct cff2_path_procs_path_t : path_procs_t<cff2_path_procs_path_t, cff2_cs_int
struct cff2_cs_opset_path_t : cff2_cs_opset_t<cff2_cs_opset_path_t, cff2_path_param_t, cff2_path_procs_path_t> {};
bool OT::cff2::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, draw_session_t &draw_session) const
bool OT::cff2::accelerator_t::get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const
{
#ifdef HB_NO_OT_FONT_CFF
/* XXX Remove check when this code moves to .hh file. */

View File

@ -515,7 +515,7 @@ struct cff2
HB_INTERNAL bool get_extents (hb_font_t *font,
hb_codepoint_t glyph,
hb_glyph_extents_t *extents) const;
HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, draw_session_t &draw_session) const;
HB_INTERNAL bool get_path (hb_font_t *font, hb_codepoint_t glyph, hb_draw_session_t &draw_session) const;
};
typedef accelerator_templ_t<cff2_private_dict_opset_subset_t, cff2_private_dict_values_subset_t> accelerator_subset_t;

View File

@ -265,7 +265,7 @@ hb_ot_get_glyph_shape (hb_font_t *font,
hb_draw_funcs_t *draw_funcs, void *draw_data,
void *user_data)
{
draw_session_t draw_session (draw_funcs, draw_data);
hb_draw_session_t draw_session (draw_funcs, draw_data);
if (font->face->table.glyf->get_path (font, glyph, draw_session)) return;
#ifndef HB_NO_CFF
if (font->face->table.cff1->get_path (font, glyph, draw_session)) return;

View File

@ -1155,7 +1155,7 @@ struct glyf
struct path_builder_t
{
hb_font_t *font;
draw_session_t *draw_session;
hb_draw_session_t *draw_session;
struct optional_point_t
{
@ -1170,7 +1170,7 @@ struct glyf
{ return optional_point_t (x + t * (p.x - x), y + t * (p.y - y)); }
} first_oncurve, first_offcurve, last_offcurve;
path_builder_t (hb_font_t *font_, draw_session_t &draw_session_)
path_builder_t (hb_font_t *font_, hb_draw_session_t &draw_session_)
{
font = font_;
draw_session = &draw_session_;
@ -1268,7 +1268,7 @@ struct glyf
};
bool
get_path (hb_font_t *font, hb_codepoint_t gid, draw_session_t &draw_session) const
get_path (hb_font_t *font, hb_codepoint_t gid, hb_draw_session_t &draw_session) const
{ return get_points (font, gid, path_builder_t (font, draw_session)); }
#ifndef HB_NO_VAR