Repository navigation
feat: add per-area font customization (fontFamily + fontSize) - #2626
Conversation
Add two new workbench settings for controlling font sizes in sidebars: - workbench.sideBar.fontSize: Controls primary sidebar font size (6-32px) - workbench.secondarySideBar.fontSize: Controls secondary sidebar font size This improves accessibility by allowing users to independently scale sidebar content without requiring full UI zoom or source code edits. Implementation uses CSS custom properties for live updates without reload. Default of 13px preserves existing behavior. Based on rejected VS Code PR #270851 - rejected with "In this area we do not accept PRs" despite 18 positive reactions and community support.
|
Thank you for the PR. Ya, it fixes an issue with VSCode. Shouldn't it also change the title, action icons, inputs? Here the changes I would see:
It would be nice if we could also change the tabs font size. |
|
@xiaolai Can you make the changes? |
|
@codingus-g Could give your feedback? Thx |
|
This can be combined with my suggestion. It's possible to change the entire Workbench font. -> #2647
|
|
The big problem of this PR is that MS has hard coded the font size and its derivated heights or weights. I almost want to merge @setanarut It must be why they don't allow custom font since it might break things. |
- Fix CSS variable name mismatch in auxiliaryBarPart.css (was reading --vscode-workbench-secondary-sidebar-font-size while TS sets --vscode-workbench-sidebar-font-size) - Add line-height and title h2 scaling for auxiliary bar - Add composite bar tab font size scaling (paneCompositePart.css) - Update setting description to reflect both sidebars
|
Hi @daiyam, First of all, I sincerely apologize for the long silence — I should have responded much sooner, and I appreciate your patience and continued engagement with this PR. I've just pushed a commit that addresses the feedback from your review. Here's a detailed breakdown of the changes: Bug Fix: CSS Variable Name MismatchThe auxiliary bar's CSS ( Auxiliary Bar Parity
Composite Bar Tab Font Size (New)Per your suggestion about tab font size, I've added a new diff section for
All coefficients follow the same base-13 system ( Setting Description UpdateUpdated the description from "Controls the font size used for content inside the primary side bar" to "Controls the font size used for content inside the side bars" — reflecting that the single setting applies to both sidebars, which aligns with your Feb 17 comment about simplifying the approach. Please let me know if there's anything else you'd like me to adjust. Thank you again for the thorough review and for keeping this PR alive — I really appreciate it. |
|
@xiaolai Thanks for the updates. I'm thinking to go beyond sidebars and to have the following settings:
So each panes can be customized |
Three new patches extending workbench font customization to all areas: - feat-workbench-zz-area-font-family: fontFamily for sidebar, statusbar, tabs, panel, activitybar + global fontSize setting - feat-workbench-zz-area-font-size-core: fontSize for statusbar, activitybar, panel with proportional scaling via FONT object - feat-workbench-zz-area-font-size-tabs: fontSize for tabs with CSS variable scaling for tab heights and widths Includes fixes from audit review: - Fix stale CSS var when fontSize reverts to default (cache isUserSet) - Fix else-if config listener blocking simultaneous updates - Trigger grid relayout after statusbar font-size change - Apply activitybar font before show() for correct initial sizing - Trigger tab relayout after font-size change - Standardize CSS fallback chains to include global font-size - Extract inspectFontSize() helper to reduce duplication - Replace magic 1.833333 ratio with explicit CSS height variable
|
Thanks @daiyam! I've implemented the per-area font customization settings according to the plan you outlined (v3-), across three patches. Here's how they work: Patch 1:
|
|
Wow! Thx |
|
@xiaolai One of the patch was broken (https://github.com/VSCodium/vscodium/actions/runs/22249352749/job/64382366232) and it seems the patches were produced on the You need to use the flag I've merged all your patches since its the same feature. It's easier to manage. I've made the conscious choose to have the properties for the font size to be always generated. |
|
Thanks @daiyam for merging and fixing the patches! Noted on using |
|
It's available at https://github.com/VSCodium/vscodium-insiders/releases/tag/1.110.01381-insider |

Summary
Adds user-configurable
fontFamilyandfontSizesettings for every workbench area, following the per-area customization plan proposed by @daiyam. All settings are taggedexperimentalto signal that custom fonts may break layout depending on the font used.New Settings
workbench.experimental.fontSizeworkbench.sideBar.experimental.fontFamily""workbench.sideBar.experimental.fontSizeexperimentalprefix)workbench.statusBar.experimental.fontFamily""workbench.statusBar.experimental.fontSizeworkbench.tabs.experimental.fontFamily""workbench.tabs.experimental.fontSizeworkbench.bottomPane.experimental.fontFamily""workbench.bottomPane.experimental.fontSizeworkbench.activityBar.experimental.fontFamily""workbench.activityBar.experimental.fontSizeDemo
Implementation
Three patches, each building on the previous:
Patch 1 —
feat-workbench-zz-area-font-familyfontFamilysettings plusworkbench.experimental.fontSizeapply*FontFamily()method that sets/removes a CSS custom property on the part's containeronDidChangeConfigurationlisteners provide live updates without reload--vscode-workbench-font-sizeon the workbench root, inherited by all areas as a fallbackPatch 2 —
feat-workbench-zz-area-font-size-corefontSizefor statusbar (base 12), activitybar (base 16), panel (base 13), and global workbenchsrc/vs/base/common/font.ts: aFONTobject holds all derived pixel values, andupdate*Size()functions recalculate them using pre-computed ratios (e.g.,22/12for statusbar height). At default sizes, values are identical to upstream's hardcoded constantsStatusbarPart.HEIGHT,ActivitybarPart.ACTION_HEIGHT) converted to getters reading fromFONTinspectFontSize()helper detects user-set vs. default valuesshow()for correct initial sizingarea-specific → global → hardcoded defaultfont.test.ts, 482 lines)Patch 3 —
feat-workbench-zz-area-font-size-tabsworkbench.tabs.experimental.fontSizefor editor tabsEDITOR_TAB_HEIGHTandTAB_WIDTHconstants converted to getters reading fromFONT22px,35px,38px,80px,120px) replaced with CSS variablesMotivation
Users frequently request customizable font sizes and families for better readability. Prior solutions were limited to zooming the entire interface or manual CSS editing. This exposes per-area configuration directly in Settings, supporting accessibility workflows.
Background
This began as a sidebar font size patch based on microsoft/vscode#270851, which was rejected by Microsoft with "In this area we do not accept PRs, thanks" despite 18 positive reactions. It has since been expanded per @daiyam's plan to cover all workbench areas with both
fontFamilyandfontSize.Testing
font.test.ts: 482-line test suite covering default values, proportional scaling, boundary values (min 6 / max 32), reset behavior, and cross-area independence