-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting a ligature's width #91
Comments
@kris10ansn Did you find a solution to this problem? |
I did not unfortunately |
I think that it might be possible to do this, in theory. Glyph width is characterized by three values: left bearing (how much the pen advances before it starts drawing the glyph), advance (how wide the actual glyph is), and right bearing (how much the pen advances afterwards). Ligatures are nominally drawn overtop the last glyph in the ligature (as you can see in your example); wide ligatures overdraw the earlier columns by using a very wide negative left bearing and positive advance. Fira's For your Did you inject the ligature by hand, or did you patch ligaturizer? If the latter, I'd be glad to incorporate it as an "inject arbitrary ligatures" feature, and it might be possible to include bearing correction in that. ¹ in practice there's fractional ems there so the letter spacing looks nice, but I'm rounding here for simplicity's sake |
Hey. I'm not very familiar with this codebase. I just wanted to make some ligatures that allowed me to use greek letters in my code. I added this to the ligatures array:
Is there an easy way to modify the ligature width, or do I have to dive into the code? How so in that case? |
There is not currently any easy way of doing this. It would probably have be done by adding options that control that feature to the table of ligatures, and then respecting those options, if present, in correct_ligature_width; correct_character_width has an example of left and right bearing adjustment, albeit for a different purpose. This does seem like an interesting feature to have, but I can't make any promises as to when I'll have time to poke at it. |
I made a ligature that changes
['l', 'a', 'm', 'b', 'd', 'a']
into the actual lambda characterλ
, and it worked fine. The only problem is that the singleλ
character takes up the space of the entire"lambda"
word and just looks kinda weird. Is it possible to change the width of a single ligature?I'm using VS Code (VSCodium to be precise) if that makes any difference.
Showcase:
The text was updated successfully, but these errors were encountered: