Skip to content

Support SVG Text Rendering in egui_extras#5979

Merged
emilk merged 3 commits intoemilk:masterfrom
cernec1999:master
Apr 14, 2025
Merged

Support SVG Text Rendering in egui_extras#5979
emilk merged 3 commits intoemilk:masterfrom
cernec1999:master

Conversation

@cernec1999
Copy link
Copy Markdown
Contributor

Added

  • Create svg_text feature flag to support text rendering & loading of system fonts.

Changed

  • Updates resvg to 0.45.
  • Adds usvg::Options field to the SvgLoader structure.
  • Change function signatures to support passing usvg::Options to downstream load_svg_bytes_with_size.

Additional Info

@emilk emilk added feature New feature or request egui_extras labels Apr 13, 2025
Copy link
Copy Markdown
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 great!

Please merge in latest master to (hopefully) fix the red CI

@github-actions
Copy link
Copy Markdown

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

@emilk
Copy link
Copy Markdown
Owner

emilk commented Apr 13, 2025

Also needs cargo clippy

@cernec1999 cernec1999 requested a review from emilk April 14, 2025 03:42
@emilk emilk changed the title bugfix / feature: Support SVG Text Rendering in egui Support SVG Text Rendering in egui_extras Apr 14, 2025
@emilk emilk merged commit 0f1d6c2 into emilk:master Apr 14, 2025
25 checks passed
darkwater pushed a commit to darkwater/egui that referenced this pull request Aug 24, 2025
**Added**
* Create `svg_text` feature flag to support text rendering & loading of
system fonts.

**Changed**
* Updates `resvg` to `0.45`.
* Adds `usvg::Options` field to the `SvgLoader` structure.
* Change function signatures to support passing `usvg::Options` to
downstream `load_svg_bytes_with_size`.

**Additional Info**
* I used this PR as a reference:
emilk#4659. @xNWP can you see if this
adequately resolves your concern from your original PR?
* Closes emilk#5977 (we may want to open
another issue for my other thoughts in this issue)
* Also, I would like to thank @xNWP and their original PR for being a
good reference for this one.
* [x] I have followed the instructions in the PR template
@xNWP
Copy link
Copy Markdown

xNWP commented Aug 29, 2025

I totally missed this, oops! But thanks for cleaning this up and finishing it, looks good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui_extras feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG Text Rendering Issue in egui_extras

3 participants