Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: TTF problem  (Read 6265 times)

0 Members and 1 Guest are viewing this topic.

Schnuffel

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
    • Dreamagination Entertainment
TTF problem
« on: December 17, 2007, 08:51:55 PM »

This is strange: I wanted to grey out or "soft delete" dialog responses that have already been used, so I assigned a different font to them - and WME kept crashing on me. So I tried my code on the wme_demo and it boils down to some TrueType issue, I think.
Take the 'oldguy' entity in the wme_demo, for example:

Code: [Select]
// fill the response box
Game.AddResponse(0, Responses[0], null, null, null, "fonts\truetype.font");
Game.AddResponse(1, Responses[1]);
Game.AddResponse(2, Responses[2]);
Game.AddResponse(3, Responses[3]);

This works fine. Then I added the font parameter to the second response, too:

Code: [Select]
// fill the response box
Game.AddResponse(0, Responses[0], null, null, null, "fonts\truetype.font");
Game.AddResponse(1, Responses[1], null, null, null, "fonts\truetype.font");
Game.AddResponse(2, Responses[2]);
Game.AddResponse(3, Responses[3]);

Now when you select the first response, WME will crash. This only happens on the first response, though, only with truetype fonts, and only if a TTF is assigned to any other response except (or besided) the first one.

Took me 3 hours to realize :-\

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: TTF problem
« Reply #1 on: December 17, 2007, 09:56:23 PM »

Thanks for reporting. I was able to reproduce and fix the bug.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Schnuffel

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
    • Dreamagination Entertainment
Re: TTF problem
« Reply #2 on: December 17, 2007, 10:17:59 PM »

God, you're fast :o Thanks :)

Schnuffel

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • View Profile
    • Dreamagination Entertainment
Re: TTF problem
« Reply #3 on: December 18, 2007, 03:17:31 PM »

Hm, apparently I was wrong - this is not exclusive to TTFs. I tried my own bitmap fonts as a workaround and WME crashed again. It seemed to work with the standard bitmap fonts, though (outline_red.font, outline_white.font, sserif.font etc.). So I copied 'outline_white.font' and renamed it to 'response.font', then assigned it as before:

Code: [Select]
// fill the response box
Game.AddResponse(0, Responses[0], null, null, null, "fonts\response.font");
Game.AddResponse(1, Responses[1], null, null, null, "fonts\response.font");
Game.AddResponse(2, Responses[2], null, null, null, "fonts\response.font");
Game.AddResponse(3, Responses[3], null, null, null, "fonts\response.font");

And it crashes again. Even though the font is an exact copy of one that works, just the filename is different. Does your bugfix cover that?

I'm out of workarounds now...

Edit:

Ah, okay... so it's also important which fonts are set as defaults for the response box. If a font isn't one of the response box defaults, the system font or the video font, it won't work. Well... enough for a workaround until the next WME version :)
« Last Edit: December 18, 2007, 03:39:49 PM by Schnuffel »
Logged
 

Page created in 0.034 seconds with 19 queries.