mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
[ot-shape] Skip the post-morx digest update if not applying GPOS (#6192)
The buffer digest is only consumed by the OT lookup-apply loop. After morx substitution it exists solely for a following GPOS pass; when positioning goes through kerx/kern instead, rebuilding it is wasted work. Speeds up the Menlo/en-thelittleprince benchmark by 2%; shaping outputs are unchanged on the AAT benchmark fonts. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf30f712e7
commit
d155a10dff
1 file changed
+4
-1
+4
-1
@@ -922,7 +922,10 @@ hb_ot_substitute_plan (const hb_ot_shape_context_t *c)
|
||||
{
|
||||
hb_aat_layout_substitute (c->plan, c->font, c->buffer,
|
||||
c->user_features, c->num_user_features);
|
||||
c->buffer->update_digest ();
|
||||
/* The buffer digest is only used by the OT lookup-apply loop;
|
||||
* without GPOS ahead, nothing consumes it. */
|
||||
if (c->plan->apply_gpos)
|
||||
c->buffer->update_digest ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user