Editor uses a proportional font with the default Linux font configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Reproduce the fresh-install behavior by opening /app/share/vscode/flatpak-warning.txt in the Flatpak application and run the supplied fc-match commands inside the sandbox. Review fix-flatpak-vscode-fonts.sh and the packaged default font configuration, then verify that the editor uses a monospace font without user settings while preserving the reported environment.
Written by the indexing model from the issue text.
Description
Description
On a fresh installation of the Flatpak version of Visual Studio Code, plain text in the editor appears to use a proportional font instead of a monospace font.
There was no settings.json in the default user profile when the problem occurred.
Environment
- Application ID:
com.visualstudio.code - VS Code version reported by Flatpak:
1.130.0 - Flatpak branch:
stable - Installation: system-wide
Steps to reproduce
- Launch the Flatpak application with the default user settings.
- Open the bundled
/app/share/vscode/flatpak-warning.txt. - Observe the font used in the editor.
Expected behavior
The editor should use a monospace font with the default settings.
Actual behavior
The editor text appears proportional, including the bundled warning file.
Font diagnostics
The installed VS Code build specifies the following default Linux editor font family:
'Droid Sans Mono', monospace
Running these commands inside the Flatpak sandbox produced:
flatpak run --command=fc-match com.visualstudio.code "Droid Sans Mono"
# DejaVuSans.ttf: "DejaVu Sans" "Book"
flatpak run --command=fc-match com.visualstudio.code monospace
# DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
flatpak run --command=fc-match com.visualstudio.code "Source Code Pro" \
-f '%{family} spacing=%{spacing}\n'
# Source Code Pro spacing=100
Monospace fonts are therefore available inside the sandbox. However, the unavailable Droid Sans Mono family resolves to proportional DejaVu Sans when queried directly.
This suggests a font fallback or substitution issue, although the fc-match results alone do not establish exactly how Electron resolves the complete font-family list.
Workaround
Explicitly selecting an available monospace font resolves the editor display issue:
{
"editor.fontFamily": "'Source Code Pro', 'DejaVu Sans Mono', monospace",
"terminal.integrated.fontFamily": "'Source Code Pro', 'DejaVu Sans Mono', monospace"
}
The terminal setting was added as a precaution; the original issue was observed in the editor.
Possible investigation
Could you check whether the packaged default font configuration reliably falls back to a monospace font when Droid Sans Mono is absent?
Using an available monospace default or providing an appropriate font substitution may help avoid this on fresh installations.
- Dominant language
- Shell
- Stars
- 216
- Forks
- 82
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from flathub/com.visualstudio.code
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
flathub/com.visualstudio.code#679 · 4 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
flathub/com.visualstudio.code#563 · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
flathub/com.visualstudio.code#388 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
flathub/com.visualstudio.code#715 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
flathub/com.visualstudio.code#698 ·
All issues in flathub/com.visualstudio.code
Similar issues
-
align on terminology Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CycloneDX/transparency-exchange-api#393 · 1 comment ·
-
module/agent platform/macos type/bug/regression
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
CachyOS/cachyos-aur-derived#754 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
CrowdStrike/falcon-scripts#528 ·
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100