Jump to content

  • Log In with Google      Sign In   
  • Create Account

How to rendering unicode characters(chinese)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 sobeit   Members   -  Reputation: 440

Like
0Likes
Like

Posted 04 April 2014 - 01:12 AM

I'm wondering how those MMO(like world of warcarft) games render unicode characters(Chinese). Typically, those games have a message system where you can type any word and display it. They can also show big chunk of words for "task description", "weapon description" and etc. 

 

I used bitmap texture to render English characters in my engine, but bitmap texture for Chinese would be a memory eating monster considering there are roughly 10k of them. What technique do those games usually use to render unicode characters? 



Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31851

Like
0Likes
Like

Posted 04 April 2014 - 04:56 AM

If you don't have player chat, you can look at all your description text to find the set of required characters and then build a bitmap font with just those chars in it.
If you do have user chat, you need a system that generates bitmap fonts at runtime from TTF/etc files. Creating characters as required and deleting unused ones after a while.

You can also save a lot of memory by using signed distance field bitmaps instead of RGBA images.

#3 Javier Meseguer de Paz   Members   -  Reputation: 371

Like
0Likes
Like

Posted 04 April 2014 - 05:50 AM

If you use OpenGL+FreeType, you can have a look at: https://code.google.com/p/freetype-gl/. If not, well, you still get to see an implementation of what Hodgman was saying :)


“We should forget about small efficiencies, say about 97% of the time; premature optimization is the root of all evil” -  Donald E. Knuth, Structured Programming with go to Statements

 

"First you learn the value of abstraction, then you learn the cost of abstraction, then you're ready to engineer" - Ken Beck, Twitter





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS