Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text with emojis is not properly aligned with the bullet point in List block #2935

Open
fluiddot opened this issue Dec 28, 2020 · 6 comments
Labels
[OS] iOS [Type] Bug Something isn't working

Comments

@fluiddot
Copy link
Contributor

fluiddot commented Dec 28, 2020

Describe the bug
Add emoji characters to List block pushes the text lines some pixels down.

To Reproduce

  1. Go to a post/page.
  2. Add a List block.
  3. Add text with at least one emoji character.

Expected behavior
Text lines should be aligned with the bullet point.

Screenshots

list_block_emoji_bug.mp4

Smartphone (please complete the following information):

  • Device: iPhone 8
  • OS: iOS 14.0
  • Version WordPress 16.3
@fluiddot fluiddot added [Type] Bug Something isn't working Blocks labels Dec 28, 2020
@fluiddot
Copy link
Contributor Author

This issue can be reproduced in the Paragraph block too so most likely is related to how emojis are rendered.

@fluiddot fluiddot added [OS] iOS and removed Blocks labels Dec 28, 2020
@fluiddot
Copy link
Contributor Author

As far as I investigated the issue looks like it's coming from Aztec, actually I managed to reproduce it when switching to classic editor.

@fluiddot fluiddot changed the title Emojis push text lines in List block Text with emojis is not properly aligned with the bullet point in List block Dec 28, 2020
@guarani
Copy link
Contributor

guarani commented Dec 29, 2020

I can reproduce this on WPiOS all the way back to 15.8. It could be present in earlier versions but that's the oldest version I could find on TestFlight. I checked WPAndroid and issue is not there.

As far as I investigated the issue looks like it's coming from Aztec, actually I managed to reproduce it when switching to classic editor.

I tested the example app that comes with Aztec and couldn't reproduce the issue (there's a Carthage issue that breaks the build but a fix is here).

@fluiddot
Copy link
Contributor Author

Thanks @guarani for checking it 👍 !

I'm going to check it too in the example app and investigate further, by the way after testing it in the WordPress app I managed to produce a fix, you can check the PR 😃 .

@fluiddot
Copy link
Contributor Author

fluiddot commented Dec 29, 2020

I tested the example app that comes with Aztec and couldn't reproduce the issue (there's a Carthage issue that breaks the build but a fix is here).

I spotted that the font family is different in the example, maybe that's why the issue can't be reproduced there.

Besides the height of the text looks different in each case:
WordPress app:
Screenshot 2020-12-29 at 12 14 09

Aztec example:
Screenshot 2020-12-29 at 12 14 32

@fluiddot
Copy link
Contributor Author

fluiddot commented Dec 29, 2020

I tried to change the font family of the example and it confirm that the issue can be reproduced.

Screenshot 2020-12-29 at 12 39 48

You can try it by changing line the default content font in:
https://github.com/wordpress-mobile/AztecEditor-iOS/blob/develop/Example/Example/EditorDemoController.swift#L1119

In my case I used as value:
UIFont(name: "HelveticaNeue-Medium", size: 14) ?? UIFont.systemFont(ofSize: 14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[OS] iOS [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants