-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[BUG] svg Tables seem bugged when trying to generate an png from them #3034
Comments
Its font related. Your PNG renderer isn't picking up the appropriate font. Not a Rich issue per-se. |
how can i fix this? i think its rather hard to do that on the renderer side, so how can i do this on the rich side? |
The issue lies with the software you are using to render the file. You could modify the template used to generate the SVG, but as it was carefully chosen to produce the best results, you may break it in other ways. |
Id be willing to give it a try anyway, could you give me some direction how i could change the font in the template? i would assume this is a matter of string replace if i would like to take the dirty way? |
See the |
I hope we solved your problem. If you like using Rich, you might also enjoy Textual |
Describe the bug
When exporting a table to svg and afterwards trying to generate a png from them (cairosvg and some online converters)
I get broken pictures. Maybe related or not Jetbrains cant display them which makes me think that something might be broken there too
i tried to manually fix it as shown in the attachments resulting in the expected pngs but breaking the view in the chrome browser.
Platform
Click to expand
What platform (Win/Linux/Mac) are you running on? What terminal software are you using?
multiple, server/wsl
╭───────────────────────── <class 'rich.console.Console'> ─────────────────────────╮
│ A high level console interface. │
│ │
│ ╭──────────────────────────────────────────────────────────────────────────────╮ │
│ │ │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ color_system = '256' │
│ encoding = 'utf-8' │
│ file = <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> │
│ height = 41 │
│ 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=228, height=41), │
│ legacy_windows=False, │
│ min_width=1, │
│ max_width=228, │
│ is_terminal=True, │
│ encoding='utf-8', │
│ max_height=41, │
│ justify=None, │
│ overflow=None, │
│ no_wrap=False, │
│ highlight=None, │
│ markup=None, │
│ height=None │
│ ) │
│ quiet = False │
│ record = False │
│ safe_box = True │
│ size = ConsoleDimensions(width=228, height=41) │
│ soft_wrap = False │
│ stderr = False │
│ style = None │
│ tab_size = 8 │
│ width = 228 │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─── <class 'rich._windows.WindowsConsoleFeatures'> ────╮
│ Windows features available. │
│ │
│ ╭───────────────────────────────────────────────────╮ │
│ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │
│ ╰───────────────────────────────────────────────────╯ │
│ │
│ truecolor = False │
│ vt = False │
╰───────────────────────────────────────────────────────╯
╭────── Environment Variables ───────╮
│ { │
│ 'TERM': 'xterm-256color', │
│ 'COLORTERM': None, │
│ '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"
Actual:
"Expected" (this ends up in a not broken png)
The text was updated successfully, but these errors were encountered: