TheFlyingFoool / DuckGameRebuilt

Duck Game decompiled & rebuilt with some added features,
105 stars 15 forks source link

Custom Fonts on Linux #26

Open SonnoOcea opened 7 months ago

SonnoOcea commented 7 months ago

Ciao, as per title, from the settings in the home screen after I pushed right to change font front "Duck Font" the game crashed. Now it keeps crashing on launch. I'm on Debian 12, x86_64bit. Where are the settings stored? This way I can at least change it back.

CrashDump warning ```Crash Source: Mods apparently were not responsible for this crash. System.EntryPointNotFoundException: SelectObject assembly: type: member:(null) at [0] L:0 at GetCharABCWidthsRange [41] L:0 at CreateRasterFontData [304] L:0 at Rebuild [22] L:0 at [6] L:0 at UpdateFont [64] L:0 at ResolutionChanged [24] L:0 at Update [220] L:0 at RunUpdate [694] L:0 at Update [355] L:0 Last 8 Lines of Console Output: Clearing all ghost data. Loading profiles from (/home/sonno/.config/DuckGame//Profiles/) Found (9) profiles. ResetMatchStuff() 9 9 ACFG Attempting save ACFG Save success Date: 02/13/2024 21:37:03 Version: 1.1.7717.16376 Platform: Debian GNU/Linux 12 (bookworm) Unix 6.1.0.18 (Steam Build 8782838)(SFX) Online: 0 Mods: nomods Time Played: 00:00:07 (43) Special Code: vessel:TVVessel added:0 count:87 cPriori:2 Resolution: (A)1920x1080 (G)1920x1080 (Fullscreen(H))(RF 42) Level: DuckGame.TitleScreen Command Line: ```

Have a nice evening, Sonno

Edit: I compared the files with those of the vanilla Duck Game and found the problem in the options.dat file inside /home/sonno/.config/DuckGame/<StringOfNumbers>/Options/ folder.

In vanilla Duck Game there is a string that is <chatFont/> while on my crashing version it was <chatFont>Arial</chatFont>. After changing back the string to how it is vanilla Duck Game the problem was solved.

Feel free to close this issue, I posted this in case anybody else (me of the future) stumbles on this bug again.

othello777 commented 6 months ago

The issue of the crashing has been fixed in c0d59e2, but unfortunately custom fonts are not working on linux yet. we'll likely get back around to this so I'll leave this open