Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / Russian language in the game

Author
Message
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 23rd Aug 2012 12:03
Hello all,

I have a problem with the display of the Russian language in the game. Under Windows, english and russian text is displayed, but the iOS Simulator and iPad displays only English letters. Please help me with this problem.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 23rd Aug 2012 16:08
You need to show how you are selecting Russian instead of English letters.

Are you using different font image files?

If so, are you sure that the file names are exactly the same as the ones you use in your code? In Windows, it doesn't care about difference in case (uppercase vs lowercase). But every other operating system does. So, if the case for the actual file name is different from what you use in your code, it won't be found on iOS devices (even the simulator).

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 23rd Aug 2012 19:15
In the same line, there are Russian and English letters. I using one font image file for English and Russian. The file name is correct. I read the text from the file and print it on the screen. File encoding - UTF8. I use the function:

m_iImageExtendedFont = agk::LoadImage ( "Data/Textures/Fonts/font_2.png" );
agk::SetTextExtendedFontImage ( id, iImageExtendedFont );

Russian text not show, but English - show correct.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Aug 2012 15:19
Can you provide a sample of the Russian text? Are you sure that the letters all map to ascii values between 0 and 255 (the extended set should be getting you the characters from 128 to 255)?

Is any of the Russian text showing up at all?

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 24th Aug 2012 17:59
Yes, but in Windows displays all the letters.

I have attached an example of text and extended image font.

Life is our game, playing we live!

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Aug 2012 19:47
Well, your font file isn't correct.

It should only contain, at most, 128 characters.

The font files are only good for 128 characters. Starting either from ascii 0 or ascii 128.

It is permissible to have fewer than 128 characters. But AppGameKit does not expect a font file to have more.

I'm quite surprised that it works in Windows. But, then the Windows implementation may be a bit more flexible.

Second, are you that you added the font file (with its text map) to the Resources in your Xcode project? That is usually the most common problem about not seeing the expected images on an iOS device.

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 25th Aug 2012 11:13
Hi,

But I set the exact position of the letters. Number should not matter.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Aug 2012 18:57
I just reread the description for SetTextDefaultExtendedFontImage and it sounds like it should only care about the number in the text file.

That may be the case, but your code isn't working. Without looking at more of your code, I can't tell if there is some other issue.

Try breaking your file into two and see if that solves the problem.

You didn't answer my question about whether you added the font file and the text map to your project resources. And, if you did, did you keep the same directory structure 'Data/Textures/Fonts' in the Resources folder in you Xcode project?

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 25th Aug 2012 19:39
I solved the problem with Russian. I wrote a text file from which I read the text in the format 10007 (MAC - cyrilic). It worked. Only there is no capital letters, but I do not matter now. Lady thanks for the help.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Aug 2012 20:13
I'm glad you worked it out.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester

Login to post a reply

Server time is: 2024-04-20 00:06:01
Your offset time is: 2024-04-20 00:06:01