How to compile the libfreetype method

  • 2020-04-01 21:25:04
  • OfStack

Libfreetype is designed to be cross-platform.
To compile under Windows, open freetype-2.4.10\builds\win32\vc2008 freetype.sln directly.

Sometimes when you want to do simple things with a particular font, you can crop libfreetype.
There are two ways of tailoring:
1, you need to modify modules.cfg for GNU make
2. For other compilers, such as vs2008, ftmodule.h needs to be modified
If we only want to work with the truetype font file, we can keep only the modules sfnt_module_class and tt_driver_class.
For more information, see freetype-2.4.10\docs\CUSTOMIZE and freetype-2.4.10\docs\ install.any
After tailoring, the final size of the executable can be reduced from 350KB to 100KB, which is obvious.

Related articles: