-
Are there any recommended fonts that work well with Textual on Windows? Should
Windows' Command and PowerShell terminals do not have a separate line height option (like Mac) and most of the pre-installed monospace fonts do not include all the graphical characters used by Textual. For example, Lucida Console and Consolas do not include any of the graphical characters, many of the fonts that do include some graphical characters, or do not include the circle (used at the top left corner of the demo). The only built-in font that have all the symbols seems to be MS Gothic (but appears to have remapped I've tried a number of fonts over on Google Fonts but so far they do not included the graphical characters. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
I'm not sure if pre-installed on Windows, but try The font used in the Textual docs looks to be |
Beta Was this translation helpful? Give feedback.
-
I've seen a few issues related to fonts, so might be worth adding an 'official' answer to the FAQ and/or docs? |
Beta Was this translation helpful? Give feedback.
-
Fira Code defaults to a larger line height than it needs so has artifacts on some of the vertical line draw characters. It's also missing the circle. DejaVu Sans Mono looks really nice, except it's also missing the circle character. (I'm not sure which codepoint the circle is and it only seems to be used in the "main" example ( |
Beta Was this translation helpful? Give feedback.
-
The circle glpyh is used as the icon in the Header widget. Not sure if it might also be used anywhere else. Forgive my ignorance of Windows terminals, but do they not use a fallback font? |
Beta Was this translation helpful? Give feedback.
-
They don't. If a font doesn't have a character, you get whatever the "missing character" character is, usually a box, box with question mark, or sometimes just a question mark. |
Beta Was this translation helpful? Give feedback.
-
You could try installing Windows Terminal, which looks to have font fallback and generally seems to display Textual apps better. Or look at a patched font such as those from the Nerd Fonts project. |
Beta Was this translation helpful? Give feedback.
-
I've only ever used Windows Terminal on Windows 11 with default settings. It uses Cascadia Mono, and I don't see any glitched characters. |
Beta Was this translation helpful? Give feedback.
-
@willmcgugan Cascadia Mono doesn't include the circle glyph (U+2B58) either. But Windows Terminal seems to have font fallback for unsupported glyphs, unlike the classic Windows conhost. Font fallback can also have its drawbacks, depending on the terminal/environment. See this discussion #3091 last week for example. I've seen a few issues related to fonts, so might be worth adding an 'official' answer to the FAQ and/or docs? |
Beta Was this translation helpful? Give feedback.
-
I (and @landonjx) are on Win10. I was able to find a Win11 system to try out @willmcgugan's assertion. It does indeed look great and all the characters I was able to test are rendered correctly. From summarizing and testing: Cascadia Mono works well on both Win10 and Win11. It's missing the circle glyph but the font fallback available in Windows Terminal (installed by default in Win11, available in the Microsoft Store otherwise, (Thanks @willmcgugan & @TomJGooding !) ) fixes that. If you don't already have the font, it can be found in the releases in the Cascadia Code repo. (The repo includes both but note that Cascadia Code has issues when used with Textual, at least in Win10.) On Win10's default consoles, DevaVuSansM Nerd Font works well. (Thanks @TomJGooding !) It seems to include all the needed symbols, including the circle glyph, and there are absolutely no artifacts. |
Beta Was this translation helpful? Give feedback.
-
I'm going to move this issue over to a discussion, under Q&A. It looks handy enough to keep around in a more A&Q capacity. |
Beta Was this translation helpful? Give feedback.
I (and @landonjx) are on Win10. I was able to find a Win11 system to try out @willmcgugan's assertion. It does indeed look great and all the characters I was able to test are rendered correctly.
From summarizing and testing:
Cascadia Mono works well on both Win10 and Win11. It's missing the circle glyph but the font fallback available in Windows Terminal (installed by default in Win11, available in the Microsoft Store otherwise, (Thanks @willmcgugan & @TomJGooding !) ) fixes that. If you don't already have the font, it can be found in the releases in the Cascadia Code repo. (The repo includes both but note that Cascadia Code has issues when used with Textual, at least in Win10.)
On Win10'…