웹에서 텍스트이미지 사용을 위한 공개 폰트엔진 freetype설치
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 3,070 조회
- 0 추천
- 목록
본문
웹에서 텍스트이미지 사용을 위한 공개 폰트엔진 freetype설치
freetype은 일종의 폰트엔진으로서
작고, 효율적이고, 이미지 출력시 커스트마이징이 쉬운 폰트라이브러리이다.
freetype는 그래픽라이브러리에 사용될 수 있으며 폰트컨버전 툴에서도 사용될 수 있다.
뿐만아니라 텍스트이미지 생성도구도로 많이 사용하고있는 공개 트루타입 폰트엔진으로서 GPL라이센스를 따르고있다.
홈페이지 : http://www.freetype.org
또는 : http://freetype.sourceforge.net
그럼 freetype을 설치해보도록 하겠다.
먼저 다음과 같이 wget을 사용하여 아래와 같이 freetype소스를 받아온다.
[root@RockyLinux local]# wget https://download.savannah.gnu.org/releases/freetype/freetype-2.13.0.tar.gz --2023-06-28 10:17:46-- https://download.savannah.gnu.org/releases/freetype/freetype-2.13.0.tar.gz Resolving download.savannah.gnu.org (download.savannah.gnu.org)... 209.51.188.200, 2001:470:142:5::200 Connecting to download.savannah.gnu.org (download.savannah.gnu.org)|209.51.188.200|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://mirror.ossplanet.net/nongnu/freetype/freetype-2.13.0.tar.gz [following] --2023-06-28 10:17:47-- https://mirror.ossplanet.net/nongnu/freetype/freetype-2.13.0.tar.gz Resolving mirror.ossplanet.net (mirror.ossplanet.net)... 163.22.17.70, 2001:e10:6840:17::70 Connecting to mirror.ossplanet.net (mirror.ossplanet.net)|163.22.17.70|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3819054 (3.6M) [application/gzip] Saving to: `freetype-2.13.0.tar.gz'
freetype-2.13.0.tar.gz 100%[=================================================>] 3.64M 1.82MB/s in 2.0s
2023-06-28 10:17:50 (1.82 MB/s) - `freetype-2.13.0.tar.gz' saved [3819054/3819054]
[root@RockyLinux local]# |
이제 tar를 이용하여 압축해제한다.
압축해제 되면서 “freetype-버전”이름으로 디렉토리가 생성되며 이 디렉토리내에 압축해제된 모든 파일들이 생성된다.
[root@RockyLinux local]# tar xvfz freetype-2.13.0.tar.gz freetype-2.13.0/ freetype-2.13.0/devel/ freetype-2.13.0/devel/ft2build.h freetype-2.13.0/devel/ftoption.h freetype-2.13.0/docs/ freetype-2.13.0/docs/oldlogs/ freetype-2.13.0/docs/oldlogs/ChangeLog.20 freetype-2.13.0/docs/oldlogs/ChangeLog.21 freetype-2.13.0/docs/oldlogs/ChangeLog.210 freetype-2.13.0/docs/oldlogs/ChangeLog.22 freetype-2.13.0/docs/oldlogs/ChangeLog.23 freetype-2.13.0/docs/oldlogs/ChangeLog.24 freetype-2.13.0/docs/oldlogs/ChangeLog.25 freetype-2.13.0/docs/oldlogs/ChangeLog.26 freetype-2.13.0/docs/oldlogs/ChangeLog.27 freetype-2.13.0/docs/oldlogs/ChangeLog.28 freetype-2.13.0/docs/oldlogs/ChangeLog.29 이하생략.. |
그리고 이 디렉토리로 이동한다.
[root@RockyLinux local]# cd freetype-2.13.0/ [root@RockyLinux freetype-2.13.0]# |
이동한 후에 다음과 같이 configure를 실행한다.
[root@RockyLinux freetype-2.13.0]# ./configure
FreeType build system -- automatic system detection
The following settings are used:
platform unix compiler cc configuration directory ./builds/unix configuration rules ./builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file `config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `make' again to build the library, or `make refdoc' to build the API reference (this needs Python >= 3.5).
Generating modules list in ./objs/ftmodule.h... done. * module: truetype (Windows/Mac font files with extension *.ttf or *.ttc) * module: type1 (Postscript font files with extension *.pfa or *.pfb) 이하생략.. |
그리고 다음은 make를 실행하여 컴파일한다.
[root@RockyLinux freetype-2.13.0]# make ./builds/unix/libtool --mode=compile gcc -pedantic -std=c99 -I/usr/local/freetype-2.13.0/objs -I./builds/unix -I/usr/local/freetype-2.13.0/include -c -Wall -g -O2 -fvisibility=hidden -pthread -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT_CONFIG_MODULES_H="<ftmodule.h>" -DFT_CONFIG_OPTIONS_H="<ftoption.h>" -DFT2_BUILD_LIBRARY -o /usr/local/freetype-2.13.0/objs/ftsystem.lo builds/unix/ftsystem.c libtool: compile: gcc -pedantic -std=c99 -I/usr/local/freetype-2.13.0/objs -I./builds/unix -I/usr/local/freetype-2.13.0/include -c -Wall -g -O2 -fvisibility=hidden -pthread "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" "-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>" -DFT2_BUILD_LIBRARY builds/unix/ftsystem.c -fPIC -DPIC -o /usr/local/freetype-2.13.0/objs/.libs/ftsystem.o libtool: compile: gcc -pedantic -std=c99 -I/usr/local/freetype-2.13.0/objs -I./builds/unix -I/usr/local/freetype-2.13.0/include -c -Wall -g -O2 -fvisibility=hidden -pthread "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" "-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>" -DFT2_BUILD_LIBRARY builds/unix/ftsystem.c -o /usr/local/freetype-2.13.0/objs/ftsystem.o >/dev/null 2>&1 이하생략.. |
이제 make install을 실행하여 컴파일된 파일들을 설치한다.
[root@RockyLinux freetype-2.13.0]# make install rm -rf /usr/local/include/freetype2 rm -f /usr/local/include/ft2build.h /usr/bin/mkdir -p /usr/local/lib \ /usr/local/lib/pkgconfig \ /usr/local/include/freetype2/freetype/config \ /usr/local/share/aclocal ./builds/unix/libtool --mode=install /usr/bin/install -c \ /usr/local/freetype-2.13.0/objs/libfreetype.la /usr/local/lib libtool: install: /usr/bin/install -c /usr/local/freetype-2.13.0/objs/.libs/libfreetype.so.6.19.0 /usr/local/lib/libfreetype.so.6.19.0 libtool: install: (cd /usr/local/lib && { ln -s -f libfreetype.so.6.19.0 libfreetype.so.6 || { rm -f libfreetype.so.6 && ln -s libfreetype.so.6.19.0 libfreetype.so.6; }; }) libtool: install: (cd /usr/local/lib && { ln -s -f libfreetype.so.6.19.0 libfreetype.so || { rm -f libfreetype.so && ln -s libfreetype.so.6.19.0 libfreetype.so; }; }) libtool: install: /usr/bin/install -c /usr/local/freetype-2.13.0/objs/.libs/libfreetype.lai /usr/local/lib/libfreetype.la libtool: install: /usr/bin/install -c /usr/local/freetype-2.13.0/objs/.libs/libfreetype.a /usr/local/lib/libfreetype.a libtool: install: chmod 644 /usr/local/lib/libfreetype.a libtool: install: ranlib /usr/local/lib/libfreetype.a libtool: finish: PATH="/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin/:/sbin" ldconfig -n /usr/local/lib ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- for P in /usr/local/freetype-2.13.0/include/freetype/freetype.h /usr/local/freetype-2.13.0/include/freetype/ftadvanc.h /usr/local/freetype-2.13.0/include/freetype/ftbbox.h /usr/local/freetype-2.13.0/include/freetype/ftbdf.h /usr/local/freetype-2.13.0/include/freetype/ftbitmap.h /usr/local/freetype-2.13.0/include/freetype/ftbzip2.h /usr/local/freetype-2.13.0/include/freetype/ftcache.h /usr/local/freetype-2.13.0/include/freetype/ftchapters.h /usr/local/freetype-2.13.0/include/freetype/ftcid.h /usr/local/freetype-2.13.0/include/freetype/ftcolor.h /usr/local/freetype-2.13.0/include/freetype/ftdriver.h /usr/local/freetype-2.13.0/include/freetype/fterrdef.h /usr/local/freetype-2.13.0/include/freetype/fterrors.h /usr/local/freetype-2.13.0/include/freetype/ftfntfmt.h /usr/local/freetype-2.13.0/include/freetype/ftgasp.h /usr/local/freetype-2.13.0/include/freetype/ftglyph.h /usr/local/freetype-2.13.0/include/freetype/ftgxval.h /usr/local/freetype-2.13.0/include/freetype/ftgzip.h /usr/local/freetype-2.13.0/include/freetype/ftimage.h /usr/local/freetype-2.13.0/include/freetype/ftincrem.h /usr/local/freetype-2.13.0/include/freetype/ftlcdfil.h /usr/local/freetype-2.13.0/include/freetype/ftlist.h /usr/local/freetype-2.13.0/include/freetype/ftlogging.h /usr/local/freetype-2.13.0/include/freetype/ftlzw.h /usr/local/freetype-2.13.0/include/freetype/ftmac.h /usr/local/freetype-2.13.0/include/freetype/ftmm.h /usr/local/freetype-2.13.0/include/freetype/ftmodapi.h /usr/local/freetype-2.13.0/include/freetype/ftmoderr.h /usr/local/freetype-2.13.0/include/freetype/ftotval.h /usr/local/freetype-2.13.0/include/freetype/ftoutln.h /usr/local/freetype-2.13.0/include/freetype/ftparams.h /usr/local/freetype-2.13.0/include/freetype/ftpfr.h /usr/local/freetype-2.13.0/include/freetype/ftrender.h /usr/local/freetype-2.13.0/include/freetype/ftsizes.h /usr/local/freetype-2.13.0/include/freetype/ftsnames.h /usr/local/freetype-2.13.0/include/freetype/ftstroke.h /usr/local/freetype-2.13.0/include/freetype/ftsynth.h /usr/local/freetype-2.13.0/include/freetype/ftsystem.h /usr/local/freetype-2.13.0/include/freetype/fttrigon.h /usr/local/freetype-2.13.0/include/freetype/fttypes.h /usr/local/freetype-2.13.0/include/freetype/ftwinfnt.h /usr/local/freetype-2.13.0/include/freetype/otsvg.h /usr/local/freetype-2.13.0/include/freetype/t1tables.h /usr/local/freetype-2.13.0/include/freetype/ttnameid.h /usr/local/freetype-2.13.0/include/freetype/tttables.h /usr/local/freetype-2.13.0/include/freetype/tttags.h ; do \ /usr/bin/install -c -m 644 \ $P /usr/local/include/freetype2/freetype ; \ done for P in /usr/local/freetype-2.13.0/include/freetype/config/ftconfig.h /usr/local/freetype-2.13.0/include/freetype/config/ftheader.h /usr/local/freetype-2.13.0/include/freetype/config/ftmodule.h /usr/local/freetype-2.13.0/include/freetype/config/ftoption.h /usr/local/freetype-2.13.0/include/freetype/config/ftstdlib.h /usr/local/freetype-2.13.0/include/freetype/config/integer-types.h /usr/local/freetype-2.13.0/include/freetype/config/mac-support.h /usr/local/freetype-2.13.0/include/freetype/config/public-macros.h /usr/local/freetype-2.13.0/objs/ftmodule.h ./builds/unix/ftoption.h ; do \ /usr/bin/install -c -m 644 \ $P /usr/local/include/freetype2/freetype/config ; \ done /usr/bin/install -c -m 644 /usr/local/freetype-2.13.0/include/ft2build.h \ /usr/local/include/freetype2/ft2build.h /usr/bin/install -c -m 644 ./builds/unix/ftconfig.h \ /usr/local/include/freetype2/freetype/config/ftconfig.h /usr/bin/install -c -m 644 /usr/local/freetype-2.13.0/objs/ftmodule.h \ /usr/local/include/freetype2/freetype/config/ftmodule.h /usr/bin/install -c -m 644 ./builds/unix/ftoption.h \ /usr/local/include/freetype2/freetype/config/ftoption.h /usr/bin/install -c -m 644 ./builds/unix/freetype2.m4 \ /usr/local/share/aclocal/freetype2.m4 /usr/bin/install -c -m 644 ./builds/unix/freetype2.pc \ /usr/local/lib/pkgconfig/freetype2.pc [root@RockyLinux freetype-2.13.0]# |
이상으로 freetype의 설치과정을 모두 살펴보았다.
관련자료
-
이전
-
다음