Bug 2547637
| Summary: | Default monospace font in Arabic Workstation install, Vazirmatn, looks awful as a console font | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Adam Williamson (Fedora) <rhbz> | ||||||
| Component: | kmscon | Assignee: | Jocelyn Falempe <jfalempe> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 45 | CC: | ajax, fonts-bugs, i18n-bugs, jfalempe, mclasen, rstrode, tagoh | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | AcceptedFreezeException | ||||||||
| Fixed In Version: | kmscon-10.0.4-5.fc45 | Doc Type: | --- | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2026-10-13 03:39:34 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 2406955 | ||||||||
| Attachments: |
|
||||||||
Proposing as a Final FE as this looks pretty bad out of the box. Looking into it a bit more, it seems /etc/fonts/conf.d/55-vazirmatn-vf-fonts.conf sets Vazirmatn as a 'fallback' for monospace, as part of https://fedoraproject.org/wiki/Changes/SetDefaultMonospaceFallbackFont , the idea being that we wanted to explicitly set a non-monospace sans-serif font as a fallback for monospace for languages where we don't have a native monospace font, which appears to include Arabic. Still, GNOME Terminal manages this, somehow or other. Latin characters in GNOME Terminal look 'normal' to me, and I can paste Arabic characters into a terminal and they show up looking (to my eyes) more or less the same. Whatever it's doing, can we make kmscon do that too? See attached screenshot of GNOME Terminal in Arabic. Created attachment 2160413 [details]
screenshot of GNOME Terminal (note normal-looking Latin text and Arabic-looking Arabic text)
Yes, kmscon can't handle non monospace font. I don't know how gnome-terminal can do that, as the basic of a terminal is that all cells have the same pixel dimension. Normally even if the name "monospace" matches vazirmatn, kmscon explicitly asks for monospace font with: FcPatternAddInteger(ftfont->pattern, FC_SPACING, FC_CHARCELL); FcPatternAddInteger(ftfont->pattern, FC_SPACING, FC_MONO); FcPatternAddInteger(ftfont->pattern, FC_SPACING, FC_DUAL); https://github.com/kmscon/kmscon/blob/main/src/font/font_freetype.c#L179 Also using Vazirmatn font, it's obvious the latin characters are not monospace. the 'm' is much longer than the 'n' https://fonts.google.com/specimen/Vazirmatn So maybe gnome-terminal uses another font for latin char ? your screenshot shows that 'm' and 'n' are clearly different from the vazirmatn font. Yes, GNOME Terminal is using a different font. But what I find interesting is that it's able to render Arabic characters. I don't know if the Arabic characters look good, or are monospaced. But at least Latin characters look good, and are monospaced, and Arabic characters are rendered. Testing a bit more: Using Noto Sans Mono, kmscon-freetype will fallback to using Noto Sans Arabic Regular for arabic glyphs. While at it, I found a bug in kmscon-freetype, that makes fallback character too small, and fixed it with https://github.com/kmscon/kmscon/pull/552 So to quickly fix this, I can replace in kmscon the default font search from "monospace" to "Noto Sans Mono" (but not upstream, only in Fedora package)? But what will font-config select if Noto is not installed ? Yeah, I'd worry about that too. We already found at least one (and I think two) other cases where noto sans mono isn't present. Of course, we could just make kmscon depend on it? Let's think it through and see if atagoh has any ideas. I submitted PR for kmscon here: https://github.com/kmscon/kmscon/pull/553 Thanks, I'm testing the PR, and it works very well. I will submit a kmscon update for F45, with this change, and the 7.3.0 kernel fix. As default fonts that can draw Arabic characters are now filtered out from kmscon, I looked for a monospace Arabic font, and found the Cascadia fonts. Just install it with `sudo dnf install cascadia-fonts-all`, and then it works well as fallback in kmscon. FEDORA-2026-0a823ffaca (kmscon-10.0.4-4.fc45) has been submitted as an update to Fedora 45. https://bodhi.fedoraproject.org/updates/FEDORA-2026-0a823ffaca Yeah, I was gonna ask if that means it can't render Arabic fonts at all. Maybe we should also look at installing Cascadia automatically on Arabic installs so an Arabic monospace font is available, and making it higher priority than the Vazirmatn fallback? +3 in https://forge.fedoraproject.org/quality/blocker-review/issues/2212 , marking accepted FE. Thanks a lot. For Cascadia, yes that was my suggestion but I've no idea how to do that. This font looks good in kmscon, so if you have folders or text files with arabic characters, that will really improve the user experience, instead of white rectangles. FEDORA-2026-0a823ffaca has been pushed to the Fedora 45 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-0a823ffaca` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-0a823ffaca See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. If there are any concensus on Arabic community to make it default (not sure if there are any nor who is responsible), we can add it to default-fonts-ar in langpacks. BTW as you may be aware, the above PR isn't Arabic specific. According to our font-status page[1], the languages we currently doesn't have any dedicated monospace fonts are as follows: * Amharic * Arabic (covered by Cascadia Code) * Assamese * Bengali * Burmese * Georgian * Gujarati * Hebrew (covered by Cascadia Code) * Hindi * Japanese (known issue in fontconfig; Noto Sans Mono CJK JP isn't recognized as spacing=dual) * Kannada * Khmer * Korean (fontconfig issue; same as Japanese) * Lao * Maithili * Malayalam * Marathi * Nepali * Odia * Persian (covered by Cascadia Code) * Punjabi * Punjabi; Pakistan (covered by Cascadia Code) * Simplified Chinese (fontconfig issue; same as Japanese) * Sinhala * Tamil * Telugu * Thai * Tibetan * Traditional Chinese (fontconfig issue; same as Japanese) * Urdu (covered by Cascadia Code) [1]...https://fedora-i18n.github.io/font-status/fedora-rawhide-minimal-20261008.html One more note: Noto Sans Mono doesn't have spacing property too because of their glyph coverage. I'm taking a look at fontconfig side how I can improve this monospace detection. If kmscon worked with Noto Sans Mono before, that's fine. Otherwise extra work may be needed in both fontconfig and kmscon perhaps. Noto Sans Mono worked great with kmscon. At least for latin character, and the unicode found in https://github.com/kmscon/kmscon/blob/main/docs/unicode-test.txt And testing again this, there are a few character on this test that are only present in Noto Sans Mono, and are now displayed as white rectangle. So that would be great to have Noto Sans Mono listed as monospace. I filed https://bugzilla.redhat.com/show_bug.cgi?id=2548466 for fontconfig > If there are any concensus on Arabic community to make it default (not sure if there are any nor who is responsible), we can add it to default-fonts-ar in langpacks.
Seems like having *any* font that's actually monospace and has coverage would be an improvement? If there are multiple choices, it might be trickier to pick which is the best choice, but if it's just "something vs. nothing" then something seems like an easy winner :)
FEDORA-2026-40aeea1b96 (kmscon-10.0.4-5.fc45) has been pushed to the Fedora 45 stable repository. If problem still persists, please make note of it in this bug report. |
Created attachment 2160392 [details] screenshot of awful console font in Arabic Workstation install Recently, kmscon (the new userspace console in Fedora 45 and Rawhide) switched to using freetype-based font rendering. It requests the "monospace" font, so what you get depends to an extent on the package set installed. Most package sets give you something that looks fine, like Noto Sans Mono, but I noticed that on the openQA Arabic install test, the console looks *awful*. I reproduced this manually. If you do an Arabic install with the Workstation package set, you get a horribly-spaced console font. `fc-match "monospace"` says that it is: Vazirmatn[wght].ttf: "Vazirmatn" "Regular" Not sure exactly how we should address this, so filing against fontconfig for now. Do we need to change the fonts installed with Arabic? The config files? kmscon? See attached screenshot. Note that if I run a GNOME Terminal, it doesn't use this font. It looks like it uses the same font it would on an English install. I guess it doesn't use 'monospace' but a font that GNOME denotes as its default monospace font, or something.