bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.
BSD 3-Clause "New" or "Revised" License
1.1k stars 258 forks source link

WIP: Ligature support #554

Closed bobbylight closed 3 months ago

bobbylight commented 3 months ago

To render ligatures, but also support our "system selection" property where selected text is a different color, we need to update the token painting for partially-selected tokens. We need to render the token twice - once for the unselected piece(s) and once for the selected piece - to ensure ligatures are properly rendered in "both" pieces. Otherwise, if a ligature is partially selected, we'll render the individual chars instead.

Test ligatures to copy-paste:

// ligatures: ## <> => ++ ~~ <= >= <=> ->>

Things to consider:

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 70.29703% with 30 lines in your changes missing coverage. Please review.

Project coverage is 74.51%. Comparing base (b230bf1) to head (309d017).

Files Patch % Lines
.../src/main/java/org/fife/ui/rtextarea/FontUtil.java 40.54% 17 Missing and 5 partials :warning:
...org/fife/ui/rsyntaxtextarea/WrappedSyntaxView.java 61.53% 2 Missing and 3 partials :warning:
...c/main/java/org/fife/ui/rsyntaxtextarea/Theme.java 71.42% 0 Missing and 2 partials :warning:
...n/java/org/fife/ui/rsyntaxtextarea/SyntaxView.java 92.30% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #554 +/- ## ============================================ + Coverage 74.29% 74.51% +0.21% - Complexity 6839 6871 +32 ============================================ Files 177 178 +1 Lines 30269 30270 +1 Branches 3915 3920 +5 ============================================ + Hits 22489 22556 +67 + Misses 5940 5889 -51 + Partials 1840 1825 -15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.