Conversation
…ature. Updates resvg to version 0.42
commented! |
|
i think for demonstration purposes (and to make testing easier in the future), it'd be a good idea to add an example that shows text in svgs in action |
emilk
left a comment
There was a problem hiding this comment.
I agree that an example would be nice, but LGTM anyway.
Would this text rendering work on web?
I was wondering the same thing shortly after making the PR 😅, I'm not great at web dev stuff but I'll take a look at it now and test some things.
after checking the web stuff I'll also look at how y'all test/write example code and see what I can do 😊 |
Short answer, no. |
|
Thanks for testing web. Please document your findings, i.e. document that the We should also figure out a solution to the duplicated dependencies. |
|
Disregard this PR (for now). Apologies for the delay in this, adhd is a bitch. But while looking at this again I realized that I mistakenly have it set up in a way that the system fonts are being loaded EVERY single time egui loads a new svg, instead it should be loaded once (during the install image loaders call likely), and that font database should be reused by the SVG loader. I also realized that I could likely solve the problem of no fonts on the web by allowing you to load/embed the font data directly (moving the problem onto the egui user). When I find the time to reimplement this in a better way I'll open a new PR and reference this one :) |
**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: #4659. @xNWP can you see if this adequately resolves your concern from your original PR? * Closes #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
**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
Added
svg_textfeature flag.Changed
0.37to0.42.