Archived

This topic is now archived and is closed to further replies.

how to show the chinese font by OPENGL?

This topic is 5653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

yes,i try to load 65535 lists from a chinese font type(save 1 chinese letter use 2 byte so there is 65535 i think),but when i ues the method the tutorail 12 taught to show the letters,the screen was blank

Share this post


Link to post
Share on other sites
you might check www.opengl.org -> advanced forums as thehre has been simmilar question posted about 6 months ago

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
assuming that you correctly allocate and are dealing with storing and converting teh fonts for use, i can only come up with that you are handling using opengl wrong in releationg to your drawing code. 65535 is the upper limit of a 16 bit unsigned short, thus ANY function that takes a short will not work properly. i suggest you split things up (i hardly see when you would ever need more then a few hundred symbols per screen. thus you may wish to update the texture you are using every so often with the correct symbols required for the screen. thus you have an offscreen buffer contain the images of the symbols and then you use glSubTexture (i think thats what its call) and copy the data from yoru local buffer to the texture.

the other way you can handle things is to create a 512x512 texture (assuming your video card supports such a resolution) and limit your font size to 8x8 and create 16 textures to store all yoru symbols. this is actually a silly idea, but is menat to show you that you need to ensure you have some form of font cache since storing all the symbols at once is a quite memory intensive task that is foolish to even try. this is one of the reasons why some games have some english in them, its more space efficent symbol wise. since teh english langauge only has 52 symbols (ie uppper and lower case) numbers are the same across most of the world, as well as puncutaion. i highly suggest doing some research into the topic because its a problem for any asian system. i say this because you may find more information relating to how japanese game makers handle the problem being that they create so may games on console systems where ram and storage space is very tight. though the japanese lanaguage is somewhat easier to deal with since it has a smaller simple sets that represent sounds, as well as kanji symbols that represent words (much of which is derived from chinese). most games tend to use the smaller "sound" sets (only about 48 symbols each) so it would require less storage. of course only kanji symbols actually used are stored with the game, not the entire symbol set.

Share this post


Link to post
Share on other sites