-
Notifications
You must be signed in to change notification settings - Fork 815
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
Emojis in footer on Windows cause artifacts in the interface #3040
Comments
Do you think you could give a minimal example bit of code, that can run stand-alone, that we can test, so we know we're testing the same thing as you? |
Here's the example: from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.widgets import Footer, Header, Placeholder
class MyApp(App[None]):
BINDINGS = [
Binding("enter", "enter", "🗑️"),
]
def compose(self) -> ComposeResult:
yield Header()
yield Placeholder("Hello, world!")
yield Footer()
def action_enter(self) -> None:
pass
if __name__ == "__main__":
MyApp().run() I've observed it on Windows 11: Using Windows Terminal## Versions
| Name | Value |
|---------|--------|
| Textual | 0.30.0 |
| Rich | 13.5.1 |
## Python
| Name | Value |
|----------------|----------------------------------------------------------------------------|
| Version | 3.10.6 |
| Implementation | CPython |
| Compiler | MSC v.1932 64 bit (AMD64) |
| Executable | C:\Users\vboxuser\Desktop\1workspace\textual-tests\venv\Scripts\python.exe |
## Operating System
| Name | Value |
|---------|------------|
| System | Windows |
| Release | 10 |
| Version | 10.0.22621 |
## Terminal
| Name | Value |
|----------------------|------------------|
| Terminal Application | Windows Terminal |
| TERM | *Not set* |
| COLORTERM | *Not set* |
| FORCE_COLOR | *Not set* |
| NO_COLOR | *Not set* |
## Rich Console options
| Name | Value |
|----------------|----------------------|
| size | width=138, height=36 |
| legacy_windows | False |
| min_width | 1 |
| max_width | 138 |
| is_terminal | True |
| encoding | utf-8 |
| max_height | 36 |
| justify | None |
| overflow | None |
| no_wrap | False |
| highlight | None |
| markup | None |
| height | None | And mintty (via git bash)## Versions
| Name | Value |
|---------|--------|
| Textual | 0.30.0 |
| Rich | 13.5.1 |
## Python
| Name | Value |
|----------------|----------------------------------------------------------------------------|
| Version | 3.10.6 |
| Implementation | CPython |
| Compiler | MSC v.1932 64 bit (AMD64) |
| Executable | C:\Users\vboxuser\Desktop\1workspace\textual-tests\venv\Scripts\python.exe |
## Operating System
| Name | Value |
|---------|------------|
| System | Windows |
| Release | 10 |
| Version | 10.0.22621 |
## Terminal
| Name | Value |
|----------------------|----------------|
| Terminal Application | mintty (3.6.4) |
| TERM | xterm |
| COLORTERM | *Not set* |
| FORCE_COLOR | *Not set* |
| NO_COLOR | *Not set* |
## Rich Console options
| Name | Value |
|----------------|----------------------|
| size | width=170, height=46 |
| legacy_windows | False |
| min_width | 1 |
| max_width | 170 |
| is_terminal | True |
| encoding | utf-8 |
| max_height | 46 |
| justify | None |
| overflow | None |
| no_wrap | False |
| highlight | None |
| markup | None |
| height | None | |
Emojis tend to render differently across platforms. Windows in particular struggles with certain emoji. There's not much Textual can do about that I'm afraid. It's best to stick to emojis that are in the Unicode 9 database, or stick to plain text. |
So it's not just Windows that's the problem here.
Do you mean all up to Unicode 9 i.e. 1,2,...,9? Is each new version an extension of the previous one?
so, in theory, should be compatible. |
Try just pasting a bunch of wastebaskets in your terminal. Do you see anything strange with the cursor position and if you press backspace to delete? |
I'm assuming this is just a classic emoji issue. Terminals don't agree on how wide they should be. Not much we can do about it alas. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
Description
Here are some screenshots about what I mean:
After pushing screen (We can observe, there is an additional line below):
And when hovering over footer buttons (all you need is f10, no need to hover over the emoji):
This is only observable on the
Windows
platform. (Windows Termnial
app). While usingMobaXterm
onWindows
, this does not appear. Also, everything is fine onUbuntu 22.04
with thex-terminal-emulator (terminator)
.Here's the output of
textual diagnose
from the problematicWindows
usingWindows Terminal
. Also, we already checked and this problem still occurs with0.30.0
, so please do not bother with the version in the log below:Textual Diagnostics
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: