protonscr

Some native titles expect Windows fonts available

steamclosed 3rd party gameDistro Family: SteamOS
ValveSoftware/steam-for-linux#8572 · opened 2022-05-05 by dos1 · updated 2022-05-09 · 4 comments · github
Ddos1 2022-05-05 github

Some games, such as The Beginner's Guide, and applications, such as Steam in desktop mode, rely on font names that are commonly distributed with Windows even on their GNU/Linux builds.

Installing wine package via pacman brings in fontconfig aliases that make those fonts work:

(deck@steamdeck ~)$ ls -al /etc/fonts/conf.d/30-win32-aliases.conf 
lrwxrwxrwx 1 root root 56 May  1 08:21 /etc/fonts/conf.d/30-win32-aliases.conf -> /usr/share/fontconfig/conf.default/30-win32-aliases.conf
(deck@steamdeck ~)$ cat /usr/share/fontconfig/conf.default/30-win32-aliases.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias binding="same">
    <family>MS Shell Dlg</family>
    <accept><family>Microsoft Sans Serif</family></accept>
    <default><family>sans-serif</family></default>
  </alias>
  <alias binding="same">
    <family>MS Shell Dlg 2</family>
    <accept><family>Tahoma</family></accept>
    <default><family>sans-serif</family></default>
  </alias>

  <alias binding="same">
    <family>MS Sans Serif</family>
    <prefer><family>Microsoft Sans Serif</family></prefer>
    <default><family>sans-serif</family></default>
  </alias>
</fontconfig>
(deck@steamdeck ~)$ pacman -Qo /usr/share/fontconfig/conf.default/30-win32-aliases.conf
/usr/share/fontconfig/conf.default/30-win32-aliases.conf is owned by wine 7.0rc5-1
(deck@steamdeck ~)$

A similar config could be provided by SteamOS by default without having to bring the rest of wine in.

TTTimo 2022-05-05 github

Hello,

On a basic level, I would argue that the root problem lies with these titles, if they are shipping native and assuming fonts available that are not "default". The Steam Deck compatibility report would likely flag this as an issue with the native version.

This is also not SteamOS specific, although SteamOS could provide the missing fonts as a workaround.

@smcv I wonder if the .deb should check / install the aliases? Seems like a similar problem to the udev rules.

Ssmcv 2022-05-06 github

For Proton games, this seems more like something for the container runtime to do. Sharing fontconfig configuration snippets across a container boundary gets into problems with libfontconfig version skew (as both Steam and Flatpak have found), because different versions of libfontconfig understand different syntax, and the container runtime can be either newer or older than the host system, so it seems better for the container to be responsible for providing both libfontconfig and its configuration.

Similarly, if we want increasingly many native Linux games to stop running on the host system and start running in Steam Runtime containers, then those will pick up the same fontconfig as Proton, ignoring the host OS.

fontconfig comes with configuration to map several common Microsoft and PostScript fonts to open-source equivalents, but that only covers fonts with deliberately similar metrics (matching glyph sizes), like Arial -> Liberation Sans.

I wonder if the .deb should check / install the aliases? Seems like a similar problem to the udev rules.

This is a system-wide configuration change with a risk of breaking the expectations of non-Steam applications, so I'm not sure how appropriate it would be for the .deb to do this.

Ddos1 2022-05-09 github

I'm sorry, looks like I was mistaken in my original assessment. After looking at it again, it appears that what makes these examples (Steam and The Beginner's Guide) broken isn't lack of these particular aliases I mentioned earlier, but rather a missing lib32-fontconfig package, making it actually a SteamOS issue with 32-bit applications. Installing lib32-fontconfig makes them work as expected without having to set up any additional aliases.

Upstream links