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

[theming] Allow theming workbench fonts #26128

Open
be5invis opened this issue May 6, 2017 · 19 comments
Open

[theming] Allow theming workbench fonts #26128

be5invis opened this issue May 6, 2017 · 19 comments
Assignees
Labels
feature-request Request for new features or functionality themes Color theme issues
Milestone

Comments

@be5invis
Copy link
Contributor

be5invis commented May 6, 2017

Including

@aeschli aeschli changed the title More theme options — Typography Allow theming workbench fonts May 8, 2017
@aeschli aeschli added feature-request Request for new features or functionality themes Color theme issues labels May 8, 2017
@aeschli aeschli added this to the Backlog milestone May 8, 2017
@aeschli aeschli removed their assignment May 8, 2017
@pahen
Copy link

pahen commented May 25, 2017

I would love this! This is how the Ayu theme could look like if we had this feature.

screen shot 2017-05-25 at 23 12 24

@guidobouman
Copy link

Also see this similar issue about allowing the setting of a custom font on non-editor parts of the app: #519

@leonbreedt
Copy link

leonbreedt commented Sep 16, 2017

This is probably my biggest annoyance switching from Atom, that I have to live with the standard font.

EDIT: "Fixed" by hacking /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.css, and dismissing "corrupt" warning, but a feature would be preferable...

@johnpapa
Copy link

johnpapa commented Nov 29, 2017

Adding these as per @aeschli and @chrisdias

These are not all about the fonts. some are letter spacing, font-style, color, too.

Font settings for the VS Code Shell

The font-family for the shell itself, so we can change the title bar, sidebar, status bar, file tabs, and more. This would be the default for the shell and help match the code.

.monaco-shell {
  font-family: 'Operator Mono', 'Fira code', 'Inconsolata', monospace;
  letter-spacing: 0.5px;
}

Panel headers

Expose the color, font settings and letter spacing for the panel header titles. Letter spacing is sometimes needed as the titles' letters are very close and more difficult to read in some fonts.

.vs-dark .monaco-panel-view .panel > .panel-header > .title {
  font-weight: normal;
  letter-spacing: 1px;
}

Window titles

Expose color, font settings, and letter spacing for window titles

.vs-dark .monaco-workbench > .part.titlebar > .window-title {
  color: #fafafa;
  letter-spacing: 1px;
  font-weight: 200;
}

File Tabs

Expose color, font settings, and letter spacing for tabs (file tabs)

image

.monaco-workbench .tabs-container .tab * {
  font-style: italic;
}

@johnpapa
Copy link

@aeschli Can you provide some feedback on which of these may be within your roadmap?

@RomainLanz
Copy link

Any news on this?

@niranjannitesh
Copy link

Starting to hate vscode on ubuntu because I dont like the ubuntu font in the UI.

@ryaninvents
Copy link

ryaninvents commented Mar 3, 2019

I'm in the camp of people who would like to use an alternate UI font on Ubuntu. Here's how I managed to do it.

