简体   繁体   English

vscode扩展中状态栏项目的自定义图标

[英]Custom icon of status bar item in vscode extensions

文档https://code.visualstudio.com/docs/extensionAPI/vscode-api说 icon-name 可以从 ocicon 中获取,是否可以插入不是 ocicon 的图标?

No, you can't, at least, not yet.不,你不能,至少现在还不能。

There is an open issue asking to support more icons, but no Milestone defined.有一个未解决的问题要求支持更多图标,但没有定义里程碑。

You can add your custom icon.您可以添加自定义图标。 https://glyphter.com/ add your 5 X 5 svg logo here in section A, then Download the font. https://glyphter.com/在 A 部分中添加您的 5 X 5 svg 徽标,然后下载字体。

in vscode's package.json在 vscode 的 package.json 中

"contributes": {
 "icons": {
        "custom-icon-id": {
            "description": "custom descr",
            "default": {
                "fontPath": "./customicon.woff", //woff file
                "fontCharacter": "\\41" //you added svg logo in section A
            }
        }}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM