SVG drawing mangled if OS locale does use a different floating point presentation
TheSamsa opened this issue · 4 comments
This issue originated in the oni2 repo. After the Update to the SVG Icons in the sidebar two icons where drawn very odd:

I dug a little bit into the code and discovered there is probably nothing oni2 can change, so I reopened the issue here.
It might even a problem with Skia, but since my OCaml is kind of non existant I can't tell you for sure.
-
Operating System:
Linux Manjaro -
Revery Version:
Git Hash 9ec44ff -
OCaml version:
4.12 -
Native, Bytecode, or JS build:
? -
Link to github repo:
onivim/oni2#3642 -
Steps to reproduce:
start Oni2 withexport LC_NUMERICAL=de_DE.UTF-8; oni2 -
Actual Result:
The search and package icons are drawn wrongly -
Expected Result:
even with a different LC_NUMERICAL setting in the unix OS the icons should be drawn the same -
Additional Information:
The reason why those icons are drawn wrong has to do with the representation of the float values. If for example all the float values are replaced with integers the drawing of the icons is nearly as it should be (only details) -
Search terms used:
svg, locale
Hey @TheSamsa -- thanks for pointing this out! I think I may have found the source of this bug in Skia -- are you able to set your esy-skia resolution to 5264b0f in Onivim and see if that fixes the bug?
Hey @zbaylin this did work!
I actually thought I found corresponding Issues in Skia (https://bugs.chromium.org/p/skia/issues/detail?id=11132&q=svg%20locale&can=2) and (https://bugs.chromium.org/p/skia/issues/detail?id=11794&q=svg%20locale&can=2)
But your solution solved my issue anyways.
Awesome @TheSamsa! Glad to hear it. I opened a PR to our Skia fork to hopefully fix this: revery-ui/esy-skia#37