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

wide emoji on trivial text lines to be inflated will become narrow emoji (bad cursor advancement) #1375

Open
christianparpart opened this issue Dec 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations high priority High Priority Item

Comments

@christianparpart
Copy link
Member

Refs #1215.

printf "A\u2764\uFE0F\u200D\U0001F525B\nA\u2764\uFE0FB\n"

This is properly printed to the terminal, but as soon as going into input normal mode and moving the cursor over/across the printed line, will make the emoji look narrow.

The bug most likely is in the inflation code, that is going to be rewritten in libunicode ASAP anyways. But we keep this ticket as a tracker to not forget about it.

image
@christianparpart christianparpart added bug Something isn't working fonts font rasterization and text shaping API and platform implementations labels Dec 20, 2023
@christianparpart christianparpart added this to the 0.4.1 milestone Dec 20, 2023
@Yaraslaut
Copy link
Member

Also, this:

#1215 (comment)

@Yaraslaut
Copy link
Member

Yaraslaut commented May 2, 2024

Behavior changed after #1501 PR
but bug is still present

@Yaraslaut
Copy link
Member

Bug is happening during the inflation of the line, emoji use double width and therefore can not be split into two independent cells, and we end up in corrupted state when part of the emoji is inside one cell, and another part is in another cell with the next character, so for this case after inflation we have
1 -> A
2 -> half of the emoji
3 -> half of the emoji + B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fonts font rasterization and text shaping API and platform implementations high priority High Priority Item
Projects
None yet
Development

No branches or pull requests

2 participants