[FEATURE] Mods: let ui.render trees set font family and size on Desktop / VS Code / mobile
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
In mods (the plugin hooks API, 2.1.293), Text styling stops at colour, bold, italic, underline, strikethrough, inverse, dim and wrap. No element has a font family or size prop, so every pane or band a mod draws uses the surface's code font.
The only workaround is an Svg element with its own font-family. That draws as an isolated image: you can't select the text, it doesn't wrap, and it doesn't flow with the rest of the tree.
Proposed Solution
Optional fontFamily and fontSize props on Text, inherited from Box. Desktop, VS Code and mobile honour them, and the terminal ignores them because the terminal app owns the font there.
RenderViewport already says layout is "cell-based until the first element lays out in pixels", so a proportional-font Text could switch to pixel layout.
Alternative Solutions
Svgwithfont-family: an image only (see above).Clientmodules: they draw from the same element set, so they don't help.
Priority
Low - Nice to have
Feature Category
Developer tools/SDK
Use Case Example
- A reading or dashboard pane with proportional body text and a larger heading.
- Non-Latin scripts (e.g. Persian or Arabic) that read poorly in a monospace code font.
Additional Context
Related: #98801 (the Desktop app's own font picker).