Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Notifications
Mark all as read
Q&A

How do I fix Firefox fonts having extra spacing and weird numbers on Ubuntu?

+3
−0

After upgrading one of my computers to Firefox 99.0.1 on Ubuntu, it's started rendering some fonts—specifically DejaVu Sans and Arial, although there may be others—incorrectly. The actual words are fine, but everything has about 14px of extra spacing after every word, and all the numbers are rendering as what appear to be emojis, though not like any emoji number I've seen before. All numbers are just oddly-spaced gray images with gradients.

It happens in webpages using one of those two fonts and in the UI elements. It happened on both Ubuntu 21.10 and 22.04. It doesn't happen in any other program, just Firefox. I've tried uninstalling and reinstalling it.

Screenshot of Firefox showing text issues

Does anyone know how I can fix this?

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

2 comment threads

Maybe `fc-cache rebuild` is worth a try (here some background info on the command https://www.geeksfo... (1 comment)
Tried moving ~/.mozilla out of the way? (1 comment)

1 answer

+3
−0

This post solved it for me. This issue is caused by having Noto Color Emoji too high in the font priority. Check /etc/fonts/local.conf for the following item:

<match target="pattern"> 
	<edit name="family" mode="prepend"> 
		<string>Noto Color Emoji</string> 
	</edit> 
</match> 

It will likely be at the end. If it's not there, check /etc/fonts/fonts.conf or ~/.config/fontconfig/fonts.conf for it. A list of possible locations is available on the man page.

This loads Noto Color Emoji before every font. Since this font has images for numbers but not letters, it will replace numbers but let letters be the intended font.

Delete those lines and restart Firefox and everything should go back to normal.

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate