When moving half way in the ligature, the cursor should be half way in the char
See original GitHub issueHi,
This is how it is in Fira and sounds more logical than having the cursor in a blank space.
Try for instance to navigate through >=
in Fira and with Operator-Mono-Lig.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Show underlying characters for ligatures - Visual Studio Feedback
However, when moving the cursor through the area where a ligature has been rendered, ... characters instead of putting the cursor halfway through...
Read more >Cursor starts half way down - Microsoft Community
In Word 2013, when I open a new document the cursor starts half way down the page. The top and bottom margins are...
Read more >cursor - CSS: Cascading Style Sheets - MDN Web Docs
The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element.
Read more >FontForge Master Class Part 3 - Kerning, Lookups & Ligatures
In the third part of this series, we will learn how to use pair positioning (kerning) and how to use lookups in Font...
Read more >How to Fix Mouse Cursor in Dual Monitor Setup [Tutorial]
How to Fix Mouse Cursor in Dual Monitor Setup [Tutorial]If you're using two or more monitors, there are a few things you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been reading up on how contextual substitutions work in OpenType as well as how it’s used in Fira Code. I think I understand it much better now. I’m working on an experimental font with a few ligatures for testing.
Here’s an animation of how the spacing works.
Here’s how the glyph is created.
Notice the negative LSB (Left Side Bearing). The way Fira Code works is that instead of substituting
equal
+equal
into a single double-wide glyphequal_equal.liga
like I currently do, it actually uses 2 glyphs, one nameLIG
which is simply a single width glyph with no visual representation, plus theequal_equal.liga
with negative LSB.So basically
LIG
advances one character width, then the ligature moves back to the left with the negative LSB. The editor and terminal think there are two characters and the caret is displayed properly.Pretty clever, but makes it a little trickier to design the glyphs because you have to calculate the proper LSB. The actual contextual substitution lookups are really nasty and will have to programmatically generated. I’m working on that now.
I have a working version of the font in VS Code that supports both caret positioning and chained ligatures (#37).
Here’s an example:
Now to redo all the ligatures 😣 … I can see the finish line 🏁