File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -612,20 +612,21 @@ StatusOr<std::optional<CandidateMerge>> CandidateMerge::AssessSegmentMerge(
612612 }
613613
614614 uint32_t new_patch_size = 0 ;
615- if (!segments_to_merge_and_base_are_inert ) {
615+ if (!segments_to_merge_are_inert ) {
616616 GlyphSet and_gids, or_gids, exclusive_gids;
617617 TRYV (merger.Context ().AnalyzeSegment (segments_to_merge_with_base, and_gids,
618618 or_gids, exclusive_gids));
619619 new_patch_size =
620620 TRY (merger.Context ().patch_size_cache ->GetPatchSize (exclusive_gids));
621621 } else {
622- // When the inputs to a merge are all inert then we can assume the merged
623- // patch is just a combination of the glyphs from the input segments. This
624- // saves a closure computation.
622+ // When the segments being added to base are all inert then we can assume
623+ // the merged patch is just a combination of the glyphs from the base and
624+ // the input segments. Since the segments being added are intert we know
625+ // that they won't interact with base and will just bring along their own
626+ // glyphs.
625627 GlyphSet merged_glyphs = gid_conditions_to_update;
626628 merged_glyphs.union_set (
627- merger.Context ().glyph_condition_set .GlyphsWithSegment (
628- base_segment_index));
629+ merger.Context ().glyph_groupings .ExclusiveGlyphs (base_segment_index));
629630 new_patch_size =
630631 TRY (merger.Context ().patch_size_cache ->GetPatchSize (merged_glyphs));
631632 }
You can’t perform that action at this time.
0 commit comments