Replies: 3 comments 4 replies
-
目前我只内置了几种常用字体,通过直接设置变量是起不了作用的,因为程序没有做映射,太多的字体可能会造成困扰。 |
Beta Was this translation helpful? Give feedback.
1 reply
-
仅映射至类名,没有内置字体文件,你有什么场景需要其他字体么? |
Beta Was this translation helpful? Give feedback.
2 replies
-
不建议自己修改,不然会跟不上版本,并且下个版本会有非常大的变化,我可以尝试直接给应用添加自定义字体功能。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
window11 系统上已经安装了字体。
通过 window.queryLocalFonts() 可以获取到了 fontFamily 的值,然后传给 EditorFont 里的 configStore.setConfig('editorFont', e) 设置了 ,但是无法生效。
这里是获取 fontData的代码:
这里是设置字体的代码:
设置微软雅黑是可以的,但是别的字体都不行。不确定是 electron 本来就支持直接设置系统安装的字体,还是我设置的字体名字有问题,求解。
Beta Was this translation helpful? Give feedback.
All reactions