Skip to content
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: table formatting characters don't render monospace with some fonts #9196

Open
jcrist opened this issue May 15, 2024 · 5 comments
Open

Comments

@jcrist
Copy link
Member

jcrist commented May 15, 2024

The pretty-printed tables in the interactive repr don't always render nicely with some fonts. For me this is most noticeable on the chrome mobile view of both our website and github.

Opening this issue to do the only thing I can think to debug - copy-pasting repr output and then viewing it on my phone.

@jcrist
Copy link
Member Author

jcrist commented May 15, 2024

Current repr:

┏━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┓
┃ a     ┃ b     ┃ c     ┃ d     ┃ e     ┃ f     ┃ g     ┃ h     ┃ i     ┃ j     ┃ k     ┃ l     ┃ m     ┃ n     ┃
┡━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━┩
│ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │
├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │
│     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │
│     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │
└───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘

@jcrist
Copy link
Member Author

jcrist commented May 15, 2024

box.SQUARE

┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
│ a     │ b     │ c     │ d     │ e     │ f     │ g     │ h     │ i     │ j     │ k     │ l     │ m     │ n     │
├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │ int64 │
├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │     1 │
│     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │     2 │
│     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │     3 │
└───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘

@jcrist
Copy link
Member Author

jcrist commented May 15, 2024

box.HORIZONTALS

 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
  a       b       c       d       e       f       g       h       i       j       k       l       m       n      
 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
  int64   int64   int64   int64   int64   int64   int64   int64   int64   int64   int64   int64   int64   int64  
 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
      1       1       1       1       1       1       1       1       1       1       1       1       1       1  
      2       2       2       2       2       2       2       2       2       2       2       2       2       2  
      3       3       3       3       3       3       3       3       3       3       3       3       3       3  
 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────

@jcrist
Copy link
Member Author

jcrist commented May 15, 2024

box.MARKDOWN

| a     | b     | c     | d     | e     | f     | g     | h     | i     | j     | k     | l     | m     | n     |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
| int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 | int64 |
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
|     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |     1 |
|     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |     2 |
|     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |     3 |

@jcrist
Copy link
Member Author

jcrist commented May 15, 2024

Ok, it looks like the problem is the font doesn't render the character (used for all horizontal lines) as the same width as other characters. Anything more ascii renders fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: backlog
Development

No branches or pull requests

1 participant