问题
Accordingly to this commit, ST3 has support for Fira Code ligatures, but I still don't see any changes.
Obviously I have installed Fira code and have "font_face": "Fira Code",
settings for this in my user settings file.
But my code still with default font, without ligatures. How I can fix it?
回答1:
As mentioned on https://blog.sarav.co/installing-fira-code-ligatures-sublime-text-3-mac-os/. Ligature support on Sublime Text has been enabled from version 3156+.
Download Dev Version 3156
First head over to https://www.sublimetext.com/3dev and then download the latest Sublime Text dev version 3156+.
NOTE : Kindly note that dev versions is only available for licensed user and downloading dev version might break something.
If you have not installed Fira Code already, go to https://github.com/tonsky/FiraCode and download the zip from github and extract it. You’ll find the ttf
folder under distr
folder. Copy all the files and paste them over under /Users/<username>/Library/Fonts
folder.
Finally, open the installed sublime text and hit cmd+,
you will see Preferences.sublime-settings
. Paste the following code there.
"font_face": "Fira Code",
"font_options":
[
"gray_antialias"
],
Thats it! Now ligatures are enabled on your system. Enjoy :)
回答2:
Fira Code
is Light by default, you can use/modify this setting:
"font_face": "Fira Code Medium",
// or ** Retina, Regular, Bold...
"font_options":
[
"gray_antialias",
"subpixel_antialias"
],
"font_size": 13,
"line_padding_top": 1,
回答3:
For linux users:
Go to https://github.com/tonsky/FiraCode
Download and extract the zip file.
Copy all files from ttf
folder which is in distr
folder to
/home/.local/share/fonts/
In Sublime open
Preferences-> Settings
and copy the following code under Preferences.sublime-settings - User (right side of screen, put it in 2nd row just under the {
"font_face": "Fira Code",
"font_options":
[
"gray_antialias"
],
Now, if it still doesn't work after restarting Sublime, enter
fc-cache -f
in terminal and restart Sublime again.
I hope this works for you as well ...
回答4:
It was a pain make Fira Code works in Sublime3. But i finally done. You must to download the last version of sublime first, because previous version of sublime does not support ligatures. Link here.
In addition till now this big changes is not yet the stable version of Sublime Text it's just in the Dev Build 3152 and above, so make sure you have the right version.
Then you have to go to Preferences->Settings and put:
"font_face" : "Fira Code"
来源:https://stackoverflow.com/questions/47025537/sublime-text-3-fira-code-ligatures