Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

7 years ago by fugufish

is there a way to localize the ig.Font tool into asian languages like chinese and japanese?

For example, words in chinese are not built by alphabets, but by strokes. Not sure how that would be adapted/integrated into the game engine

7 years ago by dominic

I think this would be quite complicated to implement with a bitmaped font. I would just go with the Canva's native text rendering for Chinese and Japanese characters.

ig.system.context.fillStyle = '#ffffff';
ig.system.context.fillText( '日本人', 100, 100 );

7 years ago by fugufish

ok got it working. Must add the utf-8 meta tag to the <head> element.

       // UTF-8 added to header
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">	


        // UTF-8 added to javascript files too, for extra security
	<script type="text/javascript" src="lib/impact/impact.js" charset="utf-8"></script>
	<script type="text/javascript" src="lib/game/main.js" charset="utf-8"></script>
Page 1 of 1
« first « previous next › last »