Skip to content

Block character monospace width incorrect #346

@Ar-Kareem

Description

@Ar-Kareem

Hi,

Apologies if this is not the right place for this issue I noticed.

I have a markdown file with an ascii table on PyPI which I can see is using Source Code Pro,monospace to render my text. The table has many characters including "▒" (U+2592), "┼” (U+253C), “─” (U+2500), and others.

For some reason a multiple of those Unicode character does not has the same width or align with the same number of regular characters. This makes my table look horrible. When I change the font in inspect elements and remove the "Source Code Pro" then it looks fine.

The text is the following (looks good for me in GitHub):

    0   0   0   0   0   0   0   0   0   0   1   1   1   1   1   1   1   1   1   1  
    0   1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6   7   8   9  
  ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
 0│   │▒▒▒│▒▒▒│▒▒▒│   │ 3 │▒▒▒│   │▒▒▒│▒▒▒│▒▒▒│▒▒▒│▒▒▒│▒▒▒│ 3 │   │▒▒▒│▒▒▒│▒▒▒│▒▒▒│
  ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
 1│▒▒▒│▒▒▒│   │▒▒▒│2/3│   │▒▒▒│...│   │3/3│ 7 │▒▒▒│ 7 │▒▒▒│▒▒▒│2/3│▒▒▒│   │   │▒▒▒│
  ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
 2│▒▒▒│2/4│▒▒▒│▒▒▒│   │▒▒▒│   │▒▒▒│▒▒▒│▒▒▒│▒▒▒│▒▒▒│▒▒▒│   │▒▒▒│   │▒▒▒│▒▒▒│2/3│▒▒▒│
  ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤

... and so on

And this is what is looks like in my browser when using source-code-pro monospace font (table looks very wrong)

Image

Same thing in chrome (table looks very wrong)

Image

And now it's fixed when I changed the font family manually to just "monospace" (table looks good now)

Image

Sadly I don't have control over which font family is used so I hope that this is a simple issue and it's possible to fix the width of the characters to make them align with the width of the other normal characters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions