-
Notifications
You must be signed in to change notification settings - Fork 437
This emoji causes subsequent text to be hidden in SVG output #89
Comments
Can others reproduce this? |
Could not reproduce with termtosvg 0.7.0 on macOS 10.14.2 with alacritty 0.2.0, zsh 5.6.2 |
Yes I can reproduce this behavior, I just haven't had time to investigate further. I'll try to look at this in the next few days. |
Yes, I can. Using the following script I isolated the issue to two unicode-codepoints in your string that make the issue appear. See also: https://www.fontspace.com/unicode/analyzer/?q=before+%F0%9F%95%B5%EF%B8%8F%E2%80%8D+after
All lines but the second line (just the sleuth) show the issue for me. Maybe this is a pyte-issue? Do they have some example-app to check? |
@Rondom Thanks for investigating. I did some tests and it turns out Pyte drops all data following an "unprintable" character (the zero width joiner of your test case) : https://github.com/selectel/pyte/blob/0.8.0/pyte/screens.py#L522 A simple workaround is to feed Pyte a single character at a time so that if a character is not printable it does not affect the rest of the line. I've implemented this via 1a45282. Let met know if that fixes the issue. |
Feed data to Pyte one character at a time so that Pyte ignoring data after a zero-width character isn't a problem. While we're at it, replace pyte.ByteStream by pyte.Stream to simplify the code
Fix released as part of 0.8.0. Let me know if it doesn't solve the issue. |
Amazing, yes I can confirm that's fixed it for me. Thank you! |
Gives this SVG output, where the word "after" is not visible:
https://gist.github.com/paulfurley/4e74ecc062837edcf9a3270849915182
Here's a static screenshot
I'm using termtosvg==0.7.0 on Ubuntu 18.04
BTW thanks for making
termtosvg
, we loveit! It's extremely useful for illustrating release notes for Fluidkeys, our command-line appThe text was updated successfully, but these errors were encountered: