当前位置:网站首页>20. Migrate freetype font library
20. Migrate freetype font library
2022-07-05 23:34:00 【anieoo】
FreeType Support Gzip Compressed files , Will use zlib library . meanwhile FreeType Can be loaded PNG Color bit of format
Figure font , Need to rely on libpng library , So in transplantation Freetype Font library needs to be transplanted before zlib Kuhe libpng library .
One 、 transplant zlib library
Download the source code
Enter the official website of source code https://www.zlib.net/fossils/, Download the source code

Download the source code through the command tar -vxzf xxx unpack , Create a directory zlib As the installation directory of the source code , As shown in the figure below :

To configure zlib Source code , First execute the script environment-setup-cortexa7hf-neon-poky-linux-gnueabi File to initialize environment variables .
source /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabiThe environment variables are configured as follows :

Specify installation path :./configure --prefix=/home/zyc/tools/zlib/

Use make Command compilation zlib Source code , Use after compilation make install Installation :

Porting source code to IMX6ULL Development board :
because scp The command will cause the symbolic link of the file to be unlinked , So compress the source code and then decompress it , As shown in the figure below :

Then copy the library file to the directory /usr/lib Next

Two 、 transplant libpng library
Download the source code
Go to the website to download https://github.com/glennrp/libpng/releases,:

decompression libpng Source code , And create a png Folder is used to install libpng library :

libpng Depend on zlib library , We've already zlib Library compilation succeeded , But we have to tell the compiler zlib Library installation directory , So that the compiler can find zlib Library files and header files , compile libpng No error will be reported when , Executing the following three commands will zlib Library installation directory include and lib Export path to environment variable :
export LDFLAGS="${LDFLAGS} -L/home/zyc/tools/zlib/lib"
export CFLAGS="${CFLAGS} -I/home/zyc/tools/zlib/include"
export CPPFLAGS="${CPPFLAGS} -I/home/zyc/tools/zlib/include"Then execute the following command to configure the source code :
./configure --prefix=/home/zyc/tools/png --host=arm-poky-linux-gnueabiFinally, compile make And installation make install:

Porting source code to IMX6ULL Development board :
As before, it will bin Copy the files in the directory to usr/bin/ Under the table of contents ,lib Copy the files in the directory to /usr/lib Under the table of contents :

3、 ... and 、 transplant Freetype Font library
Download the source code

Unzip the source code and create a folder freetype Used to save installation files :

The configuration file
open include/freetype/config/ftoption.h file , Open the following two macro definitions :
#define FT_CONFIG_OPTION_SYSTEM_ZLIB
#define FT_CONFIG_OPTION_USE_PNGConfigure the source code as follows :
./configure --prefix=/home/zyc/tools/freetype/ --host=arm-poky-linux-gnueabi --with-
zlib=yes --with-bzip2=no --with-png=yes --with-harfbuzz=no ZLIB_CFLAGS="-
I/home/zyc/tools/zlib/include -L/home/zyc/tools/zlib/lib" ZLIB_LIBS=-lz LIBPNG_CFLAGS="-
I/home/zyc/tools/png/include -L/home/zyc/tools/png/lib" LIBPNG_LIBS=-lpng
--prefix Option assignment FreeType Library installation directory ; --host Option is set to prefix the cross compiler name
--with-zlib=yes Said the use of zlib;
--with-bzip2=no No use bzip2 library ;
--with-png=yes Said the use of libpng library ;
--with-harfbuzz=no No use harfbuzz library .
ZLIB_CFLAGS Option is used to specify zlib Header file path and library file path , Fill in according to the actual installation path ;
ZLIB_LIBS Option specifies the linked zlib Name of Library ;
LIBPNG_CFLAGS Option is used to specify libpng Header file path and library file path , Fill in according to the actual installation path ;
LIBPNG_LIBS Option is used to specify the linked libpng Name of Library .
Compile after configuration make And installation make install, As shown in the figure below :

Porting source code to IMX6ULL Development board :
take lib Copy the files in the directory to the development board /usr/lib Under the table of contents :

边栏推荐
- [classical control theory] summary of automatic control experiment
- 成为程序员的你,后悔了吗?
- Southeast Asia e-commerce guide, how do sellers layout the Southeast Asia market?
- Switching power supply buck circuit CCM and DCM working mode
- 带外和带内的区别
- 证明 poj 1014 模优化修剪,部分递归 有错误
- 20.移植Freetype字体库
- Rasa 3. X learning series -rasa x Community Edition (Free Edition) changes
- 3: Chapter 1: understanding JVM specification 2: JVM specification, introduction;
- Difference between out of band and in band
猜你喜欢

《牛客刷verilog》Part III Verilog企业真题

3:第一章:认识JVM规范2:JVM规范,简介;

Rasa 3. X learning series -rasa 3.2.1 new release

Practice of concurrent search

Hainan Nuanshen tea recruits warmhearted people: recruitment of the product experience recommender of Nuanshen multi bubble honey orchid single cluster

【经典控制理论】自控实验总结

Object detection based on impulse neural network

14种神笔记方法,只需选择1招,让你的学习和工作效率提高100倍!

Rasa 3. X learning series -rasa x Community Edition (Free Edition) changes

Go语言实现原理——锁实现原理
随机推荐
《牛客刷verilog》Part III Verilog企业真题
When to use useImperativeHandle, useLayoutEffect, and useDebugValue
LeetCode——Add Binary
asp.net弹出层实例
判斷二叉樹是否為完全二叉樹
(4) UART application design and simulation verification 2 - TX module design (stateless machine)
【LeetCode】5. Valid Palindrome·有效回文
Comparison between webgl and webgpu [3] - vertex buffer
Rasa 3.x 学习系列-Rasa X 社区版(免费版) 更改
无刷驱动设计——浅谈MOS驱动电路
How to insert data into MySQL database- How can I insert data into a MySQL database?
11gR2 Database Services for " Policy" and " Administrator" Managed databases (file I
AsyncSocket长连接棒包装问题解决
TVS管和ESD管的技術指標和選型指南-嘉立創推薦
MySQL replace primary key delete primary key add primary key
Huawei simulator ENSP - hcip - MPLS experiment
证明 poj 1014 模优化修剪,部分递归 有错误
Objective C message dispatch mechanism
Creative mode 1 - single case mode
数学公式截图识别神器Mathpix无限使用教程