Editor uses a proportional font with the default Linux font configuration
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
调研方向
通过在 Flatpak 应用中打开 /app/share/vscode/flatpak-warning.txt,并在 sandbox 内运行提供的 fc-match 命令,复现全新安装时的行为。检查 fix-flatpak-vscode-fonts.sh 和打包的默认字体配置,然后验证编辑器在没有用户设置的情况下使用等宽字体,同时保留所报告的环境。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Shell
- 星标
- 216
- 派生
- 82
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
flathub/com.visualstudio.code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
flathub/com.visualstudio.code#679 · 4 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
flathub/com.visualstudio.code#563 · 2 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 65/100
flathub/com.visualstudio.code#388 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
flathub/com.visualstudio.code#715 ·
-
难度 4/5 3-5 天 新手友好度 32/100
flathub/com.visualstudio.code#698 ·
查看 flathub/com.visualstudio.code 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
-
tooling
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
openSUSE/python-rpm-macros#219 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
YunoHost-Apps/adguardhome_ynh#258 ·
-
steam-short-session-tracker: incorrect registry backup path resets settings during automatic repair 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
ValveSoftware/SteamOS#2829 ·