[BUG] Numbers incorrectly displaying in bold.
See original GitHub issueDescribe the bug
Numbers display incorrectly in bold, specifically when using the rich.print
function.
It also behaves different when using it with other characters. Depending on the position of the adjacent non-number character, it show non-bold numbers.
Reproduce
import string
from rich import print
# All printable characters
for le in string.printable:
if le != '"'
print(f"[yellow]{le}3.141592[/yellow]")
Images
Platform
Click to expand
Linux Mint 21 x86_64 Terminal: mate-terminal
rich==12.6.0
โญโโโโโโโโโโโโโโโโโโโโโโโโโ <class 'rich.console.Console'> โโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ A high level console interface. โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ <console width=132 ColorSystem.TRUECOLOR> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ color_system = 'truecolor' โ
โ encoding = 'utf-8' โ
โ file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> โ
โ height = 24 โ
โ is_alt_screen = False โ
โ is_dumb_terminal = False โ
โ is_interactive = True โ
โ is_jupyter = False โ
โ is_terminal = True โ
โ legacy_windows = False โ
โ no_color = False โ
โ options = ConsoleOptions( โ
โ size=ConsoleDimensions(width=132, height=24), โ
โ legacy_windows=False, โ
โ min_width=1, โ
โ max_width=132, โ
โ is_terminal=True, โ
โ encoding='utf-8', โ
โ max_height=24, โ
โ justify=None, โ
โ overflow=None, โ
โ no_wrap=False, โ
โ highlight=None, โ
โ markup=None, โ
โ height=None โ
โ ) โ
โ quiet = False โ
โ record = False โ
โ safe_box = True โ
โ size = ConsoleDimensions(width=132, height=24) โ
โ soft_wrap = False โ
โ stderr = False โ
โ style = None โ
โ tab_size = 8 โ
โ width = 132 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโ <class 'rich._windows.WindowsConsoleFeatures'> โโโโโฎ
โ Windows features available. โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ WindowsConsoleFeatures(vt=False, truecolor=False) โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
โ โ
โ truecolor = False โ
โ vt = False โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโ Environment Variables โโโโโโโโฎ
โ { โ
โ 'TERM': 'xterm-256color', โ
โ 'COLORTERM': 'truecolor', โ
โ 'CLICOLOR': None, โ
โ 'NO_COLOR': None, โ
โ 'TERM_PROGRAM': None, โ
โ 'COLUMNS': None, โ
โ 'LINES': None, โ
โ 'JUPYTER_COLUMNS': None, โ
โ 'JUPYTER_LINES': None, โ
โ 'JPY_PARENT_PID': None, โ
โ 'VSCODE_VERBOSE_LOGGING': None โ
โ } โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
platform="Linux"
Issue Analytics
- State:
- Created 10 months ago
- Comments:5
Top Results From Across the Web
In my TOC, Some of the heading numbers are bold while other ...
I have copy pasted the TOC code from another document (which comes out correct) into the new document and upon refreshing, the problem...
Read more >Fonts incorrectly displaying in all bold text on some websites
On some websites the fonts are all displaying in a large bold text instead of whatever font that page is meant to use....
Read more >Text Prints as Bold, but Displays as Regular (Microsoft Word)
There are many possible problems that could be causing this. Try selecting the offending text (the part that prints as bold) and pressing...
Read more >Bold font bug fix for Articulate Storyline 360 - BrightCarbon
A tricky bug in Articulate Storyline 360, that causes non-Windows-standard typefaces to act strangely, and a solution for how to fix it.
Read more >Bold and italic displaying incorrectly in MS Word - Super User
The problem seems to exist only for the specific "bold" weight. In typefaces with more weights, if in the menu I select e.g....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! But I have run into another issue. When I try to
I get
TypeError: print() got an unexpected keyword argument 'highlight'
Thank you!