[kern] Remove accelerator

It wasn't doing anything.
This commit is contained in:
Behdad Esfahbod 2018-11-02 12:47:55 -04:00
parent 0382b7184a
commit 949dad89a8
3 changed files with 18 additions and 43 deletions

View File

@ -67,7 +67,7 @@
HB_OT_ACCELERATOR(OT, hmtx) \ HB_OT_ACCELERATOR(OT, hmtx) \
HB_OT_ACCELERATOR(OT, vmtx) \ HB_OT_ACCELERATOR(OT, vmtx) \
HB_OT_ACCELERATOR(OT, post) \ HB_OT_ACCELERATOR(OT, post) \
HB_OT_ACCELERATOR(OT, kern) \ HB_OT_TABLE(OT, kern) \
HB_OT_ACCELERATOR(OT, glyf) \ HB_OT_ACCELERATOR(OT, glyf) \
HB_OT_TABLE(OT, VORG) \ HB_OT_TABLE(OT, VORG) \
HB_OT_ACCELERATOR(OT, name) \ HB_OT_ACCELERATOR(OT, name) \

View File

@ -503,24 +503,6 @@ struct kern
} }
} }
struct accelerator_t
{
inline void init (hb_face_t *face)
{
blob = hb_sanitize_context_t().reference_table<kern> (face);
table = blob->as<kern> ();
}
inline void fini (void)
{
hb_blob_destroy (blob);
}
inline bool has_data (void) const
{ return table->has_data (); }
inline int get_h_kerning (hb_codepoint_t left, hb_codepoint_t right) const
{ return table->get_h_kerning (left, right); }
inline int get_kerning (hb_codepoint_t first, hb_codepoint_t second) const inline int get_kerning (hb_codepoint_t first, hb_codepoint_t second) const
{ return get_h_kerning (first, second); } { return get_h_kerning (first, second); }
@ -532,7 +514,7 @@ struct kern
if (!HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction)) if (!HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
return; return;
hb_kern_machine_t<accelerator_t> machine (*this); hb_kern_machine_t<kern> machine (*this);
if (!buffer->message (font, "start kern table")) if (!buffer->message (font, "start kern table"))
return; return;
@ -542,11 +524,6 @@ struct kern
(void) buffer->message (font, "end kern table"); (void) buffer->message (font, "end kern table");
} }
private:
hb_blob_t *blob;
const kern *table;
};
protected: protected:
union { union {
HBUINT32 version32; HBUINT32 version32;
@ -558,8 +535,6 @@ struct kern
DEFINE_SIZE_UNION (4, version32); DEFINE_SIZE_UNION (4, version32);
}; };
struct kern_accelerator_t : kern::accelerator_t {};
} /* namespace OT */ } /* namespace OT */

View File

@ -55,9 +55,9 @@
**/ **/
static const OT::kern::accelerator_t& _get_kern (hb_face_t *face) static const OT::kern& _get_kern (hb_face_t *face)
{ {
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::kern::accelerator_t); if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::kern);
return *hb_ot_face_data (face)->kern; return *hb_ot_face_data (face)->kern;
} }
const OT::GDEF& _get_gdef (hb_face_t *face) const OT::GDEF& _get_gdef (hb_face_t *face)