github / cmark-gfm

GitHub's fork of cmark, a CommonMark parsing and rendering library and program in C
Other
871 stars 171 forks source link

box drawing is not monospaced #219

Open armfazh opened 3 years ago

armfazh commented 3 years ago

(not sure if the issue belongs to this library) Pipes did not render with a monospace font.

╔═════════╦═════════╦═════════╦═════════╦═════════╗
║  Size   ║ OpenSSL ║ OpenSSL ║This work║ Speedup ║
║ (bytes) ║  (x64)  ║ (shani) ║ (shani) ║x64/shani║
╠═════════╩═════════╩═════════╩═════════╩═════════╣
Artoria2e5 commented 3 years ago

It seems to work on my end, so I think you are bumping into a font problem. That is usually your browser setting's fault, but GitHub's CSS might also be encouraging some wrong choices. Do you mind using "Inspect Element" on the <pre>, and going to the bottom of the "Computed" part to see what fonts are being used?

armfazh commented 3 years ago

font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace

Artoria2e5 commented 3 years ago

…That is the CSS result. On Chrome there's a "Rendered Fonts" thing, but it doesn't seem to be there on Safari... Ah just tell me your OS.

armfazh commented 3 years ago

This is the output from Chrome in Fedora/Ubuntu.

Liberation Mono—Local file(114 glyphs)
Consolas—Local file(90 glyphs)
Artoria2e5 commented 3 years ago

It looks like you are using an old version of Consolas that doesn't have box-drawing characters in it, so the Liberation Mono fallback takes the place. On my Windows 10 computer which does have the latest version of Consolas, all 204 glyphs are provided by it.

(For obvious copyright reasons I can't upload the font for you. You'll have to look on the web.)