servo icon indicating copy to clipboard operation
servo copied to clipboard

latin characters in svg images are rendered greek

Open derdilla opened this issue 6 months ago • 4 comments

Describe the bug: Consider this image: https://derdilla.com/assets/android-levels.svg

On branch servo in debug mode renders:

Image

To Reproduce: Open link above

Platform: On branch servo, commit: 8ad27f9f46be463cccf1d2273c17b1104c3ac85b debug mode, manjaro

~~I'm interested in working on this, happy about any pointers on where to start.~~

derdilla avatar Jun 07 '25 08:06 derdilla

Can you reproduce the same issue in https://github.com/linebender/resvg/blob/main/crates/resvg/examples/minimal.rs ? If so, we should file this issue in the resvg repo.

jdm avatar Jun 07 '25 09:06 jdm

resvg/minimal.rs output is correct (although quite low res):

Image

derdilla avatar Jun 07 '25 09:06 derdilla

On Ubuntu 20.04 build based on 1b5a10a55fe1215f7d965e00a0f3bddc0d47711a there is no text in the bubbles at all for me.

sebsebmc avatar Jun 08 '25 19:06 sebsebmc

Same on android. From what I've gathered, missing fonts are due to resvg's naive font loading. It only checks a few hardcoded directories.

Maybe servo could give resvg more context? Currently, SVGs rendering looks quite independent of the context (and presumably in the wrong place for proper integration).

derdilla avatar Jun 08 '25 20:06 derdilla