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

Context::add_font #5228

Merged
merged 14 commits into from
Oct 23, 2024
Merged

Context::add_font #5228

merged 14 commits into from
Oct 23, 2024

Conversation

frederik-uni
Copy link
Contributor

make it easier to add fonts.

For example if I want to add a custom FontFamily or if the user wants to add a Chinese fallback

  • I have followed the instructions in the PR template

Copy link

github-actions bot commented Oct 7, 2024

Preview available at https://egui-pr-preview.github.io/pr/5228-add-font
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk added the text Problems related to text label Oct 8, 2024
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very interesting!

I think we should update examples/custom_font/src/main.rs to demonstrate the use of this new API

crates/epaint/src/text/fonts.rs Outdated Show resolved Hide resolved
crates/epaint/src/text/fonts.rs Show resolved Hide resolved
@frederik-uni frederik-uni requested a review from emilk October 8, 2024 12:37
@frederik-uni
Copy link
Contributor Author

@emilk the changes you requested were made

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; just needs some improved comments

crates/egui/src/context.rs Outdated Show resolved Hide resolved
crates/egui/src/context.rs Outdated Show resolved Hide resolved
crates/egui/src/context.rs Outdated Show resolved Hide resolved
crates/egui/src/context.rs Outdated Show resolved Hide resolved
examples/custom_font/src/main.rs Show resolved Hide resolved
examples/custom_font/src/main.rs Show resolved Hide resolved
frederik-uni and others added 6 commits October 23, 2024 10:49
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Emil Ernerfeldt <[email protected]>
@emilk emilk added the egui label Oct 23, 2024
@emilk emilk changed the title Add font Context::add_font Oct 23, 2024
@emilk emilk merged commit 04ab5e7 into emilk:master Oct 23, 2024
24 of 25 checks passed
@emilk
Copy link
Owner

emilk commented Oct 23, 2024

thanks!

hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
make it easier to add fonts. 

For example if I want to add a custom FontFamily or if the user wants to
add a Chinese fallback
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui text Problems related to text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants