Skip if the two sequences to the right have different shapes: ععع ععع.
Test passes if the three Arabic characters don't join, or styling is applied to the glyph corresponding to the middle letter, or the styling is applied to the whole ligature.

علا

Assertion: [exploratory] Styling part of a ligature for font-weight will break joining behaviour across inline box boundaries, or apply the styling to the glyph corresponding to the middle letter, or apply the styling to the whole ligature.