Skip to content

Conversation

@AviVahl
Copy link

@AviVahl AviVahl commented Dec 11, 2025

This PR actually fixes an issue experienced when monaco-editor (the npm package) is used in a website loaded using Firefox on Linux.

By using quotes, the 'monospace' family causes Firefox to load "Noto Arabic" on my system. Should be noted I have a clean Fedora 43 installation, with the default Gnome 49 installed fonts. monospace without the quotes resolves to "Noto Sans Mono", as expected.

I see absolutely no difference for default font rendering inside Chromium-based web views. Testing with monaco-editor in Google Chrome and VSCode inside Electron.

Most Gnome-based Linux distros moved away from the Droid font-family, and are currently using the Noto font-family, but I'll leave that up to you guys. monospace (without quotes) properly resolves to "Noto Sans Mono".

I've tracked where this 'monospace' value came from, and it seems to have been added in b99f414 as part of not using "Courier New" on Linux. Seems like an oversight.

This PR actually fixes an issue experienced when monaco-editor (the npm package) is used in a website loaded using Firefox on Linux. By using quotes, the `'monospace'` family causes Firefox to load "Noto Arabic" on my system. Should be noted I have a _clean_ Fedora 43 installation, with the default Gnome 49 installed fonts. `monospace` without the quotes resolves to Noto Sans Mono, as expected. I see absolutely no difference for default font rendering inside Chromium-based web views. Testing with monaco-editor in Google Chrome and VSCode inside Electron. Most Gnome-based Linux distros moved away from the Droid font-family, and are currently using the Noto font-family, but I'll leave that up to you guys. `monospace` (without quotes) properly resolves to Noto. I've tracked where this `'monospace'` value came from, and it seems to have been added in microsoft@b99f414 as part of not using Courier New on Linux. Seems like an oversight from my end.
Copilot AI review requested due to automatic review settings December 11, 2025 13:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Firefox on Linux font rendering issue where the quoted 'monospace' fallback was causing Firefox to incorrectly load "Noto Arabic" instead of the expected monospace font. The fix removes the redundant quoted 'monospace' from the font family list, leaving only the unquoted monospace keyword which correctly resolves to the system's default monospace font.

Key Changes:

  • Removes the redundant quoted 'monospace' fallback from DEFAULT_LINUX_FONT_FAMILY to fix incorrect font resolution in Firefox on Linux
@AviVahl
Copy link
Author

AviVahl commented Dec 11, 2025

FYI @hediet since you seem to be the one maintaining the monaco-editor package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants