[AAT] Remove unused code
This commit is contained in:
parent
b344d4385a
commit
347ad454b8
|
@ -62,8 +62,7 @@ struct ankr
|
||||||
|
|
||||||
const Anchor &get_anchor (hb_codepoint_t glyph_id,
|
const Anchor &get_anchor (hb_codepoint_t glyph_id,
|
||||||
unsigned int i,
|
unsigned int i,
|
||||||
unsigned int num_glyphs,
|
unsigned int num_glyphs) const
|
||||||
const char *end) const
|
|
||||||
{
|
{
|
||||||
const OffsetTo<GlyphAnchors, HBUINT16, false> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
|
const OffsetTo<GlyphAnchors, HBUINT16, false> *offset = (this+lookupTable).get_value (glyph_id, num_glyphs);
|
||||||
if (!offset)
|
if (!offset)
|
||||||
|
|
|
@ -825,7 +825,6 @@ struct hb_aat_apply_context_t :
|
||||||
hb_buffer_t *buffer;
|
hb_buffer_t *buffer;
|
||||||
hb_sanitize_context_t sanitizer;
|
hb_sanitize_context_t sanitizer;
|
||||||
const ankr *ankr_table;
|
const ankr *ankr_table;
|
||||||
const char *ankr_end;
|
|
||||||
|
|
||||||
/* Unused. For debug tracing only. */
|
/* Unused. For debug tracing only. */
|
||||||
unsigned int lookup_index;
|
unsigned int lookup_index;
|
||||||
|
@ -838,7 +837,7 @@ struct hb_aat_apply_context_t :
|
||||||
|
|
||||||
HB_INTERNAL ~hb_aat_apply_context_t ();
|
HB_INTERNAL ~hb_aat_apply_context_t ();
|
||||||
|
|
||||||
HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_, const char *ankr_end_);
|
HB_INTERNAL void set_ankr_table (const AAT::ankr *ankr_table_);
|
||||||
|
|
||||||
void set_lookup_index (unsigned int i) { lookup_index = i; }
|
void set_lookup_index (unsigned int i) { lookup_index = i; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -549,12 +549,10 @@ struct KerxSubTableFormat4
|
||||||
unsigned int currAnchorPoint = *data++;
|
unsigned int currAnchorPoint = *data++;
|
||||||
const Anchor &markAnchor = c->ankr_table->get_anchor (c->buffer->info[mark].codepoint,
|
const Anchor &markAnchor = c->ankr_table->get_anchor (c->buffer->info[mark].codepoint,
|
||||||
markAnchorPoint,
|
markAnchorPoint,
|
||||||
c->sanitizer.get_num_glyphs (),
|
c->sanitizer.get_num_glyphs ());
|
||||||
c->ankr_end);
|
|
||||||
const Anchor &currAnchor = c->ankr_table->get_anchor (c->buffer->cur ().codepoint,
|
const Anchor &currAnchor = c->ankr_table->get_anchor (c->buffer->cur ().codepoint,
|
||||||
currAnchorPoint,
|
currAnchorPoint,
|
||||||
c->sanitizer.get_num_glyphs (),
|
c->sanitizer.get_num_glyphs ());
|
||||||
c->ankr_end);
|
|
||||||
|
|
||||||
o.x_offset = c->font->em_scale_x (markAnchor.xCoordinate) - c->font->em_scale_x (currAnchor.xCoordinate);
|
o.x_offset = c->font->em_scale_x (markAnchor.xCoordinate) - c->font->em_scale_x (currAnchor.xCoordinate);
|
||||||
o.y_offset = c->font->em_scale_y (markAnchor.yCoordinate) - c->font->em_scale_y (currAnchor.yCoordinate);
|
o.y_offset = c->font->em_scale_y (markAnchor.yCoordinate) - c->font->em_scale_y (currAnchor.yCoordinate);
|
||||||
|
|
|
@ -157,7 +157,6 @@ AAT::hb_aat_apply_context_t::hb_aat_apply_context_t (const hb_ot_shape_plan_t *p
|
||||||
buffer (buffer_),
|
buffer (buffer_),
|
||||||
sanitizer (),
|
sanitizer (),
|
||||||
ankr_table (&Null(AAT::ankr)),
|
ankr_table (&Null(AAT::ankr)),
|
||||||
ankr_end (nullptr),
|
|
||||||
lookup_index (0),
|
lookup_index (0),
|
||||||
debug_depth (0)
|
debug_depth (0)
|
||||||
{
|
{
|
||||||
|
@ -171,12 +170,8 @@ AAT::hb_aat_apply_context_t::~hb_aat_apply_context_t ()
|
||||||
{ sanitizer.end_processing (); }
|
{ sanitizer.end_processing (); }
|
||||||
|
|
||||||
void
|
void
|
||||||
AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_,
|
AAT::hb_aat_apply_context_t::set_ankr_table (const AAT::ankr *ankr_table_)
|
||||||
const char *ankr_end_)
|
{ ankr_table = ankr_table_; }
|
||||||
{
|
|
||||||
ankr_table = ankr_table_;
|
|
||||||
ankr_end = ankr_end_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -286,11 +281,8 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan,
|
||||||
hb_blob_t *kerx_blob = font->face->table.kerx.get_blob ();
|
hb_blob_t *kerx_blob = font->face->table.kerx.get_blob ();
|
||||||
const AAT::kerx& kerx = *kerx_blob->as<AAT::kerx> ();
|
const AAT::kerx& kerx = *kerx_blob->as<AAT::kerx> ();
|
||||||
|
|
||||||
hb_blob_t *ankr_blob = font->face->table.ankr.get_blob ();;
|
|
||||||
const AAT::ankr& ankr = *font->face->table.ankr;
|
|
||||||
|
|
||||||
AAT::hb_aat_apply_context_t c (plan, font, buffer, kerx_blob);
|
AAT::hb_aat_apply_context_t c (plan, font, buffer, kerx_blob);
|
||||||
c.set_ankr_table (&ankr, ankr_blob->data + ankr_blob->length);
|
c.set_ankr_table (font->face->table.ankr.get ());
|
||||||
kerx.apply (&c);
|
kerx.apply (&c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue