microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.2k stars 29.29k forks source link

Add support for different fonts in the same file #30925

Open RobertPaulson90 opened 7 years ago

RobertPaulson90 commented 7 years ago

Add support for choosing different font ligatures, than those within the "editor.fontFamily" selected font. For example, I would really like to use Operator Mono letters together with Fira Code ligatures. Atom-editor lets you do this.

A hacky workaround is with the Custom CSS and JS Loader extension. https://medium.com/@zamamohammed/multiple-fonts-alternative-to-operator-mono-in-vscode-7745b52120a0 @mohammedzamakhan

The Custom CSS and JS Loader extension makes vscode think it is corrupted, so I'd really prefer avoiding this hack.

Another custom workaround, which stopped working: https://gist.github.com/Mikeysax/e707e6971d991a7552017b4c00ef6a97

Semi-related: https://github.com/Microsoft/vscode/issues/192

Possibly helpful: https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions

sagarrabadiya commented 7 years ago

any progress here? eagerly waiting for this.

dmaisano commented 7 years ago

I came across this issue after spending some time reading the same Medium post linked above, I as well would like to my Operator Mono font with Fira Code ligatures. The method in the medium post does not seem to work. If I to take a guess it seems like the styles changed with the recent update of vscode 1.14.2. It's a shame that this does not seem to work, hopefully there will be a solution some time soon :)

sagarrabadiya commented 7 years ago

https://github.com/kiliman/operator-mono-lig

I have found to embed the ligature into operator mono font itself. check the above project looks promising. and for operator mono book https://github.com/kennyklee/operator-mono-book-lig

also, you can apply it to any variant by just renaming script a bit.

ideologysec commented 6 years ago

I use Pragmata Pro, and would love to see ligature support in VS Code for generic fonts that have ligatures, as opposed what seems to be essentially whitelisting fonts that the developers are aware of.

(though I'd probably be satisfied with support for just my particular font/use case, of course...)

rdyson commented 6 years ago

Late to the game. I was able to add ligatures using the Killman operator-mono-lig project as mentioned by @sagarrabadiya above, and adding "editor.fontLigatures": true in my settings.json.

Here's my fonts section in VS Code's settings.json:

{
    "editor.fontSize": 18,
    "editor.fontFamily": "Operator Mono Lig, Menlo, Monaco, 'Courier New', monospace, 'Apple Color Emoji'",
    "editor.fontLigatures": true
}
TheSETJ commented 6 years ago

I find this related to my subject, so I request it here. Is it possible to have support for multiple font families in VS Code? I like my comments be in different font family for example.

As mentioned there is an Custom CSS and JS Loader extension, but I don't like it because it seems VS Code complain about using it (with promoting it's corrupted).

didinele commented 5 years ago

Any updates on this? eagerly waiting

NatanAmorim commented 2 years ago

This would be so good, and people have been hacking vs code to do this for more than 5 years, i would love if somehow we could implement as an official feature and dont worry about breaking vs code anymore.

man-trackunit commented 12 months ago

And now with GitHub's own Monaspace fonts... Neon for code, radon for comments 💯

7flash commented 10 months ago

Any suggestions where to start from trying to implement this feature? I need it actually for rendering same font but in different sizes at the same file. #200971