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

Update to Phosphor Icons V2.1.0 and a Script for Auto Updates #18

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

connorslade
Copy link
Contributor

First off, thank you for making this crate, it has made getting a large number of icons in egui much easier. But while working on a project, I found an icon I wanted to use on the Phosphor Icons website but it was not available through this crate. Turns out that in the year since the icons were added to this crate, many hundreds of new icons have been added to the Phosphor Icons project.

In this pr, I add an update script that downloads the latest version of Phosphor Icons from the official website, extracts the TTF files into the res directory, and generates the rust code for each variant file. Using the script I also update this crate to the latest Phosphor Icons version, v2.1.0.

New .tff font files are automatically downloaded from phosphoricons.com, and the rust code is generated for each variant.
After some testing, these icons don't seem to work with egui's font rendering.
@connorslade connorslade changed the title Update To Phosphor Icons V2.1.0 And A Script For Auto Updates Update to Phosphor Icons V2.1.0 and a Script for Auto Updates Jul 27, 2024
@amPerl
Copy link
Owner

amPerl commented Jul 30, 2024

Thanks! I've been meaning to do something like this, so the contribution is very much appreciated. I'll include this in the release for egui 0.28.

@amPerl amPerl merged commit 672a8dc into amPerl:main Jul 30, 2024
@bircni
Copy link

bircni commented Jul 30, 2024

What about writing this script in rust and integrating it while building?

@connorslade
Copy link
Contributor Author

Hm, that's an interesting idea. Maybe just the default font files and the selection.json could be packaged with the crate then with a feature flag / env vars you could have it download the latest / some specific version of Phosphor icons. Then you could use new versions of the icons even if you are using an older version of egui or something. What do you think @amPerl? I'd be interested in implementing this if you think it would be a good direction for this project.

@amPerl
Copy link
Owner

amPerl commented Jul 30, 2024

image
will prototype this approach (from egui discord)

@amPerl
Copy link
Owner

amPerl commented Jul 30, 2024

Also I know I pasted in a discord screenshot just now but I do think github issues is the better place to discuss this, it just happened to start there when I posted about the new version

@bircni
Copy link

bircni commented Jul 31, 2024

You can do this using tera files if you want i can give it a try

@bircni bircni mentioned this pull request Jul 31, 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

Successfully merging this pull request may close these issues.

3 participants