mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 08:51:07 +01:00
[hmtx] Reduce map usage slightly
This commit is contained in:
1 parent
f41c5ec961
commit
aa7dd70a86
1 file changed
+3
-2
@@ -214,7 +214,8 @@ struct hmtxvmtx
|
||||
+ hb_range (c->plan->num_output_glyphs ())
|
||||
| hb_map ([c, &_mtx, mtx_map] (unsigned _)
|
||||
{
|
||||
if (!mtx_map->has (_))
|
||||
hb_pair_t<unsigned, int> *v = nullptr;
|
||||
if (!mtx_map->has (_, &v))
|
||||
{
|
||||
hb_codepoint_t old_gid;
|
||||
if (!c->plan->old_gid_for_new_gid (_, &old_gid))
|
||||
@@ -224,7 +225,7 @@ struct hmtxvmtx
|
||||
(void) _glyf_get_leading_bearing_without_var_unscaled (c->plan->source, old_gid, !T::is_horizontal, &lsb);
|
||||
return hb_pair (_mtx.get_advance_without_var_unscaled (old_gid), +lsb);
|
||||
}
|
||||
return mtx_map->get (_);
|
||||
return *v;
|
||||
})
|
||||
;
|
||||
|
||||
|
||||
Reference in new issue
Block a user