It may also depend on the font and the font's kerning settings.

While unstated, the scenario likely involves brace matching turning the '(' and ')' blue and bold. This causes the text, which was previously drawn in 1 operation "编辑器(geany)", to be drawn in 4 operations: ["编辑器", "(", "geany", ")"]. The platform drawing APIs may position the text slightly differently because of kerning or similar features: perhaps if it sees "(g" together, the "g" is moved slightly towards the "(". However, it is unlikely there would be discernable kerning of this pair.

To avoid text movement for brace matching, Scintilla does not re-layout the text and uses the original reported position of the "g" in the full "编辑器(geany)" context. Thus, even if the "(" becomes bold and uses some more space, "geany" should not move.

Any text movement could be avoided with an option to use indicators (like a blue/red rectangle) to mark brace matches instead of changing the brace appearance. The API to do this is SCI_BRACEHIGHLIGHTINDICATOR.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/issues/3803/2024037675@github.com>