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

Can we get the alternative stylistic set in a different binay #842

Closed
vikky49 opened this issue Sep 15, 2019 · 13 comments
Closed

Can we get the alternative stylistic set in a different binay #842

vikky49 opened this issue Sep 15, 2019 · 13 comments

Comments

@vikky49
Copy link

vikky49 commented Sep 15, 2019

Can we get the alternative stylistic set in a different binary .. For most us who use IDE like Intelli J or Android Stuido its not possible enable them . I kind of like the new "r" and the regular & symbols but unfortunately my IDE's limit me from not being able to use them

@marcin-kozinski
Copy link

Hi :)

Came here wondering a very similar thing—would love to use stylistic sets in JetBrains IDEs. The right approach is obviously for JetBrains to add support for that and everyone interested should thumbs up this feature request: https://youtrack.jetbrains.com/issue/IDEA-221886

However, in the meantime I was wondering about a separate binary with some stylistic sets tweaked. Obviously it's not scalable to release alternative binaries as part of the library. Currently there are 8 stylistic sets, which means 256 binaries for all combinations anyone might want to get.

But do you think it's possible and do you have any pointers for motivated power users to build their own binaries with stylistic sets tweaked? Would I do that by editing the FiraCode.glyphs file? Do I need the Glyphs app for that?

@tonsky
Copy link
Owner

tonsky commented Sep 16, 2019

I’d love to have scripts to bake in some SS into binary. Fira Code can be built using open-source scripts (see https://github.com/tonsky/FiraCode/#building-fira-code-locally). Altering glyphs requires Glyphs app though (but there are open editors that can edit OTF/TTF directly)

@marcin-kozinski
Copy link

Thanks, will check out the TTF editors!

@djensen47
Copy link

Same goes for VS Code. It should just be built in; that recommended plugin is definitely a work-around at best. Thanks for the great font!

@alvinhochun
Copy link

alvinhochun commented Sep 22, 2019

I just spent an afternoon to set up a build environment to hack my stylistic set preferences into the font.

As an example, this is what I changed in order to bake in ss01, ss03 and ss05 (yes, ss05 "at" is labelled as ss06 in the source):

diff --git a/FiraCode.glyphs b/FiraCode.glyphs
index 68a7f1c..89914f6 100644
--- a/FiraCode.glyphs
+++ b/FiraCode.glyphs
@@ -12465,8 +12465,8 @@ width = 1200;
 unicode = 0071;
 },
 {
-color = 4;
-glyphname = r;
+color = 6;
+glyphname = r.ss01;
 lastChange = "2019-03-25 21:13:22 +0000";
 layers = (
 {
@@ -12580,7 +12580,6 @@ nodes = (
 width = 1200;
 }
 );
-unicode = 0072;
 },
 {
 color = 7;
@@ -14920,8 +14919,8 @@ width = 1200;
 );
 },
 {
-color = 6;
-glyphname = r.ss01;
+color = 4;
+glyphname = r;
 lastChange = "2019-09-02 12:20:31 +0000";
 layers = (
 {
@@ -15015,6 +15014,7 @@ nodes = (
 width = 1200;
 }
 );
+unicode = 0072;
 },
 {
 color = 9;
@@ -93398,8 +93398,8 @@ width = 1200;
 unicode = 2408;
 },
 {
-color = 4;
-glyphname = at;
+color = 6;
+glyphname = at.ss06;
 lastChange = "2019-03-25 21:13:22 +0000";
 layers = (
 {
@@ -93539,11 +93539,10 @@ nodes = (
 width = 1200;
 }
 );
-unicode = 0040;
 },
 {
-color = 4;
-glyphname = ampersand;
+color = 6;
+glyphname = ampersand.ss03;
 lastChange = "2019-03-25 21:13:22 +0000";
 layers = (
 {
@@ -93667,7 +93666,6 @@ nodes = (
 width = 1200;
 }
 );
-unicode = 0026;
 },
 {
 color = 4;
@@ -99138,8 +99136,8 @@ width = 1200;
 unicode = 240B;
 },
 {
-color = 6;
-glyphname = ampersand.ss03;
+color = 4;
+glyphname = ampersand;
 lastChange = "2019-09-02 16:14:17 +0000";
 layers = (
 {
@@ -99293,10 +99291,11 @@ nodes = (
 width = 1200;
 }
 );
+unicode = 0026;
 },
 {
-color = 6;
-glyphname = at.ss06;
+color = 4;
+glyphname = at;
 lastChange = "2019-09-09 16:35:06 +0000";
 layers = (
 {
@@ -99460,6 +99459,7 @@ nodes = (
 width = 1200;
 }
 );
+unicode = 0040;
 },
 {
 color = 4;

I did it rather blindly. I just searched for the original glyph and the alternative glyph and swap their identifications. I don't even know what the color attribute means but I figured I'd swap them as well. It works for me.

@hkbakke
Copy link

hkbakke commented Sep 22, 2019

I am also looking for a way to pre-bake the ss-preferences into the binary. There is no hope that stylistic sets is getting global application support, so this is pretty much the only way to fix the defaults for '@', '&' and 'r'

@tonsky
Copy link
Owner

tonsky commented Sep 23, 2019

color doesn’t mean anything, really. Font designers use it to mark glyphs for their own purposes, much like dev tags

@dustin-tridius
Copy link

@alvinhochun
Works great! Thanks for this. Made the changes to FiraCode.glyphs and executed ./script/build_ttf. No more weird r's!

@vikky49
Copy link
Author

vikky49 commented Oct 1, 2019

@alvinhochun Would you be able to make the patch of your change and upload here .When i tried making the same changes i am getting an error .. i guess i must have messed up some thing

@alvinhochun
Copy link

@vikky49 I've already included the patch in my previous reply. If you copy the text inside the code block verbatim it should work.

@tri-nga
Copy link

tri-nga commented Jan 12, 2020

@vikky49 I've already included the patch in my previous reply. If you copy the text inside the code block verbatim it should work.

Hi, could you explain how to do that?
I'm editing the file by hands, but I'm looking to automate as much as possible this task for future releases.

Losangelosgenetics pushed a commit to Losangelosgenetics/FiraCode that referenced this issue Mar 13, 2020
* Remove version constraint on Bundler gem

* Ensure Bundler is installed on CI agents

* Ensure Bundler version 1.17.3 is installed

For compatibility with legacy Ruby releases

* Pin i18n to v1.2 on Ruby 2.0, 2.1 and 2.2

* Loosen constraints on i18n gem

* Loosen constraints on Bundler version

We can remove this once we've stopped supporting legacy versions of
Ruby.
@jjqtony
Copy link

jjqtony commented Feb 27, 2022

Could you upload your glyphs file?

@tonsky
Copy link
Owner

tonsky commented Mar 15, 2022

Try #1387

@tonsky tonsky closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants