flathub / com.valvesoftware.Steam.CompatibilityTool.Proton

https://flathub.org/apps/details/com.valvesoftware.Steam.CompatibilityTool.Proton
35 stars 6 forks source link

Replacement fonts are missing #15

Closed netstat-peanut closed 3 years ago

netstat-peanut commented 3 years ago

Firstly, thanks to @gasinvein and whomever else assisted with this effort.

I'm trying to leverage the flatpak version of Steam to run Sea of Thieves and unfortunately the latest Proton 5.13 version not only affected my ability to run it due to the inclusion of pressure-vessel, but legacy versions of Proton/[GE] no longer execute it either. It used to run fine with Proton-5.X-GE but ever since an update several weeks ago it's been no dice, with the game either failing to execute entirely or crapping out when selecting the "Sign In" option.

Fast forward to community build 1605028747, the game finally launches and the Sign In option at least attempts to spawn the XBox Login Child Window [screen shot here]. However, the window doesn't appear to have fully rendered, the free text login field never indicates selection with cursor, nor does the field accept keyboard input. Clicking the blue button (ordinarily "Next" to prompt for password) or gray button (usually "Cancel") functions as expected, with the former returning "invalid username" and the latter closing the window.

This may or may not be related to the Vulkan child window issue discussed here that was rectified with a manipulated winhttp.dll binary early on.

Any pointers or suggested troubleshooting steps would be much appreciated!

gasinvein commented 3 years ago

Missing text on buttons may be related to missing fonts (this build doesn't supply them yet). If you're familiar with protontricks - try installing corefonts for the game.

Update: You'll need to remove broken font symlinks from Proton prefix first, otherwise winetricks won't bee able to install fonts. Those symlinks are (relative to your Steam library folder): steamapps/compatdata/1172620/pfx/drive_c/windows/Fonts/{arial,arialbd,cour,msyh,times}.ttf

Update 2: protontricks is currently broken, see flathub/com.valvesoftware.Steam#651. To wokraround, run shell in Steam sandbox with

flatpak run --command=bash com.valvesoftware.Steam

and then run protontricks from the sandbox shell

export PYTHONPATH=/app/utils/protontricks/lib/python3.7/site-packages PATH=$PATH:/app/utils/protontricks/bin
protontricks --no-runtime 1172620 corefonts
netstat-peanut commented 3 years ago

Thank you @gasinvein; it worked! I'm sincerely appreciative of you having taken the time to help me out.

gasinvein commented 3 years ago

Can you please elaborate a bit on what exactly works? Text on the buttons appeared? Or you're able to login and play the game now?

netstat-peanut commented 3 years ago

Can you please elaborate a bit on what exactly works? Text on the buttons appeared? Or you're able to login and play the game now?

Absolutely...it's both, actually. I'd tried to install corefonts via winetricks after your first reply and got a signature mismatch. Your subsequent updates to your reply is what got it working. The text on the buttons appeared, the free text login field was operable, and I was able to login and play the game.

My uneducated assumption is that the buttons would have worked had I been capable of specifying a login, however the errant fonts prevented even the login input from rendering in / recognizing (much less the button text). Here as well I'd previously attempted to copy / paste the login info to no avail, so I assume the font issue prevented the form's function entirely.

Happy to answer any other questions you might have, or respond with any other system info that might help!

Edit: For the sake of transparency, and due to the issues this game had with winhttp.dll previously, I'd also tried to install both wininet and winhttp via winetricks command line after the corefonts installation failed. It was a shot in the dark that didn't work, and the state of the XBox login window was exactly as it was before. I then went back to perform your Updated steps from above, which resolved the issue. Just putting this out there in case there was some voodoo between that all factors combined (though it's doubtful).

gasinvein commented 3 years ago

Oh, so missing fonts actually can cause issues worse than just missing text and effectively render game unplayable. This means that we'll have to bundle them after all. I really hoped that it won't be necessary.

gasinvein commented 3 years ago

Or, alternatively, we can get rid of broken font symlinks in wineprefixes so that "protontricks corefonts" always works as a workaround. Also it would work if the required fonts are installed on host, since wine here is linked with runtime's fontconfig and does support system fonts.

netstat-peanut commented 3 years ago

Or, alternatively, we can get rid of broken font symlinks in wineprefixes so that "protontricks corefonts" always works as a workaround. Also it would work if the required fonts are installed on host, since wine here is linked with runtime's fontconfig and does support system fonts.

From my perspective it comes down to expectations of it "just working" vs. users attempting to run a game, having it fail, and having to poke around on the Internet to find a solution. It seems distributing fonts would offer a more seamless experience--at least in the case of XBox games and/or others depending on such login scenarios--with the tradeoff being your forcing them upon users who might not otherwise require them.

FWIW the cab files were 3.8 MB in sum so even uncompressed it's not much of a burdensome footprint.

gasinvein commented 3 years ago

distributing fonts would offer a more seamless experience

It certainly would! But there are two problems with bundling replacement fonts:

gasinvein commented 3 years ago

Anyway, if you don't mind, I'll rename and reuse your issue as a generic "missing fonts" issue, since there are other affected games and the workaround doesn't properly address the problem.

netstat-peanut commented 3 years ago

I gotcha, and I agree on all points! It seems silly that something as seemingly trivial as fonts causes more problems with modern development than the large host of other, more critical dependencies.

Edit: Sounds good. Thanks again for your help, and feel free to ping me if I can test anything out for you!

set-free commented 3 years ago

Cyberpunk 2077 launcher don't work without fonts too.