ftguy2018 Posted March 5, 2019 Share Posted March 5, 2019 Hello, does someone has some advise on how to implement the kanji support in Panda2 ? We will have to port some of the games we developed to Japanese version and we need to have support for Kanji, usually we do it with some engine preparing on the fly a texture with the kanji currently in use during the display of text on other platforms, is this approach possible in Panda2 ? Can I create texture on the fly and submit is as sprites or better can I hook somewhere into the text function ? I remember there is a system text also accessible but I am assuming Japanese won't render properly right ? Thank for any advise on that matter. Quote Link to comment Share on other sites More sharing options...
enpu Posted March 6, 2019 Share Posted March 6, 2019 Hi, Do you have any more information or examples on using Kanji? I'm not familiar with that, but i'm sure it can work with Panda. Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted March 6, 2019 Share Posted March 6, 2019 Hi ftguy, my understanding of the topic: You can load Kanji in Panda2: Download and install some font that has the japanese character sets onto your system (.ttf file). The default fonts, like Arial, won't have the necessary character set. Use some .fnt file generator (I used BMFont.. it's free). Select the character range you want. ( This link suggests "CJK unifed ideographs - Common and uncommon kanji ( 4e00 - 9faf)" ) Export the .fnt and .png generatored from your selected choice. (Only select character you need? If too many character sets elected, png is potentially too large...) Load into panda as per usual text. So what I'm not sure about is: What you mean my Dynamic Font. I kinda know that some characters are created by combining different strokes/characters together, etc, which I'm not quite sure about at all? Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted March 7, 2019 Author Share Posted March 7, 2019 Yes Dynamic font I was making reference when you create only the necessary KANJI at runtime by filling up a texture page, so the KANJI is store as only 1 bit/texel and then you unpack it, you only create KANJI that are currently needed on screen and then remove them when not needed anymore, because having a texture for all the possible kanji is taking too much space, actually in our case, we know which characters will be displayed upfront so probably just generate the texture for those char will be ok. Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted March 10, 2019 Share Posted March 10, 2019 Yeah, if you open up a fnt file (and the associated png) you'll see it's just mapping characters to positions on the png. So you can generate a .fnt which just contains the character set you need. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.