linux添加Qt的fontconfig,QT__qt SDK------Fontconfig-2.4.2安装 (二)

本文档详细介绍了如何在Linux系统中安装Fontconfig-2.4.2和FreeType-2.5.0.1。Fontconfig是一个用于配置和定制字体访问的库,而FreeType则是一个用于正确渲染TrueType字体的库。安装过程包括下载源码、配置选项、编译和安装步骤,并提供了依赖项和文档安装的相关信息。
摘要由CSDN通过智能技术生成

Fontconfig-2.4.2

Introduction to Fontconfig

The Fontconfig package is a library for configuring and customizing font access.

Package Information

Download (HTTP): https://fontconfig.org/release/fontconfig-2.4.2.tar.gz

Download (FTP): ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/fontconfig-2.4.2.tar.gz

Download MD5 sum: f035852f521b54677f2b5c9e2f6d54a4

Download size: 1.2 MB

Estimated disk space required: 11.3 MB

Estimated build time: 0.2 SBU

Fontconfig Dependencies

Required

FreeType-2.3.7 and either expat-2.0.1 or libxml2-2.6.31 (requires pkg-config-0.22)

Optional

DocBook-utils-0.6.14

5bf6cb3ab4384130db5a8e2e751cf3ab.png

Note

If you have DocBook-utils installed and you remove the --disable-docs parameter from the configure command below, you must have SGMLSpm-1.03ii and JadeTeX-3.13 installed also, or the Fontconfig build will fail.

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Fontconfig

Installation of Fontconfig

Install Fontconfig by running the following commands:

./configure --prefix=/usr \ --sysconfdir=/etc --localstatedir=/var \ --disable-docs --without-add-fonts \ --with-docdir=/usr/share/doc/fontconfig-2.4.2 && make

To test the results, issue: make check.

Now, as the root user:

make install && install -v -m644 doc/*.3 /usr/share/man/man3 && install -v -m644 doc/*.5 /usr/share/man/man5 && install -v -m755 \ -d /usr/share/doc/fontconfig-2.4.2/fontconfig-devel && install -v -m644 doc/*.{html,pdf,txt} \ /usr/share/doc/fontconfig-2.4.2 && install -v -m644 doc/fontconfig-devel/* \ /usr/share/doc/fontconfig-2.4.2/fontconfig-devel

Command Explanations

--localstatedir=/var: This switch places the system font cache files in /var/cache/fontconfig.

--disable-docs: This switch avoids building the documentation (the release tarball includes pre-generated documentation).

--without-add-fonts: This switch disables the automatic search for X Window System fonts which, if found, may confuse some applications.

--with-docdir=/usr/share/doc/fontconfig-2.4.2: Though this parameter seems counter-intuitive following the preceding parameter to the configure command, it is used so that if the builder removes the --disable-docs parameter, the documentation will be installed in a versioned directory name instead of the default /usr/share/doc/fontconfig.

Configuring Fontconfig

Config Files

/etc/fonts/*, /etc/fonts/conf.avail/*, and /etc/fonts/conf.d/*

Configuration Information

The main configuration file for Fontconfig is /etc/fonts/fonts.conf. Generally you do not want to edit this file. It will also read /etc/fonts/local.conf and any files in /etc/fonts/conf.d. To put a new font directory in the configuration, create (or update) the /etc/fonts/local.conf file with your local information or add a new file in /etc/fonts/conf.d. The default location of fonts in Fontconfig is:

/usr/share/fonts

~/.fonts

Fontconfig also ships many example configuration files in the /etc/fonts/conf.avail directory. Symlinking to specific files from /etc/fonts/conf.d will enable them. The default setup is generally good enough for most users. See /etc/fonts/conf.avail/README for a description of the configuration files.

More information about configuring Fontconfig can be found in the user's manual in file:///usr/share/doc/fontconfig-2.4.2/fontconfig-user.html.

Contents

Installed Programs: fc-cache, fc-cat, fc-list, and fc-match

Installed Library: libfontconfig.{so,a}

Installed Directories: /etc/fonts, /usr/include/fontconfig, /usr/share/doc/fontconfig-2.4.2 and /var/cache/fontconfig

Short Descriptions

fc-cache

is used to create font information caches.

fc-cat

is used to read font information caches.

fc-list

is used to create font lists.

fc-match

is used to match available fonts, or find fonts that match a given pattern.

libfontconfig.{so,a}

contains functions used by the Fontconfig programs and also by other programs to configure or customize font access.

FreeType-2.5.0.1

Introduction to FreeType2

The FreeType2 package contains a library which allows applications to properly render TrueType fonts.

This package is known to build and work properly using an LFS-7.4 platform.

Package Information

Download (HTTP): https://downloads.sourceforge.net/freetype/freetype-2.5.0.1.tar.bz2

Download MD5 sum: c72e9010b1d986d556fc0b2b5fcbf31a

Download size: 1.5 MB

Estimated disk space required: 35 MB (includes installing additional documentation)

Estimated build time: 0.2 SBU

Additional Downloads

Additional Documentation

Download (HTTP): https://downloads.sourceforge.net/freetype/freetype-doc-2.5.0.tar.bz2

Download MD5 sum: 40f3d5cc0b16396b3fb6b98eeaa053b2

Download size: 112 KB

FreeType2 Dependencies

Recommended

Which-2.20 and libpng-1.6.6

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/freetype2

Installation of FreeType2

If you downloaded the additional documentation, unpack it into the source tree using the following command:

tar -xf ../freetype-doc-2.5.0.tar.bz2 --strip-components=2 -C docs

Install FreeType2 by running the following commands:

sed -i -e "/AUX.*.gxvalid/s@^# @@" \ -e "/AUX.*.otvalid/s@^# @@" \ modules.cfg && sed -ri -e 's:.*(#.*SUBPIXEL.*) .*:\1:' \ include/freetype/config/ftoption.h && ./configure --prefix=/usr --disable-static && make

This package does not come with a test suite.

Now, as the root user:

make install && install -v -m755 -d /usr/share/doc/freetype-2.5.0.1 && cp -v -R docs/* /usr/share/doc/freetype-2.5.0.1

Command Explanations

sed -e ...: First command enables GX/AAT and OpenType table validation and second command enables Subpixel Rendering and Subpixel Hinting in order to improve font rendering. Note that Subpixel Rendering may have patent issues. Be sure to read the 'Other patent issues' part of https://www.freetype.org/patents.html before enabling this option.

--disable-static: This switch prevents installation of static versions of the libraries.

Contents

Installed Program: freetype-config

Installed Library: libfreetype.so

Installed Directories: /usr/include/freetype2 and /usr/share/doc/freetype-2.5.0.1

Short Descriptions

freetype-config

is used to get FreeType compilation and linking information.

libfreetype.so

contains functions for rendering various font types, such as TrueType and Type1.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值