linebender / linebender/parley
fontique: generic families (Fedora/KDE)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 736
- Forks
- 120
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 53
Description
Fontique does not correctly detect UI fonts on KDE 5:
```
GenericFamily::SystemUi:
Cantarell
Cantarell
Cantarell
GenericFamily::UiSerif:
GenericFamily::UiSansSerif:
GenericFamily::UiMonospace:
GenericFamily::UiRounded:
```
`XDG_CONFIG_HOME` is not set, while `XDG_CONFIG_DIRS` is, but does not point to any font configuration, so my best guess is that we must test `XDG_CURRENT_DESKTOP=KDE(:.*)?`, then parse `$HOME/.config/kdeglobals`.
Excerpt from the latter:
```
[General]
ColorSchemeHash=0be804dba87e3512aeb4be3d78ed981f59f0f2f4
XftHintStyle=hintslight
XftSubPixel=none
fixed=Noto Sans Mono,11,-1,5,50,0,0,0,0,0
font=Noto Sans,12,-1,5,50,0,0,0,0,0
menuFont=Noto Sans,12,-1,5,50,0,0,0,0,0
smallestReadableFont=Noto Sans,10,-1,5,50,0,0,0,0,0
toolBarFont=Noto Sans,12,-1,5,50,0,0,0,0,0
```
This is:
- The family name
- Size ("points", so presumably we just multiply by 96/72 = 4/3 to get dots-per-Em)
- ... requires investigation
The hinting (none/slight/medium/full) & sub-pixel rendering (`none`, `rgb`, `bgr`, `vrgb`, `vbgr`) info is likely best ignored since (a) it is beyond the scope of Fontique and (b) is rasterer dependent.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Fontique's generic-family detection and reproduce the KDE 5 case with XDG_CURRENT_DESKTOP=KDE and the provided ~/.config/kdeglobals excerpt. Investigate how the font, menuFont, fixed, and related entries should map to generic families; done means KDE UI fonts are detected without relying on unsupported rendering hints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fedora, rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100