react-native-svg
react-native-svg copied to clipboard
fix: drawing unicode emojis on iOS
Summary
Fixes: #2783
This PR fixes the emoji rendering:
Changes [emojiLabel.layer renderInContext:context] into [emojiLabel drawTextInRect:emojiLabel.bounds] to overcome emojis pixelation
Test Plan
Run example from issue: #2783 and check if emojis are pixelated.
Compatibility
| OS | Implemented |
|---|---|
| iOS | ✅ |
| MacOS | ❌ |
| Android | ❌ |
| Web | ❌ |
Checklist
- [X] I have tested this on a device and a simulator
- [ ] I added documentation in
README.md - [ ] I updated the typed files (typescript)
- [ ] I added a test for the API in the
__tests__folder
After some testing with my updated reproduction, it seems the emoji position is flipped horizontally and emoji don't fit well with other text 😅
https://gist.github.com/TPXP/a2595d2f2f85c4524f470fc343787450
This works well on my side too, thanks for fixing!