Steps to replicate the issue (include links if applicable):
- Add a <text> element in an SVG file
- Set its size in rem units rather than px units (with the common formula px = rem×16)
- The rendering size of the text differs
- I should mention that my example uses a dynamically-sized SVG file with a viewBox but no width and height ; not sure if it influences the bug (tbt)
https://commons.wikimedia.org/wiki/File:Font_size_rem_bug.svg
What happens?:
The text renders in a smaller font than a pixel font size would
What should have happened instead?:
The text should have rendered with the same font size than a px counterpart (assuming the px = 16×rem conversion rule)
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Tested on Wikimedia Commons