Jump to content
The Dark Mod Forums

Recommended Posts

Posted

This is a bug that occurs on current (29 Jan 2013, rev. 5694) SVN code. Proposed solutions are in this post.

 

It's probably related to:

0002811: Font loading does not fall back to English

http://bugs.angua.at/view.php?id=2811

 

Reproduction:

After changing language to polish and restarting TDM, the following happens:

 

SetupFonts() in idDeviceContext::Init() can't find fonts for polish language. It does not fall back to loading english fonts.

Lack of ANY fonts loaded causes a crash while loading GUI (in idDeviceContext::SetFontByScale() exactly).

I've attached the stack trace.

 

I have three solutions for this problem:

 

1. I've attaches a patch (I18N.cpp.patch.txt). However:

- it uses a hard coded value "fonts/english",

- it requires #str_04127 to be translated properly for all languages with their own fonts - this is actually an advantage, IMHO.

 

2. I've also attached an alternative patch (DeviceContext.cpp.patch.txt) that solves this problem. It also uses a hard coded value "fonts/english", and is not as good as the first one.

 

3. Third solution is to require for translation of #str_04127 to be present in all languages that do not have their own fonts. Translations such as Polish have to be fixed.

 

I actually think that the first solution is the best one, because it's the most bullet-proof (no risk of crashes, ever).

 

(I wanted to edit the original issue, but I don't have permission.)

stacktrace.txt

DeviceContext.cpp.patch.txt

I18N.cpp.patch.txt

Posted

Hi, thanx for the headsup and the patch!

 

I've looked into why Polish would not fallback to the English fonts, and can see why it could do that - the intention was that if #str_04127 is not translated, it falls back to the value of #str_04127 in english. The code instead uses "fonts/language", which is proper for any other language (like Japanese), but would be invalid for Polish (since it must use English fonts).

 

So I think the issue can equally easily be patched by adding the mission value for #str_04127 to the polish dictionary.

 

HOWEVER, this is what actually is happening. The polish dictionary already contains:

 

    "#str_04127"    "fonts/english"		 // the path to the font files, western languages all use english, while russian etc use their own

 

So, on my system, this works already and the same entry is present in the file we shipped with v1.08 (and such a big bug would not have escpated us).

 

I'm curious, why does it not work on your system?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

No harm done :) Was this a problem with the updater?

 

If you find other bugs, such detailed reports are always welcome :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Posted

Hmm, think I've also fixed this in my branch (since there is a more serious issue that the internationalization requires the dynamic link to be correct else the engine will fall over.).

 

But good find nevertheless.

Posted

Hmm, think I've also fixed this in my branch (since there is a more serious issue that the internationalization requires the dynamic link to be correct else the engine will fall over.).

 

Erm, there is nothing to fix, the system works as intended (it picks the language the strings file says, or it falls back to "lang/LANGUAGE"). So what did you "fix"?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • demagogue

      I saw a let's play video with the indicator that pops up showing the direction for AI barks. This for the record. I hadn't looked into it before and wanted to now, but search terms weren't helping me find info on it in the forum. Could anyone drop a link to a thread or post on it?
      · 2 replies
    • Petike the Taffer

      I think I still have the login details for the Google Account used to log in to The Dark Mod's official YouTube channel. With all the new videos that have been done regarding 2.12 and 2.13, it really feels like it's time for an update. I don't know if logging into another account is going to work, as I've had some issues with it in recent times, but If I manage to do so, I'll do some updating regarding the newer videos.
      · 0 replies
    • The Black Arrow

      New Year Plans:
      Play Thief Gold
      Play Thief 2
      Play Thief 3
      Play Thief Gold...To play "The Black Parade"
      Finally, eat Velvet Cake and...Play The Dark Mod, wooeey!
      · 6 replies
    • DeTeEff

      I've started working on a new mission and today I thought it would be cool to merge it with something I worked on back in 2018...It was back when I thought it was cool to work in "spread out your project like old marmalade on every wall in your house" so it took some time to fix broken assets and optimize file names and material files and those things...But it feels nice to hopefully be able to implement all that effort I put down back then. It will be "något i hästväg" as we say in Sweden 
      · 1 reply
    • BoilerDunce

      I'm very proud to say I've gotten a better PC and can now actually play a lot of the missions I previously had to shelf.
      · 8 replies
×
×
  • Create New...