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

can be auto-load all fonts from OS installed? #4800

Closed
ccpwcn opened this issue Jul 8, 2024 · 2 comments
Closed

can be auto-load all fonts from OS installed? #4800

ccpwcn opened this issue Jul 8, 2024 · 2 comments

Comments

@ccpwcn
Copy link

ccpwcn commented Jul 8, 2024

When written a bigger than normal application (like hello word), I need copy a or more(in more cases, need copy more) font file into project directory, then, application need to be published with the font file, that's more large.
开发一个稍等大一点的应用程序(至少比hello world的demo要大的时候),通常需要一个或多个字体文件,如果把字体文件打到包中或者随包发行,只会让应用程序更大,这不太友好。

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

If the framework can auto-load all fonts from OS, include non-english fonts, in most instances, application will be running nice.
note: The non-english charactors must be show normal, It can't be garbled.
如果框架能自动从操作系统加载已经安装的字体文件,那就会运行起来很好,因为这样开发者可以使用各操作系统中自带的字体直接使用而不必自己拷贝字体文件到代码工程中去。
特别需要注意的是: 非英文字符必须得正常展示,不能是乱码,不支持非英文语言UI,这真的是太糟糕了。

Describe alternatives you've considered

Additional context

@YgorSouza
Copy link
Contributor

The fontdb crate lets you scan the installed system fonts, which you should be able to add to egui like in the custom_font example. I haven't tried that, though.

@emilk
Copy link
Owner

emilk commented Jul 8, 2024

There's nothing built-in to egui for loading fonts from the OS, but once we switch to Cosmic Text it should be a lot easier:

@emilk emilk closed this as not planned Won't fix, can't repro, duplicate, stale Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants