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

Bold Font Customisation #120425

Closed
HadyMash opened this issue Apr 2, 2021 · 3 comments
Closed

Bold Font Customisation #120425

HadyMash opened this issue Apr 2, 2021 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@HadyMash
Copy link

HadyMash commented Apr 2, 2021

Hello, I hope you are doing well.

I would like to be able to better customise fonts in VS Code. Many fonts come with multiple font weights such as light, regular, medium, semi-bold, bold, etc. with some even having variable weights. I recently started using Fira Code instead of the default font and I am loving it. I am currently using the One Dark Pro theme and I customised the theme to have parameter variables to be a different colour an to be bold using "fontStyle". The problem is that I find Fira Code's bold to be too bold and I think the medium weight is a much better alternative. The "fontStyle" parameter doesn't allow for any in between and it's either normal or bold. something like the "editor.fontWeight" option takes in normal, bold, but also takes values between 1 and 1000 to have an 'in between'.

I would like to have an option to set which font in the font family is the 'bold' so for example I can set what VS Code considers to be bold as the medium weight. An alternative solution would be to allow the textMateRules' settings' "fontStyle" to be similar to the editor.fontWeight where I can put in numbers and not just "bold".
Sorry if this is already a feature I am not aware of but I tried looking through VS Code's settings and I couldn't find anything. I also had a look online and couldn't find what I was looking for.

@alexdima
Copy link
Member

@HadyMash Have you tried using Fira Code Medium as the font family? This works for me on macOS:

Kapture.2021-04-12.at.17.33.28.mp4

I got the name from the Font Book on macOS:

image

@alexdima alexdima added the info-needed Issue requires more information from poster label Apr 12, 2021
@HadyMash
Copy link
Author

Hello @alexdima
I don't want to use the Medium font weight throughout all of VS Code, I used the theme customisation options and to make parameter variables bold, the problem is that they are too bold. I want to be able to customise that.

This is what I did:

"editor.tokenColorCustomizations": {
	"[One Dark Pro]": {
		"textMateRules": [
			{
				"scope": "variable.parameter",
				"settings": {
					"foreground": "#c2c2c2",
					"fontStyle": "bold"
				},
			}
		]
	}
}

The problem is that the "fontStyle" doesn't allow for customisation of the 'boldness' of the font, that's what I would like to be able to customise, similar to the "editor.fontWeight" option.
Thanks for your help.

@alexdima
Copy link
Member

Thank you for the extra information. Let's track in #24830 .

@alexdima alexdima added the *duplicate Issue identified as a duplicate of another issue(s) label Apr 12, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants