Add optional "Additional fonts" selection to Applications menu#4420
Add optional "Additional fonts" selection to Applications menu#4420Softer wants to merge 6 commits intoarchlinux:masterfrom
Conversation
|
Thnks for the effort, I'll need some time to test it properly |
|
|
||
|
|
||
| async def select_fonts(preset: FontsConfiguration | None = None) -> FontsConfiguration | None: | ||
| descriptions = { |
There was a problem hiding this comment.
Can we move this into the FontPackage itself I think that will make this more readable with a
class FontPackage(StrEnum):
...
def description(self) -> str:
match self:
case FontPackage.NOTO:
...
case FontPackage.EMOJI:
...
case FontPackage.CJK:
...
and then
items = [MenuItem(f.description(), value=f) for f in FontPackage]
group = MenuItemGroup(items)
there is also a helper function
MenuItemGroup.from_enum(FontPackage)
but that won't handle the custom description part, so we could enhance that with
@classmethod
def from_enum(
cls,
enum_cls: type[Enum],
sort_items: bool = False,
preset: Enum | None = None,
) -> Self:
text = elem.description() if hasattr(enum_cls, 'description') else elem.value
items = [MenuItem(text, value=elem) for elem in enum_cls]
or something along those lines
|
A test is failing |
Do you mean pytest? |
|
Is it better now? :) |
|
Added ttf-liberation and ttf-dejavu to the font selection. Liberation provides metric-compatible Arial/Times/Courier replacements with full Cyrillic support - essential for Steam client and Valve games (Dota 2, Source engine). DejaVu offers wide Unicode coverage and works as a reliable fallback font. Both of them are optiononal - user can install if he needs. |
Closes #4412
PR Description:
Adds a multi-select "Additional fonts" option to the Applications menu, allowing users to install common font packages during installation:
Nothing is pre-selected - users pick what they need or skip entirely. Follows the same pattern as Audio, Bluetooth, and Firewall applications.
Tests and Checks