Sign in to follow this  
ftguy2018

About creating dynamic font for Japanese

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.