| Computer font input problems arise after the computer inventioned,especially for non alphabetic language in the country,it was a very important issue.In the beginning,the computer performance is low and the application of the computer is not too wide.But the electronic device to the speed of Moore’s law development,promotes the rapid improvement of computer performance,calculation of the popularization of computer system,so that developers at the time,began to pay attention to this problem,and then the computer font from a simple graphical vectorization,to achieve full coverage of human fonts,and can display a variety of beautiful fonts in processing professional font software,showing all kinds of information.This paper is a small amount of research work on TTF fonts and TTF font engine FreeType,which was developed by the author when researching and developing Android applications.this paper focuses on the complete FreeType analysis using font information,generate TTF file format in the algorithm is not within the scope of this research.Type1 font format and TrueTypeFont(TTF)format is the current computer and other related equipment in general support format,it can be said that the industry standard,the two font format algorithms have been disclosed,Most of the specific font formats are also public.The purpose of this paper is to grasp the core ideas and design concepts,and ultimately used to solve APP development problems.Because of the universality and adoption of the TTF,The algorithm is relatively simple,and secondly,the TTF format is easy to understand,and the latest OpentType format is not yet fully available,Therefore,the TTF format is selected as the research point,and the open source Free Type is chosen as the engine to parse the glyph.Firstly,the thesis describes the font information,and then briefly introduces the mathematical principle of TTF format,systematically analyzes the format of TTF,and analyzes a glyph information.Secondly,it analyzes the source code and the main implementation methods of FreeType,and gives an example of its object-oriented thinking.Finally,implementation of rewriting FreeType extraction font information and custom TTF file,improved FreeType program that deal with custom TTF file and specify analytic font information,using NDK to develop JNI interface program,and finally developed on the Android platform,run the customized FreeType program to parse the specified character information,and realize the APP display different font information on the same screen. |