I would like to turn off the font ligatures for a text. I use the Fira Code font, but I can't find a way to turn off the ligatures in TextStyle in my app.
Can anyone help me?
When you use a Text widget, you can enable or disable various FontFeatures via its TextStyle. Looking at Fira Code in https://wakamaifondue.com/, it appears ligatures are controlled by the calt feature, which is enabled by default. You therefore could try disabling that:
Text(
someString,
style: TextStyle(fontFeatures: [FontFeature.disable('calt')]),
)
Alternatively, Fira Code is open-source and has build options to enable or disable features in the generated font files.
Related
I want to disable font antialiasing (set it to non-antialias, non-cleartype) style. But cant found such option. It will be helpful to direct me in settings.
Thank you
This is what my settings is looking like:
This is the weird spacing between letters in terminal:
Why is the font on my VS Code's terminal have this weird spacing between letters? It is really bugging me and I tried to change the font in the settings to a monospace font (inconsolata), but that hasn't worked.
I think those big spaces between the characters comes from your exotic chosen font (Inconsolata). So change only "terminal.integrated.fontFamily": "Inconsolata" back to the default font:
"terminal.integrated.fontFamily": "Monaco"
And look, to need the double-quote, and not some triple quote like in your screenshot!
This usually happens when the chosen font is not installed on your system. Try to revert the font settings by removing or commenting these two lines:
"terminal.integrated.fontFamily": "Inconsolata"
"Editor.fontFamily": "Source Code pro"
The default font is usually the default monospace font of your system.
VS Code only accepts unicode fonts.
Try to setup:
"terminal.integrated.fontFamily": "monospace"
Using "MesloLGS Nerd Font Mono 11" as the integrated terminal family font fixed this issue.
Don't forget to make sure it is the integrated terminal family font you're setting and not the editor's family font.
How can I change the font family and font size of variables in the screenshot in VSCode?
There is a GitHub issue discussing this problem:
Allow to change the font size and font of the workbench
and someone has added a PR to resolve it:
Add settings for changing the workbench font size and font #144365
So maybe you need to wait for vscode to merge this function.
By the way, in my case,
because the font in variables use the default font of windows10 system - Consolas.
So I choose to change the default font, using Jetbrains Mono to replace Consolas, and it works.
in vscode I am trying to change font family only for font ligatures to Fira Code. I can do it with custom css plugin, but the class for font ligatures (.mtk10) is shared. So if i change it, then it also changes font for if, else, this and other keywords. Is there any way to target only font ligatures?
This is my custom css style:
.mtk10 {
font-family: Fira Code;
}
I would not recommend that at all. You can, however, edit your own font and add ligatures inside that. Check this tutorial on how to create a font with ligatures.
You can also check out this October 2019 Release Notes - stylistic sets.
If you'd rather setup ligatures with Fira Code and use that font as well, then you can do that by the following set of instructions.
Step #1: Install Fira Code.
Step #2: Set the font in VSCode settings:
"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
Step #3: Restart/reload VSCode.
That's about it.
I don't actually mean the default font they use on the editor, but the font that appear in the images on the site itself.
For example this one:
https://i.imgur.com/71UX5tU.jpg
https://code.visualstudio.com/images/1_14_js-refactoring.gif
It's not Consolas or Menlo because of how it renders the "g". I'm just trying to get that exact same look on Windows, but I can't find a good match.
It is virtually impossible to know which font they are using unless they explicitly say. I do not know of any place where they do.
Within the stock version of VS Code, unless you specify otherwise in settings.json, the default font priority is: Consolas, Courier New, and then monospace.
According to the Default Settings pane of settings.json:
// Controls the font family.
"editor.fontFamily": "Consolas, 'Courier New', monospace",