Skip to content

Should allow adjusting font weight #381

Closed

Description

@calmh

We have the settings editor.fontFamily and editor.fontSize, but I'm missing an editor.fontWeight. This is most needed when using a dark theme, as folds become visually bolder in that setting. Compare for example Code using Input Mono (regular):

screen shot 2015-11-20 at 22 14 34

with Sublime Text using Input Mono Thin:

screen shot 2015-11-20 at 22 15 13

This could be either accomplished by a weight setting similar to the CSS font-weight, or as part of the font name (i.e. Sublime text accepts "Input Mono Thin" as the font name, while Code currently rejects that).


Oh, and kudos for creating an editor experience to rival the best on Mac! I never thought the day would come when I'd run a Visual Studio product on Mac, but I'm happy to be proven wrong!

Activity

  1. added
    feature-request
    on Nov 24, 2015
  2. alexdima commented on Nov 24, 2015

    @alexdima
    Member

    Thank you for the kind words. Will look into adding this

  3. torarvid commented on Dec 9, 2015

    @torarvid

    Jakob Borg (@calmh) While waiting for this, there is a workaround for us OS X users, as seen on this Issue from Atom: atom/atom#3790

    (Basically, strip spaces, and put a hyphen between the font name and the weight, so InputMono-Thin in your case. I use Source Code Pro Light myself, and so setting it to SourceCodePro-Light works for me)

  4. calmh commented on Dec 9, 2015

    @calmh
    Author

    Oh! Neat! I had resorted to disabling the variants except thin and bold in font book. :)

  5. jpleau commented on Jun 15, 2016

    @jpleau

    Hi, any updates on this? Some fonts look better when they are bold, an "editor.fontWeight" or "editor.fontStyle" setting would be awesome!

    Thanks

  6. mehas commented on Aug 4, 2016

    @mehas

    Consolas (the default monospace typeface for Windows) appears bold in VSC for some reason, but others don't.

  7. escobera commented on Aug 5, 2016

    @escobera

    This feature is really a deal breakeer for me. Any news on this? alexandrudima

  8. alexdima commented on Aug 5, 2016

    @alexdima
    Member

    PR welcome, IMHO it is straight-forward to implement by following the fontFamily or fontSize settings.

  9. added
    good first issue
    on Aug 5, 2016
  10. jpleau commented on Aug 5, 2016

    @jpleau

    fwiw, I started work on this by implementing the "fontWeight" setting.

    I had to stop for a bit since at the time, current master did not work correctly for the terminal panes, I will continue work in the next weeks after my vacation.

  11. conceptualspace commented on Aug 5, 2016

    @conceptualspace

    💃

  12. 13 remaining items

  13. mouhong commented on Sep 12, 2016

    @mouhong

    alexandrudima I found that, if I inspect your GitHub comment in Chrome, and manually set style font-weight: 300, the font will get thinner. Interesting.

  14. alexdima commented on Sep 12, 2016

    @alexdima
    Member

    One thing to keep in mind is that I am on Chrome 53, while VSCode is on Chromium 49, so that might have an impact too.

  15. dkondratovych commented on Sep 28, 2016

    @dkondratovych

    alexandrudima

    Doesn't work for me

    Version 1.5.3 (1.5.3)
    5be4091

    screen shot 2016-09-28 at 4 18 32 pm

    I am trying different values, but font looks the same

    screen shot 2016-09-28 at 4 18 03 pm

    Also it would be great to add list of possible values from editor.fontWeight in Default Settings file. Now user has to read PR/codebase to understand what is acceptable

  16. regs01 commented on Sep 28, 2016

    @regs01

    It does work. It's just Consolas doesn't have light version. Don't know where to report it. But, i think, MS employees here could forward it to font devs.

  17. wprater commented on Oct 14, 2016

    @wprater
    Contributor

    are we able to expose -webkit-font-smoothing: antialiased so we can get a better rendering on macOS?

  18. regs01 commented on Mar 5, 2017

    @regs01

    wong
    Until we have Consolas Light alternatively you can use Source Code Pro from Adobe.
    https://github.com/adobe-fonts/source-code-pro/releases

  19. chantlong commented on Mar 5, 2017

    @chantlong

    regs01 I was using Operator Mono. I found a way to make it work without explicitly setting fontWeight. I used OperatorMono-Light for family which helped set the correct fontWeight. Thanks.

  20. gabrielnogueira commented on Mar 29, 2017

    @gabrielnogueira

    Hi everyone.
    alexandrudima What confused me is what comments are rendered with a font weigth more lighter that the rest of the code. Is it some config that you guys pass to chromium to render this way? I think if all the code render with the same weigth of comments, everybody will be happy. some idea?

    font weight

  21. austinthiel commented on Aug 14, 2017

    @austinthiel

    I'd like to hope that gabrielnogueira is onto something here. Can anybody (no pun intended) comment on that?

  22. TanelS commented on Aug 14, 2017

    @TanelS

    Part of the perceived font-weight is related to contrast between background and the font itself. For example the Monokai is quite unbearable, font colors are rather bright on dark background. Bright letters are using more sub-pixels and thus creating the too-bold-font perception. I've switched to Atom One Dark theme and everything looks better now. Even VS Code own softer Color Themes look better (Monokai Dimmed etc). And for the comment that comments are rendered lighter - as comments are dimmer, they are using (visually) less sub-pixels thus they are visually lighter.

  23. austinthiel commented on Aug 14, 2017

    @austinthiel

    TanelS Thanks for the explanation. Although, comparing the same font + background on VS Code (left) and cmder (right), they display very differently, and cmder looks much more crisp. Is this entirely the fault of how chrome renders fonts?
    Example

  24. TanelS commented on Aug 14, 2017

    @TanelS

    Austin Thiel (@austinthiel) VSCode uses Electron as rendering engine. And most of the font anomalies are because of that. Hopefully the Electron devs are able to handle the font-weight problems. Meanwhile I personally use less contrasted color themes as a workaround.

  25. austinthiel commented on Aug 14, 2017

    @austinthiel

    I see that now. I chose the font + background on another Electron app and it's got that same fuzz-factor to it. That's a bummer, I hope it's resolved soon.

    Edit: If anybody's looking for a decent crisp-looking font, try Inconsolata

  26. locked and limited conversation to collaborators on Nov 18, 2017
  27. ghost deleted a comment from on Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions