fix build
This commit is contained in:
parent
b6cc838888
commit
9d9d5c706b
|
@ -29,33 +29,26 @@
|
|||
|
||||
namespace OT {
|
||||
|
||||
template <typename T, typename H>
|
||||
int hmtxvmtx<T, H>::accelerator_t::get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph) const
|
||||
int hmtxvmtx_accelerator_base_t::get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph, bool vertical)
|
||||
{
|
||||
glyf::accelerator_t glyf_accel;
|
||||
glyf_accel.init (font->face);
|
||||
|
||||
float side_bearing = glyf_accel.get_side_bearing_var (glyph, font->coords, font->num_coords, T::tableTag==HB_OT_TAG_vmtx);
|
||||
float side_bearing = glyf_accel.get_side_bearing_var (glyph, font->coords, font->num_coords, vertical);
|
||||
glyf_accel.fini ();
|
||||
|
||||
return (int)side_bearing;
|
||||
}
|
||||
|
||||
template <typename T, typename H>
|
||||
unsigned int hmtxvmtx<T, H>::accelerator_t::get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph) const
|
||||
unsigned int hmtxvmtx_accelerator_base_t::get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph, bool vertical)
|
||||
{
|
||||
glyf::accelerator_t glyf_accel;
|
||||
glyf_accel.init (font->face);
|
||||
|
||||
float advance = glyf_accel.get_advance_var (glyph, font->coords, font->num_coords, T::tableTag==HB_OT_TAG_vmtx);
|
||||
float advance = glyf_accel.get_advance_var (glyph, font->coords, font->num_coords, vertical);
|
||||
glyf_accel.fini ();
|
||||
|
||||
return (unsigned int)advance;
|
||||
}
|
||||
|
||||
template int hmtxvmtx<hmtx, hhea>::accelerator_t::get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
template int hmtxvmtx<vmtx, vhea>::accelerator_t::get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
template unsigned int hmtxvmtx<hmtx, hhea>::accelerator_t::get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
template unsigned int hmtxvmtx<vmtx, vhea>::accelerator_t::get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
|
||||
}
|
||||
|
|
|
@ -53,6 +53,12 @@ struct LongMetric
|
|||
DEFINE_SIZE_STATIC (4);
|
||||
};
|
||||
|
||||
struct hmtxvmtx_accelerator_base_t
|
||||
{
|
||||
HB_INTERNAL static int get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph, bool vertical);
|
||||
HB_INTERNAL static unsigned int get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph, bool vertical);
|
||||
};
|
||||
|
||||
template <typename T, typename H>
|
||||
struct hmtxvmtx
|
||||
{
|
||||
|
@ -156,7 +162,7 @@ struct hmtxvmtx
|
|||
return success;
|
||||
}
|
||||
|
||||
struct accelerator_t
|
||||
struct accelerator_t : hmtxvmtx_accelerator_base_t
|
||||
{
|
||||
friend struct hmtxvmtx;
|
||||
|
||||
|
@ -238,7 +244,7 @@ struct hmtxvmtx
|
|||
if (var_table.get_blob () != hb_blob_get_empty ())
|
||||
side_bearing += var_table->get_side_bearing_var (glyph, font->coords, font->num_coords); // TODO Optimize?!
|
||||
else
|
||||
side_bearing = get_side_bearing_var_tt (font, glyph);
|
||||
side_bearing = get_side_bearing_var_tt (font, glyph, T::tableTag==HB_OT_TAG_vmtx);
|
||||
}
|
||||
}
|
||||
return side_bearing;
|
||||
|
@ -271,7 +277,7 @@ struct hmtxvmtx
|
|||
if (var_table.get_blob () != hb_blob_get_empty ())
|
||||
advance += var_table->get_advance_var (glyph, font->coords, font->num_coords); // TODO Optimize?!
|
||||
else
|
||||
advance = get_advance_var_tt (font, glyph);
|
||||
advance = get_advance_var_tt (font, glyph, T::tableTag==HB_OT_TAG_vmtx);
|
||||
}
|
||||
}
|
||||
return advance;
|
||||
|
@ -293,9 +299,6 @@ struct hmtxvmtx
|
|||
}
|
||||
|
||||
private:
|
||||
int get_side_bearing_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
unsigned int get_advance_var_tt (hb_font_t *font, hb_codepoint_t glyph) const;
|
||||
|
||||
unsigned int _advance_for_new_gid (const hb_subset_plan_t *plan,
|
||||
hb_codepoint_t new_gid) const
|
||||
{
|
||||
|
|
|
@ -515,6 +515,7 @@ struct gvar
|
|||
void fini ()
|
||||
{
|
||||
gvar_table.destroy ();
|
||||
shared_tuples.fini ();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue