In the previous article, we introduced the Hiero this very useful tool use, but LIBGDX Bitmapfont does not support many maps, commonly used Chinese characters 3,500, you can not use Hiero to do it, then how to do? In fact, Microsoft has already solved this problem, it gives us this TTF font, save Chinese characters, convenient for us to use.
First, the use of FreeType
1, open the unpacked 0.9.8 version of the package, find the inside of the Extensions folder
Open, then click into the Gdx-freetype folder
Find Gdx-freetype.jar files and Armeabi, armeabi-v7a two folders
2. After you find it, copy and paste the Gdx-freetype.jar file and the libgdx-freetype.so files under the two folders into the Libs folder of the core project, as shown in the figure:
Other jar packages and so files are required to be added by previous projects.
3, you may be curious about this libgdx.so is what file, why there can be run. TTF's file? Without him, he keeps the error?
A: Generally speaking, the. So file is the dynamic link library, which is compiled by C or C + + and is loaded by the Android operating system program when the executable file is loaded or run. It is responsible for resolving external references (such as libraries) as part of the load process. On different systems, the executable file contains a table called Import directory, each of which contains the name of a library. Depending on the name of the record in the table, the library required by the loader is loaded into memory, then the executable program is updated based on the address of the library that is determined after the library is loaded, and the function in the library is called, or the data in the library is referenced. This is the principle function of the. so file.