I downloaded a copy of my font of choice -- Lato -- and used FontForge to rename it to "Ubuntu". (I'd wanted to name it "BlinkMacSystemFont" so it wouldn't collide, but VS Code applies OS-specific font settings, so that wasn't possible.) I updated Regular, Italic, Bold, and Bold Italic, then copied the new font files to ~/.fonts and ran fc-cache -f -v to reload the font cache.

It would be nice if there were an unused font name at the start of the font-family declaration, such as LinuxSystemUI, so we wouldn't have to "clobber" the Ubuntu font. However, I'm happy with my setup now.

image

@ghost
Copy link

ghost commented Mar 9, 2019

You don't have to mess with system fonts, since there is an extension called Custom CSS and JS Loader, which allows you to theme VSCode in a similar way to Firefox with userChrome.css.

The rule to change the UI font would be like:

body {
  font-family: "Roboto" !important;
  font-size: 9.5pt !important;
}

@be5invis
Copy link
Contributor Author

@wsdfhjxc However we want an official way to do this, so theme authors can fully implement their design.

@jonbp
Copy link

jonbp commented Mar 12, 2019

Starting to hate vscode on ubuntu because I dont like the ubuntu font in the UI.

I thought i was the only one.. My whole system is Roboto except VS Code

@mikelpr
Copy link

mikelpr commented Mar 27, 2019

another workaround is to add the following to ~/.config/fontconfig/fonts.xml

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 ... (snip or maybe nothing)
 <match>
  <test name="family" qual="any">
   <string>Ubuntu</string>
  </test>
  <edit binding="same" name="family" mode="assign">
   <string>Roboto</string>
  </edit>
 </match>
 ...
</fontconfig>

@camilopedroso
Copy link

camilopedroso commented Mar 30, 2019

Adding these as per @aeschli and @chrisdias

These are not all about the fonts. some are letter spacing, font-style, color, too.

Font settings for the VS Code Shell

The font-family for the shell itself, so we can change the title bar, sidebar, status bar, file tabs, and more. This would be the default for the shell and help match the code.

.monaco-shell {
  font-family: 'Operator Mono', 'Fira code', 'Inconsolata', monospace;
  letter-spacing: 0.5px;
}

Panel headers

Expose the color, font settings and letter spacing for the panel header titles. Letter spacing is sometimes needed as the titles' letters are very close and more difficult to read in some fonts.

.vs-dark .monaco-panel-view .panel > .panel-header > .title {
  font-weight: normal;
  letter-spacing: 1px;
}

Window titles

Expose color, font settings, and letter spacing for window titles

.vs-dark .monaco-workbench > .part.titlebar > .window-title {
  color: #fafafa;
  letter-spacing: 1px;
  font-weight: 200;
}

File Tabs

Expose color, font settings, and letter spacing for tabs (file tabs)

image

.monaco-workbench .tabs-container .tab * {
  font-style: italic;
}

Hi @johnpapa!
Is there a solution for PC? I tried your recipe, but, It's not working!
Thanks in advance!

@aeschli aeschli self-assigned this Oct 28, 2019
@aeschli aeschli changed the title Allow theming workbench fonts [themeing] Allow theming workbench fonts Oct 28, 2019
@aeschli aeschli changed the title [themeing] Allow theming workbench fonts [theming] Allow theming workbench fonts Oct 28, 2019
@lambdakris
Copy link

This sounds related to this older issue #519

@AlexWayfer
Copy link

This sounds related to this older issue #519

If not a duplicate.

@mitsukuri
Copy link

mitsukuri commented Jan 11, 2023

This sounds related to this older issue #519

If not a duplicate.

With about 2000 upvotes more and 8 years older...

@m417z
Copy link

m417z commented Jan 11, 2023

I'd like to offer a solution for Windows which might be preferable for some users due to its simplicity of usage, and might seem like an overkill for others since it requires running a (lightweight) program in the background.

The solution boils down to injecting extra CSS code to VSCode, similarly to what Monkey Patch does, but this method is different and has pros and cons.

Pros:

  • No VSCode files are modified on disc, so there's no risk for a permanent damage.
  • Works seamlessly, no need to do anything after each VSCode update.

Cons:

  • Requires running a (lightweight) program in the background.

Steps:

See the example screenshot below.

image

Disclaimer: I'm the author of Windhawk.

@heartacker
Copy link
Contributor

I'd like to offer a solution for Windows which might be preferable for some users due to its simplicity of usage, and might seem like an overkill for others since it requires running a (lightweight) program in the background.

The solution boils down to injecting extra CSS code to VSCode, similarly to what Monkey Patch does, but this method is different and has pros and cons.

Pros:

  • No VSCode files are modified on disc, so there's no risk for a permanent damage.
  • Works seamlessly, no need to do anything after each VSCode update.

Cons:

  • Requires running a (lightweight) program in the background.

Steps:

See the example screenshot below.

image

Disclaimer: I'm the author of Windhawk.

thank, It works, and could you please do not hide the command center ,Thanks
image

@m417z
Copy link

m417z commented Jan 12, 2023

thank, It works, and could you please do not hide the command center ,Thanks

It's hidden because of the sample JavaScript code which shows a message on the titlebar. Just remove it in the mod's settings.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality themes Color theme issues
Projects
None yet
Development

No branches or pull requests