Font Size: a A A

The Research And Realize Of Inputting And Displaying Chinese Fonts Method Based On Space Desktop System

Posted on:2012-06-13Degree:MasterType:Thesis
Country:ChinaCandidate:F ChenFull Text:PDF
GTID:2178330332993105Subject:Computer application technology
Abstract/Summary:
To use input method in Space desktop system which is full screen, and draw Chinese fonts that provided by the input method to the place which exist in a three dimensional screen in real time, the method of generating font picture by SDL and the way of storing the pixels of the picture in SDL is studied. On this basis, how to dump these pixels into OpenGL and use OpenGL to generate a font texture is also studied. After texture mapping, the texture can be shown at the right position by controlling its coordinates. The efficiency of drawing pictures is optimized. Through a specific experiment of drawing font pictures in real time, the correctness and effectiveness of this drawing method is demonstrated.To draw Chinese efficiently, and make the drawing interface in accord with the Space desktop system, the method of using shx file to draw Chinese by AutoCAD is studied. The module of getting the graphics primitive of characters from shx file is realized by this method. Then package the vector information. And use the way of drawing lines in OpenGL to draw fonts. Through an experiment of realizing a simple PinYin input method, the efficiency and creativity of this method is demonstrated.In the process of developing the project, because of the desktop system has the character of cross platform, but each system has its encoding as a default, and the two drawing methods support the limitation of encoding, so convert the characters' encoding is needed. In order to make the initialize string and the string from input method does not have the phenomenon of unrecognizable code, not display and system crash, and draw characters correctly, the characters'encoding should in accord with the drawing method. So, the interfaces of converting encoding in the two drawing methods are added. And also the qt developing library is used to convert the initialize string and the string from input method, make it can cross platform.The key step of the project is to use input method in the Space three dimensional desktop. The process of communication between open source input method and Xwindow is studied. And the protocol of XIM is also studied. Through these studies, the principle of communication between application and input method is clear. On this basis, the communication between input method and the three dimensional desktop is realized. And the method of implement is to use qt's event mechanism. But it is invalid in Space system between different versions of qt. On the basis of communicating theory, the approach of xclient transshipment station is presented. Essentially, a xclient application is added between the three dimensional desktop and input method to transfer the string from input method.At last, the aim of the project is realized show that these methods are practicable.
Keywords/Search Tags:three dimensional desktop, drawing in real time, encoding, input method
Related items