搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Github (and other sites) monospace fonts aren't actually monospace as of 92.0

  • 無回覆
  • 1 有這個問題
  • 5 次檢視
more options

In the attached image, the code is indented with 4 spaces, but it displays as if it's 2 spaces because the spaces are thinner than the other characters. In the second image, I've highlighted a single space, which is half the width of the character above it. I also downloaded the latest nightly and this still happens with it.

Github's current `font-family` rule: `ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace`

In devtools, firefox underlines `Liberation Mono` as the active font-family, but I uninstalled that from my system and it switched to `monospace` (Noto Sans Mono) with the same issue. If I change it to remove the `Consolas,Liberation Mono,` it gets fixed, but when `Liberation Mono` is installed+highlighted and I only remove `Consolas,` it doesn't work til I remove `Liberation Mono,` as well. Note that both `Consolas` and `Liberation Mono` resolve to "Noto Sans Mono" "Regular" in fc-match, which is my default monospace font.

附加的畫面擷圖

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題