Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Monospace font not being chosen correctly when font-family starts with missing fonts

  • 1 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi Tim Alberdingk Thijm

more options

I've just started noticing in Firefox 99 on Arch Linux that Firefox is using the wrong font when the font-family is given as "ui-monospace/other fonts..., monospace". This looks similar to the issue mentioned here: https://support.mozilla.org/en-US/questions/1351497

The inspector for these websites underlines "monospace" as the active font, but then uses a non-monospace font (in my case, Bitstream Vera Sans) to display the content. This does not happen when the font-family is "monospace,monospace" or "monospace". I can't quite figure out exactly what causes the font to be chosen incorrectly: sometimes it does show up if I have the preceding fonts installed, e.g. Consolas or Liberation Mono, but other instances do not look as intended.

Currently, I have fontconfig set up such that: $ fc-match :family=ui-monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" $ fc-match :family=monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"

Firefox's fonts in about:preferences are configured as all defaults: Serif: Bitstream Vera Serif Sans: Bitstream Vera Sans Monospace: Bitstream Vera Sans Mono

I've just started noticing in Firefox 99 on Arch Linux that Firefox is using the wrong font when the font-family is given as "ui-monospace/other fonts..., monospace". This looks similar to the issue mentioned here: https://support.mozilla.org/en-US/questions/1351497 The inspector for these websites underlines "monospace" as the active font, but then uses a non-monospace font (in my case, Bitstream Vera Sans) to display the content. This does not happen when the font-family is "monospace,monospace" or "monospace". I can't quite figure out exactly what causes the font to be chosen incorrectly: sometimes it does show up if I have the preceding fonts installed, e.g. Consolas or Liberation Mono, but other instances do not look as intended. Currently, I have fontconfig set up such that: $ fc-match :family=ui-monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" $ fc-match :family=monospace VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" Firefox's fonts in about:preferences are configured as all defaults: Serif: Bitstream Vera Serif Sans: Bitstream Vera Sans Monospace: Bitstream Vera Sans Mono
Đính kèm ảnh chụp màn hình

Giải pháp được chọn

Turns out I was having a similar problem to this person, due to the fontconfig hackery of ttf-twemoji-color. I've removed that package for now and gotten everything rendering properly again!

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (1)

more options

Giải pháp được chọn

Turns out I was having a similar problem to this person, due to the fontconfig hackery of ttf-twemoji-color. I've removed that package for now and gotten everything rendering properly again!