Skip to content
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

Request: Curly Brace {{ }}, {% %}, {!! !!} ligatures. #38

Open
Orillian opened this issue Dec 22, 2017 · 8 comments
Open

Request: Curly Brace {{ }}, {% %}, {!! !!} ligatures. #38

Orillian opened this issue Dec 22, 2017 · 8 comments
Labels
suggestion Ideas for new ligatures

Comments

@Orillian
Copy link

Double curly braces are used a lot in Angular, Mustache, Blade and Twig templates as output delimiters.

{{ variable }} or {{ expression result }}
Then you have the others like the
{% twig execute delimiter %}
and the
{!! blade non-escaped variable !!}

The double curly brace especially gets used in a bunch of other places, a lot of template syntax's in Javascript use them and I've also heard rumor of a dreaded use in Java, but since I don't do Java I'm OK with it.

@kiliman
Copy link
Owner

kiliman commented Dec 28, 2017

Ok, but how would you like the ligatures represented?

Is it simply moving the braces closer together and centering? Or would you prefer the left side to be pushed more to the left and vice versa?

I looked at Fira Code for inspiration, but they don't have those ligatures defined.

Can you mock up something in a paint program and show what you would like to see?

Thanks!

@Orillian
Copy link
Author

Orillian commented Jan 5, 2018

Sure, I'll play around with a couple ideas.
Since these are not common it might be a good idea to make their inclusion optional in the script if that is easy enough to do?

@kiliman
Copy link
Owner

kiliman commented Jan 6, 2018

Yes, I've already started preliminary work on optional ligatures. You'll even be able to generate multiple fonts so you can have language specific fonts for example.

@Orillian
Copy link
Author

Orillian commented Jan 8, 2018

Awesome, I have the rest of this week off starting Wednesday, I'll be sitting around the house all day for a week, so I've got it in my calendar to draft up some options for these ligatures, as well as some of the others like the PHP space ship operator.

@Orillian
Copy link
Author

Orillian commented Feb 5, 2018

Now that I'm finally feeling well enough to do so, I started playing around with these as well as a couple of the other ligatures we have in the issue list here!

Anyway I've got a couple blocks of png's that I'll drop in here hopefully tonight with a few options for some of these ligatures. For the most part moving them closer together works well, but in some cases actually touching the glyphs together looks pretty decent!

I've been trying to use Font forge since I'm on windows but it's a PITA. On my desktop it breaks due to multi monitor setup and it crashes on my laptop. I was hoping to be able to learn a bit more about how this works so I could be a bit more helpful, but for now I'm stuck trying to find an alternative font editor for windows.

@Orillian
Copy link
Author

Orillian commented Feb 6, 2018

curly brace ligatures

Here are the first close together samples. Merging the double curly into a more uniform mustache shape might be nice if we can make that happen, but just touching them together leaves some funky edges.

@amitkparekh
Copy link
Collaborator

amitkparekh commented Oct 30, 2019

For the {{ ligature, how does this look for a possible implementation?

image

The two braces are closer together, and the right one is slightly (10%) smaller than left one, so it fits a nicely within the other brace.

@Orillian
Copy link
Author

Honestly I like it! It looks a lot cleaner than my test idea above! 👍

Sorry for the slow response, I've been away from here for a while now.

@amitkparekh amitkparekh added suggestion Ideas for new ligatures and removed enhancement labels May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Ideas for new ligatures
Projects
None yet
Development

No branches or pull requests

3 participants