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: Special font characters in wme android  (Read 844 times)

0 Members and 1 Guest are viewing this topic.

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Special font characters in wme android
« on: October 10, 2015, 06:36:10 PM »

Hi I'm running the wme game in android but special characters like áéíóúñ didn't show.

I'm using the same TTF font that in windows that it's correctly showing all characters but in android not.

Is any issue of this or any solution?

Thanks.
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Special font characters in wme android
« Reply #1 on: October 11, 2015, 09:09:14 AM »

There might be several reasons:

1) The "FreeType" library doesn't "like" your font file. In case you use the regular "wme" (and not "wmelite") on Windows, you cannot trust what you see on Windows, because wme uses a different library for font rendering. You can try to run wmelite on Windows as well, my preferred way is to replace "wme_D3D9.exe" in the "WME Dev Tools" folder with a renamed "wmelite.exe", and add all the library dependencies as well. Then you can switch between "regular" and "lite" WME in "Project Manager" just by changing the "Use DirectX9" setting (from my memory, the setting is called differently).

2) Code page mismatch. In case you are using a code page for your text (and not UTF-8), there might be issues. I tried to implement a default for encoded strings in the "WMELiteFunctions.java", which defaults to "US-ASCII". If that is an issue for you, search the two lines that read:

      Charset charset = Charset.forName("US-ASCII");

and supply the proper name for your encoding. This is sort-of experimental, as there is no guarantee that a special charset (except for the ones that are supported by default) exists. Worst case you could supply your own here. But going for UTF-8 is in my view the better choice.

I hope that one of the two issues is the cause for your problem, and that you can fix it this way. Please post your findings.
Logged

lacosaweb

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 111
    • View Profile
Re: Special font characters in wme android
« Reply #2 on: October 11, 2015, 01:03:44 PM »

Fixed converting the strings.tab file to UTF-8 and changing line

Charset charset = Charset.forName("US-ASCII");

to

Charset charset = Charset.forName("UTF-8");

in WMELiteFunctions.java

Thanks!
Logged

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 157
    • View Profile
Re: Special font characters in wme android
« Reply #3 on: October 11, 2015, 04:37:31 PM »

Although it should not be necessary to change the "Charset" line if you have converted all your strings to UTF-8 (the functions in question should then not be called anymore), if it works, it works :) Glad I could help.
Logged
 

Page created in 0.158 seconds with 17 queries.