-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AtlasEngine: Fix ligature splitting for JetBrains Mono (#15810)
Some fonts implement ligatures by replacing a string like "&&" with a whitespace padding glyph, followed by the actual "&&" glyph which has a 1 column advance width. In that case the algorithm in `_drawTextOverlapSplit` will get confused because it strictly scans the input from left to right, searching for color changes. The initial color is the glyph's color and so it breaks for such fonts because then the first split will retain the last column's color. ## Validation Steps Performed * Use JetBrains Mono * Print ``"`e[91m`&`e[96m&`e[m"`` * Red and blue `&` appear ✅ --------- Co-authored-by: Tushar Singh <tusharvickey1999@gmail.com> Co-authored-by: Dustin L. Howett <duhowett@microsoft.com> (cherry picked from commit a7a4490) Service-Card-Id: 90153416 Service-Version: 1.18
- Loading branch information
1 parent
48b42db
commit 2b5b574
Showing
2 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters