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

Product Icons: iconDefinitions.font doesn't seem to work when there are multiple fonts #94215

Closed
eamodio opened this issue Apr 1, 2020 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug themes Color theme issues verified Verification succeeded
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Apr 1, 2020

Refs: #93798

I've tried having 2 font sources, and then for certain icons use one font or another, but it seem that only the first font in the fonts array is ever used.

@aeschli
Copy link
Contributor

aeschli commented Apr 1, 2020

in the definition, do you specify the fontId? If left out, the first defined font will be taken
(at least that's the intention...)

@eamodio
Copy link
Contributor Author

eamodio commented Apr 1, 2020

I didn't see a fontId property, but I did set the font property.

{
	"fonts": [
		{
			"id": "elegant",
			"src": [{ "format": "woff", "path": "./ElegantIcons.woff" }],
			"style": "normal",
			"weight": "normal"
		},
		{
			"id": "font-awesome",
			"src": [{ "format": "otf", "path": "./Font Awesome 5 Free-Regular-400.otf" }],
			"style": "normal",
			"weight": "normal"
		}
	],
	"iconDefinitions": {
		"compare-changes": {
			"font": "font-awesome",
			"fontCharacter": "\\e030"
		},
		"git-commit": {
			"font": "elegant",
			"fontCharacter": "\\e030"
		},
		"activate-breakpoints": {
			"font": "font-awesome",
			"fontCharacter": "\\e030"
		}
	}
}

@eamodio
Copy link
Contributor Author

eamodio commented Apr 1, 2020

I just tried using fontId instead and didn't see any change in behavior.

@aeschli aeschli modified the milestones: March 2020, April 2020 Apr 2, 2020
@aeschli aeschli added the bug Issue identified by VS Code Team member as probable bug label Apr 14, 2020
@aeschli aeschli added the themes Color theme issues label Apr 14, 2020
@aeschli
Copy link
Contributor

aeschli commented Apr 14, 2020

It is fontId. The schema was wrong. I verified if works with two different fonts

@JacksonKearl JacksonKearl added the verified Verification succeeded label Apr 30, 2020
@JacksonKearl
Copy link
Contributor

Wasn't able to get font-awesome to show up as anything besides boxes, but thats likely an issue on my end. elegant seemed to work fine

@sbatten
Copy link
Member

sbatten commented Apr 30, 2020

@JacksonKearl see my comment here #94209 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug themes Color theme issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants