fix: ensure fallback to default system monospace font #282747
+1 −1
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.monospacewithout 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.