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".

Learn More

Font wanted isn't the font that's displayed in Linux Ubuntu.

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

more options

TL/DR: See the image. ;)

I'm on Ubuntu 20.04 (Xubuntu flavor), using Firefox 79.0, working on a web site. I'm coding specifically for Arial... and it's returning Times New Roman.

I have Arial installed, via the ttf-mscorefonts package and also adding them from a Win10 box.

Please, no "But you should do 'font-family: Arial, Veranda, sans-serif'" dismissive answers. Why? Because if I do "font-family: Arial, Veranda" I still get Times New Roman. I can even substitute "Pulsar Beta" here (a font that is installed to my local account) and it still gives me Times New Roman.

If I do "font-family: sans-serif" I get Veranda, not Arial... which is odd because Arial is my default font.

Doing "font-family: Veranda" gets my Times New Roman.

Chrome doesn't have this issue!

As a picture is worth a thousand words, see the pic.

What can I do? I did see some bugs that were fixed in v56, but none of the debugging tips help there.

Đính kèm ảnh chụp màn hình

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

Huh... It looks like fonts-twemoji-svginot was the bad package... but it's no longer in Ubuntu's repos. Removing it has solved the problem.

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

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

more options

Do you allow pages to choose their own fonts ? What are the default font settings ?

  • Options/Preferences -> General: Fonts & Colors -> Advanced
    [X] "Allow pages to choose their own fonts, instead of my selections above"

Did you check the Arial font and Verdana font in FontForge ?

Hữu ích?

more options

Allow pages to choose their own fonts/colors is checked. Default serif is Times New Roman. Default sans-serif is "Default (Verdana)" Default monospace is "Default (Bitstream Vera Sans Mono)"

Installing FontForge... Checking /usr/share/fonts/truetype/msttcorefonts...

Arial.ttf says "ArialMT" Verdana.ttf says "Verdana"

tygris@redwolf:~$ fc-match Arial arial.ttf: "Arial" "Regular"

Hữu ích?

more options

Scratch that, sorry.

Được chỉnh sửa bởi TyDraniu vào

Hữu ích?

more options

Where are the fonts installed ?

Does Firefox show them as possible choices for the default font ?

Hữu ích?

more options

/usr/share/fonts/truetype/msttcorefonts

And yes, they're shown as possible choices. I can set sans-serif as Arial and monospace as Courier New.

Also, in the test HTML I used, if I substitute in "Pulsar Beta" I get the default "Times New Roman" as well. This is also in the choices. "Pulsar Beta" is in ~/.local/share/fonts .

Hữu ích?

more options

Quote: I can set sans-serif as Arial and monospace as Courier New.

Does Firefox use that font when you set is as the default font if you check this in the Inspector ?

You can check in the Rules tab in the right panel in the Inspector what font-family is used for selected text. You can check in the Font tab in the right panel in the Inspector what font is actually used because Firefox might be using a different font than specified by the website.

Hữu ích?

more options

Negative. If I set it, for the test html file (see pic), it uses Times New Roman (the serif default) for Arial (a sans-serif font).

Rules says:

element {

   font-family: Arial;

}

Fonts says Times New Roman is used. No mention of Arial.

Hữu ích?

more options

Also, as a follow-up, if I change the default serif from "Times New Roman" to "Pulsar Beta" (a comic font), it uses Times New Roman.

Hữu ích?

more options

Is this with Firefox from the repositories or with Firefox from the Mozilla server ?

Hữu ích?

more options

Firefox from the repos, but Firefox from Mozilla has the same issue. I pulled a fresh copy to see if that had issues... and it does.

I've gone through my Xubuntu setup... and the font-config setup doesn't have any config files that would cause this issue. I can use Arial outside of Firefox. Chrome correctly pulls Arial as does XFCE and LibreOffice. It only happens in Firefox.

I have already removed my profile and pulled fresh, and used "Safe Mode". Same issue.

Hữu ích?

more options

Hmmm... weird... I just checked another install of Ubuntu on another PC, version 20.04 (same as the affected one)... and it's working there.

I wonder what the difference is...

Hữu ích?

more options

Just to document things, one of the installed fonts I had was screwing things up. I'm pinpointing the font now so I can send a bug report to Ubuntu... and also document it here.

Hữu ích?

more options

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

Huh... It looks like fonts-twemoji-svginot was the bad package... but it's no longer in Ubuntu's repos. Removing it has solved the problem.

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.