deltachat / deltachat-ios

Email-based instant messaging for iOS.
GNU General Public License v3.0
306 stars 49 forks source link

Emoji avatar is displayed shifted in the QR code screen #2200

Open Raiden-GH opened 1 month ago

Raiden-GH commented 1 month ago

When an emoji is used as an avatar, it is displayed shifted upwards in the QR code screen.

DC-iOS 1.46.2

Emoji-Avatar

r10s commented 1 month ago

yeah, this comes form the svg renderers that are buggy on different levels across platforms :/

we tried to work around these bugs for the "mass cases" of letters, so that it looks at least somehow good then. not sure if we can tweak that further without replacing svg alltogether :/

Simon-Laux commented 1 month ago

using https://github.com/RazrFalcon/resvg might work better, font alignment in my test is correct, but on my system it has problems loading fonts at all. maybe the wasm version in a web view would work better / more consistently. the advantage to resvg is that they aim to be very standard compliant and have a huge test suite.

Also macOS Finder displays the svg just fine for me, so maybe the system can already do it without extra libraries on newer phones? (though I don't know if that good svg support is native or a quicklook extension of one of my image editors)

iOS also displays a svg file with emoji avatar correctly in its media preview that I get when I open the svg file attachment in dc. (maybe don't use the lib on newer devices?)