不支援汉字..(font can't support chinese)

Monkey Forums/Monkey Programming/不支援汉字..(font can't support chinese)

hsutuo(Posted 2012) [#1]
chinese more than 3000 characters in daliy use(if included japanese and koreanese over 13000+ characters in unicode table), i don't know why lot's updates can't support unicode for use still, loadstring supported unicode seem last build, but't still can't render it out, I just think mark need think about get another way to support NON-ASCII characters, look like use native code dynamic generation text texture .... or other... (that's easy for use and more fast, one string only use one texture, bitmap fonts need lot's cycle to render texture as string's length.

I'm student from china. sorry my english...


hsutuo(Posted 2012) [#2]
-_-; look like this forum also can't support multi language


hsutuo(Posted 2012) [#3]
&#20320;&#22909;&#19990;&#30028;&#12290;<--- means hello world&#65281;


bruZard(Posted 2012) [#4]
chinese with more than 3k characters is really hard, i miss just a few characters for german language ;)


Tibit(Posted 2012) [#5]
I also want to be able to localize my games to Chinese, for more than one reason! Please post if you solve how to get that into the Game.


hsutuo(Posted 2012) [#6]
I'm corona sdk subscriber, i think monkey no netware and unicode support are many programmer drops monkey's very important two reasons, lot's people don't care which engine how easy to use 3rd-party plugin, they only care how easy and fast to build first application and not only for latin alphabet world. if mark no time to made it all, I strongly recommend forums to increase plate lets every specialty programmers to complete some basic module together


hsutuo(Posted 2012) [#7]
Chinese, Korean, Japanese also like mobile games, Chinese official report Chinese spent about $300,000,000 to spend in the mobile games in last year, but a little different, asians ware more like online free social games,and using in-app payment mode.


Tibit(Posted 2012) [#8]
Yeah, that is a good argument!

I have seen someone (I think) use Chinese letters. Was it not Diddy translate? I think Ziggys FontMachine Support Chinese, I have not tried to use it in monkey yet tough.

What is it that is not working with regards to Chinese, Korean, Vietnamese or Japanese?

Did you Test FontMachine or any other FontLibrary?


Samah(Posted 2012) [#9]
Was it not Diddy translate?

Diddy has a fairly simple internationalisation module. Just put all your strings in i18n.xml, then read them from a dictionary at runtime.
Put this in OnCreate()
LoadI18N()

Choose a language anywhere in the app with:
SetI18N("french")

Then use the I18N function to read that version from the current dictionary.
Print(I18N("Hello World!"))

Will print:
Bonjour, tout le monde!

It currently works with hiragana but I haven't tested any other extended character sets yet.


hsutuo(Posted 2012) [#10]
FontMachine and anglefont will make characters in one texture, it's look will on sometimes, but the first question is, need characters is far exceed to maximum texture size,(lot's device max texture size is 1024x1024), if not dynamically generated texture, it's not enough clearly, for example, when you need display the scoreboard, each player's nickname will be displayed, i'm sure player not want their nikename will blank, you can't expect player can use certain letters only.


marksibly(Posted 2012) [#11]
Hi,

I talked about this issue today with a Korean friend and I agree that a bitmap based font system probably wont work for Asian languages - esp. given my level of expertise in the subject.

It should be possible to get the OS to render characters (maybe...), but it will probably be slow given that the images have to end up on a GL buffer or html5 canvas etc. You'll also have to deal with font size differences on different targets. Perhaps something like CreateTextImage?

I will have a look into this though as I think it would be great to provide better multi-lingual support.

In the meantime, if this issue means Monkey is useless for you, please contact shareit for a refund.

As for Latin based languages like German etc, I'd be happy to extend the existing mojo_font to include more characters, but I don't really know how many to add (ie: how many are useful) or even where to get the images from! So if anyone one wants to submit a new mojo_font.png with extra characters, please do.

For reference: http://en.wikipedia.org/wiki/Latin_characters_in_Unicode


hsutuo(Posted 2012) [#12]
u can reference, http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download


hsutuo(Posted 2012) [#13]
i think monkey should provide other way to flexible multilanguage support, but requiring monkey to provide programmer more friendly interface, for example, surface access direct,(like more fast getpixel32/writepixel32), so that we can convert unicode font pixel data into xml file, and dynameically write by self.


Soap(Posted 2012) [#14]
Sometimes what is done with games is to scan the localization text and only include the characters in the bitmap font which will ever possibly be displayed.


taumel(Posted 2012) [#15]
30 years since C64's birthday and we're still having the same problems...

As for german, Ö Ä Ü ö ä ü ß.

This plus and keeping in mind that it's not a good idea using Y and Z for your steering as we're having a QWERTZ instead of a QWERTY keyboard layout.


anawiki(Posted 2012) [#16]
You can modify Angel Font module to use more than just one 1024x1024 texture. We did that for our purposes, since sometimes one 512x512 is a waste of ram and space if you can use just two 128x128 or so.

As long as there are not too many pages of texture you'll be fine. I believe we have tested JP version of Avalon and it ended that it doesn't use that much texture space for font.


ziggy(Posted 2012) [#17]
FontMachine module supports Unicode properly. It's a free module, and it allows you to load only the characters you're using in your game, at runtime. Maybe a "viable" approach?


siread(Posted 2013) [#18]
So has anyone successfully implemented Chinese into their game yet? What about handling text input? Is it possible?


Beaker(Posted 2013) [#19]
I'm currently adding mega-packed 1-bit (and possibly 2-bit) fonts to AngelFont. This means that you can store thousands of characters in one 1024x1024 image, and it unpacks them on the fly. Not sure when i'll have it finished because of other commitments.

The latest version of AngelFont already supports fonts across multiple pages/textures. And it supports 3 font pages packed into a single texture (one page per color channel).


ziggy(Posted 2013) [#20]
@Beaker: Sounds very interestting! Is there any reasonable way to get antialiasing when using a single 1 bit mask for font textures?


Beaker(Posted 2013) [#21]
No. 2-bit will to some degree. I've noticed that lack of antialiasing is not uncommon with games that really do require a full character sets of this size. It's always going to be a compromise.

I don't think that most games really need massive characters sets tho. Judicious use of icons, pre rendered text buttons and game screens seem more sensible.


ziggy(Posted 2013) [#22]
@Beaker: Ok, I see what you mean. I was wondering if there were any comparisons between 1 bit scaled down (to add filtering on edges) and pre-calcualted antialias of unscaled texts. It sounds an interesting thing for fontMachine too, but I'm not sure wich level of different bitdepths are suported by Mojo and if they're "inflated" on the VRAM, or they are kept in its original bitdepth. Does anyone have any info regarding this?


Grey Alien(Posted 2013) [#23]
I used a Japanese bitmap font for Unwell Mel. I used Bitmap Font Generator but got it to scan the text file containing the localised text so it only needed to add the characters from the file, thus greatly reducing the number of require characters. I still added in katakana and hiragana though so people could enter their names. The bitmap font still spanned more than one texture so my code had to handle that.