MontyTRC89 / TombEngine

A new custom Tomb Raider engine based on TR5 engine
MIT License
67 stars 17 forks source link

game crashes when I use accented characters with Strings.DisplayString #905

Closed davidmarr closed 1 year ago

davidmarr commented 1 year ago

game crashes when I use accented characters (à, è, é, ì, ò, ù) with Strings.DisplayString or Node functions. If I enter accented characters in TombIDE the file cannot be saved. The log file contains no errors

When I try If4 the game crashes. error

Lwmte commented 1 year ago

Hi! Thanks for the report! For TIDE issues, it's better to leave feedback also in TE repo issue tracker: https://github.com/MontyTRC89/Tomb-Editor/issues

I will check out the issue on TEN side too.

Lwmte commented 1 year ago

This turned out to be asset issue. MakeSpriteFont utility by default generates a font with a very narrow range of characters (only basic ASCII 0-0xFF). Additionally, if missing characters are used, it doesn't display any placeholder symbol, but instead just crash the app.

To solve this problem, you must choose your TrueType font and compile it using MakeSpriteFont (download here: https://github.com/microsoft/DirectXTK/wiki/MakeSpriteFont), but using with specific command line options:

MakeSpriteFont "Your Font Name" font.spritefont /FontSize:32 /CharacterRegion:0-0x0250

Range of characters 0-0x250 should be enough to cover most of the Latin letter variations with different accented characters.

Lwmte commented 1 year ago

Later we also will update default TEN font in the package to include some of the missing symbols.