You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I downloaded and ran the latest installer; the window looks like the screenshot. All menu items and window titles and captions are displayed incorrectly.
I'm using Kubuntu 24.04 LTS with Plasma 5.27
No, my DPI is unchanged — Xft.dpi: 96 and KDE's forceFontDPI=96. Scaling was not involved: forcing AVALONIA_GLOBAL_SCALE_FACTOR=1 resized the whole window but left the clipping proportions identical.
Root cause: a broken font, not DPI
The font Avalonia picked was Fashion Fetish, installed in ~/.local/share/fonts. Its vertical metrics are wrong — hhea has hardcoded placeholder values in all 8 styles:
hhea claims
actual glyph bounds (head)
ascender
600 (0.700 em)
yMax 1199 (1.199 em)
descender
−100
yMin −412
line height
0.700 em
1.611 em
Glyphs overshoot hhea.ascender by 50%, so anything sizing a line box from hhea clips the top half. OS/2.usWinAscent was too low as well (1175 vs yMax 1225 in Bold). The same font clipped text in LibreOffice Writer, which confirmed it wasn't an IDE bug.
I fixed the font by setting hhea and OS/2 win metrics from head.yMax/yMin via fontTools. Text renders fully now.
The actual feature request
The IDE does not declare a UI font, so Avalonia falls back to SkiaSharp's default typeface — effectively the first family in the enumeration. On my system that happened to be a broken font, purely because it sorts first alphabetically in my user font directory.
Two observations:
fc-match never returns that font for any family name, including an empty one — it always returns DejaVu Sans. So the IDE isn't going through fontconfig name matching; it takes whatever the enumeration yields first. Adding another font directory changed which font was picked, while the name lookup stayed the same.
Only a few controls were unaffected ("No project open", the Memory viewer / Output / Emulator tabs) — presumably those set FontFamily explicitly in XAML.
It would help a lot to be able to set the UI font — either in Tools → Options next to EditorFontSize, or as a key in ZXBasicStudioOptions.json. Right now the font is whatever the system happens to enumerate first, which is unpredictable across machines. A FontFamily setting (falling back to the current behaviour when empty) would make this configurable instead of accidental.
Note this is separate from EditorFontSize, which only affects the code editor — the editor was always fine, since Cascadia Code is embedded in the binary.
Workaround for other Linux users
Until then, this launcher substitutes the UI font for the IDE process only, without touching the system:
It deliberately names no specific font to avoid — the broken one differs per machine. mode="prepend" puts the chosen family first for every query, so it doesn't matter which font the enumeration would otherwise return, and the rest of the list stays in place as fallback (CJK and emoji still resolve correctly — verified with fc-match).
One trap, in case you try it: <selectfont><rejectfont> does not work here. Font directories come from the system config and are already cached by the time the rule is parsed, so the broken font stays visible. Moving <selectfont> before <include> doesn't help either. Substituting the family is what works.
Activity
jaclas commentedon Sep 26, 2026
1.8 beta 6:
Duefectu commentedon Sep 26, 2026
Do you use any sort of on-screen font enlargement?
jaclas commentedon Sep 26, 2026
No, my DPI is unchanged —
Xft.dpi: 96and KDE'sforceFontDPI=96. Scaling was not involved: forcingAVALONIA_GLOBAL_SCALE_FACTOR=1resized the whole window but left the clipping proportions identical.Root cause: a broken font, not DPI
The font Avalonia picked was Fashion Fetish, installed in
~/.local/share/fonts. Its vertical metrics are wrong —hheahas hardcoded placeholder values in all 8 styles:hheaclaimshead)yMax1199 (1.199 em)yMin−412Glyphs overshoot
hhea.ascenderby 50%, so anything sizing a line box fromhheaclips the top half.OS/2.usWinAscentwas too low as well (1175 vsyMax1225 in Bold). The same font clipped text in LibreOffice Writer, which confirmed it wasn't an IDE bug.I fixed the font by setting
hheaandOS/2win metrics fromhead.yMax/yMinvia fontTools. Text renders fully now.The actual feature request
The IDE does not declare a UI font, so Avalonia falls back to SkiaSharp's default typeface — effectively the first family in the enumeration. On my system that happened to be a broken font, purely because it sorts first alphabetically in my user font directory.
Two observations:
fc-matchnever returns that font for any family name, including an empty one — it always returns DejaVu Sans. So the IDE isn't going through fontconfig name matching; it takes whatever the enumeration yields first. Adding another font directory changed which font was picked, while the name lookup stayed the same.FontFamilyexplicitly in XAML.It would help a lot to be able to set the UI font — either in Tools → Options next to
EditorFontSize, or as a key inZXBasicStudioOptions.json. Right now the font is whatever the system happens to enumerate first, which is unpredictable across machines. AFontFamilysetting (falling back to the current behaviour when empty) would make this configurable instead of accidental.Note this is separate from
EditorFontSize, which only affects the code editor — the editor was always fine, since Cascadia Code is embedded in the binary.Workaround for other Linux users
Until then, this launcher substitutes the UI font for the IDE process only, without touching the system:
It deliberately names no specific font to avoid — the broken one differs per machine.
mode="prepend"puts the chosen family first for every query, so it doesn't matter which font the enumeration would otherwise return, and the rest of the list stays in place as fallback (CJK and emoji still resolve correctly — verified withfc-match).One trap, in case you try it:
<selectfont><rejectfont>does not work here. Font directories come from the system config and are already cached by the time the rule is parsed, so the broken font stays visible. Moving<selectfont>before<include>doesn't help either. Substituting the family is what works.And now: