isaacs / github

Just a place to track issues and feature requests that I have for github
2.21k stars 129 forks source link

Markdown pre/code font-family breaks unicode box drawing #1164

Open carldunham opened 6 years ago

carldunham commented 6 years ago

See https://gist.github.com/carldunham/cf6738683c53be4510041a6ebbb42207 for example.

In Chrome, on osx, I see:

screen shot 2018-01-25 at 16 51 14

Obviously, fonts will vary everywhere. The CSS chooses (reduced to relevant lines):

tt, code {
    font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;
}

.markdown-body pre code, .markdown-body pre tt {
    line-height: inherit;
}

If I include override CSS:

.markdown-body pre code {
    font-family: "Source Code Pro";
    line-height: initial;
}

I see:

screen shot 2018-01-25 at 16 51 34

Of course, that works on my machine because I have Source Code Pro installed. I think in the broken case, it's using Consolas for most of the text, and substitution happens with Menlo for the missing glyphs.

Not sure what the right answer is for everyone, just suggesting that what is there now is broken.

carldunham commented 6 years ago

Hi Carl,

Thanks for reaching out about this! I've passed your feedback along to the team. I can't say if or when a change will happen, but your feedback is in the right hands.

Best, Shawna