lineHeight in MessageText cause emojis to cut
See original GitHub issueIssue Description
Looks like the lineHeight
here https://github.com/FaridSafi/react-native-gifted-chat/blob/master/src/MessageText.js#L71 causes emojis in the top row to cut.
Removing this line seems to fix it btw.
@FaridSafi can we safely remove it or does it have a purpose?
Steps to Reproduce / Code Snippets
Expected Results
Not to cut 😃
Additional Information
- Platform: iOS
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
emojis are causing change in line height - Stack Overflow
You can set a fixed line-height like so: p { line-height: 20px !important; } <p>Alternatively, you can use percentages, which will be ...
Read more >Text cut off although line spacing is sufficient
The line spacing is set to Exactly 6 pt. Although it appears that there is sufficient space for the descenders (parts of the...
Read more >emoji cut-off - CodePen
<div class="note-body"><p>emoji on the second line, after some text ... and a line after that showing the non-emoji line spacing</p></div>.
Read more >Emoji Line Height Incorrect - Scriptable - Automators Talk
The problem is that for some reason the line height of the emoji is not quite the same as the rest of the...
Read more >Emoji has improper css style about `font-size` and `vertical ...
This bug cause emojis has incorrect vertical shift showed below. ... 'Noto Color Emoji'; font-size: 1.4em; line-height: 1em; } ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kfiroo Removing the lineHeight causes the bottom of emojis to cut off, when only a single line of text is present. Increasing the Line-height to
(fontSize + 8)
seems to solve all Emoji issues I’ve run into with React native’s text component.For example, here setting the lineHeight to 24 (16+8) solves the problem of cutting emojis on the top and bottom.
@FaridSafi
@neilsarkar Thanks! can you post images of the same messages using the old
margin
style for comparison? Thanks 😃