[hmtx] Remove one subset-specific method from hmtx accelerator
Looks ugly but is the right thing to do.
This commit is contained in:
parent
af407dd24d
commit
9ba520b5d1
|
@ -262,11 +262,10 @@ struct hmtxvmtx
|
|||
unsigned int num_advances_for_subset (const hb_subset_plan_t *plan) const
|
||||
{
|
||||
unsigned int num_advances = plan->num_output_glyphs ();
|
||||
unsigned int last_advance = _advance_for_new_gid (plan,
|
||||
num_advances - 1);
|
||||
hb_codepoint_t old_gid = 0;
|
||||
unsigned int last_advance = plan->old_gid_for_new_gid (num_advances - 1, &old_gid) ? get_advance (old_gid) : 0;
|
||||
while (num_advances > 1 &&
|
||||
last_advance == _advance_for_new_gid (plan,
|
||||
num_advances - 2))
|
||||
last_advance == (plan->old_gid_for_new_gid (num_advances - 2, &old_gid) ? get_advance (old_gid) : 0))
|
||||
{
|
||||
num_advances--;
|
||||
}
|
||||
|
@ -274,17 +273,6 @@ struct hmtxvmtx
|
|||
return num_advances;
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned int _advance_for_new_gid (const hb_subset_plan_t *plan,
|
||||
hb_codepoint_t new_gid) const
|
||||
{
|
||||
hb_codepoint_t old_gid;
|
||||
if (!plan->old_gid_for_new_gid (new_gid, &old_gid))
|
||||
return 0;
|
||||
|
||||
return get_advance (old_gid);
|
||||
}
|
||||
|
||||
protected:
|
||||
unsigned int num_metrics;
|
||||
unsigned int num_advances;
|
||||
|
|
Loading…
Reference in New Issue