News draft: Pango ≥ 1.56.0 fails in the presence of old Electron ≤ 29 apps
Apps using the incoming `pango 1.56.0` may fail to render text or crash if the user has also run apps based on Electron 29 or older. To immediately mitigate the issue, delete `~/.cache/fontconfig` or run `fc-cache`. However, further use of old Electron apps may cause the problem to reappear. We recommend - switching newer versions of the Electron applications that use at least Electron 30, - using Flatpak releases of the applications, or - giving the applications their own XDG cache directory by running them with `XDG_CACHE_HOME=${HOME}/.cache/appname` in the environment. ### Technical details Pango 1.56.0 depends on "font wrapper" information provided by Fontconfig 2.15.0 in order to determine whether it supports a font. Electron 29 and older are shipping a Git snapshot of Fontconfig that has the same cache version (`9`) as Fontconfig 2.15.0. but lacks the font wrapper information. The Electron version of Fontconfig fails to parse the cache files generated by our version of Fontconfig. It then regenerates them without the font wrapper information. Our Fontconfig still considers these cache files valid, but the missing font wrapper information leads to Pango failing to find any valid fonts. This issue is being tracked at [pango#1]( https://gitlab.archlinux.org/archlinux/packaging/packages/pango/-/issues/1).
Thanks for preparing a draft! Comments inline. Quoting Jan Alexander Steffens (heftig) (2025-01-15 13:40:30)
Apps using the incoming `pango 1.56.0` may fail to render text or crash if the user has also run apps based on Electron 29 or older.
To immediately mitigate the issue, delete `~/.cache/fontconfig` or run `fc-cache`. However, further use of old Electron apps may cause the problem
This should be `fc-cache -f` (just `fc-cache` is insufficient).
to reappear.
We recommend
- switching newer versions of the Electron applications that use at least Electron 30, - using Flatpak releases of the applications, or - giving the applications their own XDG cache directory by running them with `XDG_CACHE_HOME=${HOME}/.cache/appname` in the environment.
Suggestion: Consider replacing "appname" with "<appname>" or "$appname" to clarify that those paths should be application-specific, not literally "appname". (Even though, on second thought, a shared second cache directory may actually work too, as long as only the right set of applications is added to it.)
### Technical details
Pango 1.56.0 depends on "font wrapper" information provided by Fontconfig 2.15.0 in order to determine whether it supports a font.
Electron 29 and older are shipping a Git snapshot of Fontconfig that has the same cache version (`9`) as Fontconfig 2.15.0. but lacks the font
Typo: Remove period after Fontconfig version.
wrapper information.
The Electron version of Fontconfig fails to parse the cache files generated by our version of Fontconfig. It then regenerates them without the font wrapper information.
Our Fontconfig still considers these cache files valid, but the missing font wrapper information leads to Pango failing to find any valid fonts.
This issue is being tracked at [pango#1]( https://gitlab.archlinux.org/archlinux/packaging/packages/pango/-/issues/1).
Thanks again!
On Wed, 15 Jan 2025 at 21:11, Lukas Fleischer <lfleischer@archlinux.org> wrote:
Thanks for preparing a draft! Comments inline.
Thanks! 2nd draft: --- Apps using the incoming `pango 1.56.0` may fail to render text or crash if the user has also run apps based on Electron 29 or older. To immediately mitigate the issue, delete `~/.cache/fontconfig` or run `fc-cache -f`. However, further use of old Electron apps may cause the problem to reappear. We recommend - switching newer versions of the Electron applications that use at least Electron 30, - using Flatpak releases of the applications, or - giving these applications their own XDG cache directory by running them with `XDG_CACHE_HOME=${HOME}/.cache/old-<appname>` in the environment. ### Technical details Pango 1.56.0 depends on "font wrapper" information provided by Fontconfig 2.15.0 in order to determine whether it supports a font. Electron 29 and older are shipping a Git snapshot of Fontconfig that has the same cache version (`9`) as Fontconfig 2.15.0 but lacks the font wrapper information. The Electron version of Fontconfig fails to parse the cache files generated by our version of Fontconfig. It then regenerates them without the font wrapper information. Our Fontconfig still considers these cache files valid, but the missing font wrapper information leads to Pango failing to find any valid fonts. Other runtimes using Chromium versions before 123.0.6274.0 are probably also affected. This issue is being tracked at [pango#1]( https://gitlab.archlinux.org/archlinux/packaging/packages/pango/-/issues/1).
On 15.01.25 at 19:40 (UTC+0100), Jan Alexander Steffens (heftig) wrote:
We recommend
- switching newer versions of the Electron applications that use at least Electron 30, - using Flatpak releases of the applications, or - giving the applications their own XDG cache directory by running them with `XDG_CACHE_HOME=${HOME}/.cache/appname` in the environment.
Do we have to recommend using Flatpak over Arch packages? It does not seem like a good suggestion long-term... Further, Flatpak itself has some issues, e.g. [the wiki] says "Many Flatpak applications available on flathub are not effectively sandboxed by default." Is it still a viable workaround even without a sandbox? Disclaimer: I've never used Flatpak myself... [the wiki] https://wiki.archlinux.org/title/Flatpak Cheers, Jakub
On Wed, 15 Jan 2025 at 22:16, Jakub Klinkovský <lahwaacz@archlinux.org> wrote:
Do we have to recommend using Flatpak over Arch packages? It does not seem like a good suggestion long-term...
On the contrary, I would like to see Flatpak use increase. It's a much better model for desktop applications.
participants (3)
-
Jakub Klinkovský
-
Jan Alexander Steffens (heftig)
-
Lukas Fleischer