https://wiki.archlinux.org/api.php?action=feedcontributions&user=Echizenryoma&feedformat=atomArchWiki - User contributions [en]2024-03-28T21:41:43ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Pacman_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/Rosetta_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=477795Pacman (简体中文)/Rosetta (简体中文)2017-05-20T06:08:38Z<p>Echizenryoma: /* 查询某个包的信息 */</p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Package management (简体中文)]]<br />
[[en:Pacman/Rosetta]]<br />
[[es:Pacman/Rosetta]]<br />
[[ja:Pacman 比較表]]<br />
[[sr:Pacman/Rosetta]]<br />
{{translateme (简体中文)}}<br />
{{TranslationStatus (简体中文)|Pacman/Rosetta|2017-03-06|464653}}<br />
<br />
这个页面用表格展示一些流行的 Linux 发行版[[Wikipedia:Package manager|包管理器]]命令的对应关系。这是受到 [http://old-en.opensuse.org/Software_Management_Command_Line_Comparison openSUSE's Software Management Command Line Comparison] 的启发而成的。<br />
<br />
{{Tip|Arch 用户在临时处理其他发行版时可以用 [https://github.com/icy/pacapt pacapt],它是对其它包管理器的简单包装。}}<br />
<br />
{{Note|<br />
* 这里描述的一些工具只针对特定版本的 pacman。其中的 -Qk 选项是在 pacman 4.1 中新实现的。<br />
* 您可以在 {{Pkg|pkgfile}} 中找到 {{ic|pkgfile}} 命令。<br />
}}<br />
<br />
== 基本操作 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">动作</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 按名安装包 ||pacman -S||dnf install ||apt install||zypper install<br>zypper in|| emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| 按名移除包 ||pacman -Rs||dnf remove ||apt remove||zypper remove<br>zypper rm ||emerge -C<br />
|-<br />
| 通过软件名、描述、简短描述来搜索包。默认搜索域依工具不同而异。Mostly options bring tools on par. ||pacman -Ss||dnf search ||apt search||zypper search<br>zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| 升级包(安装已有包的更新版本) ||pacman -Syu||dnf upgrade ||apt update; apt upgrade||zypper update zypper up||emerge -u world<br />
|-<br />
| 升级包(更新命令的另一种形式,可以进行更复杂形式的更新,例如发行版升级。当通常的更新命令会忽略软件更新时——例如依赖改变——本命令可以进行这些更新) ||pacman -Syu||dnf distro-sync ||apt full-upgrade||zypper dup||emerge -uDN world<br />
|- style="background:#e4e4e4"<br />
| 清除本地缓存(可能允许通过选项控制要清除拿些东西;autoclean 只清除过时的信息) ||pacman -Sc<br/>pacman -Scc ||dnf clean all ||apt-get clean / apt-get autoclean / aptitude clean|| zypper clean || eclean distfiles<br />
|-<br />
| 移除不再需要的依赖(例如当依赖某包的软件被移除) ||<nowiki>pacman -Qdtq | pacman -Rs -</nowiki>||dnf autoremove||apt-get autoremove ||zypper rm -u||emerge --depclean <br />
|- style="background:#e4e4e4"<br />
| 移除不再处于任何仓库中的包 ||<nowiki>pacman -Qm | pacman -Rs -</nowiki>||package-cleanup --orphans||aptitude purge '~o'||||<br />
|-<br />
| 将作为依赖安装的包指定为手动安装 ||pacman -D --asexplicit||dnf mark install||apt-mark manual||||emerge --select <br />
|- style="background:#e4e4e4"<br />
| 将包作为依赖安装 ||pacman -S --asdeps||dnf install => dnf mark remove||aptitude install '$package&M'||||emerge -1<br />
|-<br />
| 仅下载而不解包或安装 ||pacman -Sw||dnf download||apt-get install --download-only (into the package cache)<br>apt-get download (bypass the package cache)|| zypper --download-only ||emerge --fetchonly <br />
|- style="background:#e4e4e4"<br />
| 启动一个 shell 以便在一个会话中输入多个命令 ||||||apt-config shell||zypper shell ||<br />
|-<br />
| 查看日志 ||cat /var/log/pacman.log ||dnf history||cat /var/log/dpkg.log||cat /var/log/zypp/history || located in /var/log/portage<br />
|- style="background:#e4e4e4"<br />
| 获取当前系统所有软件包的状态 ||(see /var/lib/pacman/local)||(see /var/lib/rpm/Packages)||apt-cache stats||n/a ||emerge --info<br />
|-<br />
| 包变更时发送邮件 ||||||apt-get install apt-listchanges||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询某个包的信息 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 显示包的全部或者部分信息。各种包管理工具默认显示的详细程度各不相同,但是可以通过设置选项使其一致。||pacman -[S<nowiki>|</nowiki>Q]i ||dnf list, dnf info ||apt show / apt-cache policy||zypper info zypper if||emerge -S; emerge -pv; eix<br />
|- style="background:#e4e4e4"<br />
| 显示本地包信息,包括包名、版本、描述等。||pacman -Qi ||rpm -qi ||dpkg -s / aptitude show||zypper info; rpm -qi ||emerge -pv and emerge -S<br />
|-<br />
| 显示远程包信息,包括包名、版本、描述等。||pacman -Si ||dnf info ||apt-cache show / aptitude show||zypper info ||emerge -pv and emerge -S<br />
|- style="background:#e4e4e4"<br />
| 显示本地包提供的文件。||pacman -Ql ||rpm -ql||dpkg -L||rpm -Ql ||equery files<br />
|-<br />
| 显示远程包提供的文件。||pkgfile -l||dnf repoquery -l||apt-file list $pattern||||pfl<br />
|- style="background:#e4e4e4"<br />
| 查询提供某个文件的包。||pacman -Qo ||rpm -qf (installed only) or dnf provides (everything) ||dpkg -S / dlocate||zypper search -f ||equery belongs<br />
|-<br />
| 列出包中的文件。其他更复杂的命令亦可以提供该功能。||pacman -Ql <br/>pkgfile -l ||dnf repoquery -l ||dpkg-query -L || rpm -ql ||equery files<br />
|- style="background:#e4e4e4"<br />
| 查出文件是由哪一个包提供的,主要是为了检索特定文件。其他工具亦可通过搜索命令提供该功能。||pkgfile||dnf provides ||apt-file search||zypper what-provides zypper wp|| equery belongs (only installed packages); pfl<br />
|-<br />
| 在所有包中查找包含指定文件的包。auto-apt 提供该功能。||pkgfile -s||dnf provides ||apt-file search||zypper search -f ||equery belongs<br />
|- style="background:#e4e4e4"<br />
| 显示包的更新日志。||pacman -Qc||rpm -q --changelog||apt-get changelog||rpm -q --changelog||equery changes -f<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包列表 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par. ||pacman -Ss ||dnf search ||apt search||zypper search zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options. ||pacman -Qu ||dnf list updates, dnf check-update ||apt-get upgrade -> n||zypper list-updates zypper patch-check (just for patches) ||emerge -uDNp world<br />
|-<br />
| Display a list of all packages in all installation sources that are handled by the packages management. Some tools provide options or additional commands to limit the output to a specific installation source. ||pacman -Sl ||dnf list available||apt-cache dumpavail apt-cache dump (Cache only) apt-cache pkgnames||zypper packages ||emerge -ep world<br />
|- style="background:#e4e4e4"<br />
| Generates a list of installed packages || pacman -Q || dnf list installed || |dpkg --list | grep ^i || zypper search --installed-only ||emerge -ep world<br />
|-<br />
| List packages that are installed but are not available in any installation source (anymore). ||pacman -Qm||dnf list extras || deborphan || |zypper se -si | grep 'System Packages'||eix-test-obsolete<br />
|- style="background:#e4e4e4"<br />
| List packages that were recently added to one of the installation sources, i.e. which are new to it. ||(none)||dnf list recent ||aptitude search '~N' / aptitude forget-new||n/a||eix-diff<br />
|-<br />
| List installed local packages along with version||pacman -Q||rpm -qa||dpkg -l||zypper search -s; rpm -qa ||emerge -e world<br />
|- style="background:#e4e4e4"<br />
| Search locally installed package for names or descriptions ||pacman -Qs||rpm -qa '*<str>*' ||aptitude search <nowiki>'~i(~n $name|~d $description)'</nowiki>|||||eix -S -I<br />
|-<br />
| List packages not required by any other package||pacman -Qt||package-cleanup --all --leaves||deborphan -anp1||||<br />
|- style="background:#e4e4e4"<br />
| List packages installed explicitly (not as dependencies)||pacman -Qe||||apt-mark showmanual||||<br />
|-<br />
| List packages installed automatically (as dependencies)||pacman -Qd||||apt-mark showauto||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包的依赖关系 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Display packages which require X to be installed, aka show reverse dependencies.||pacman -Sii||dnf repoquery --alldeps --whatrequires ||apt-cache rdepends / aptitude search ~D$pattern||zypper search --requires || equery depends<br />
|- style="background:#e4e4e4"<br />
| Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.||||dnf repoquery --conflicts||aptitude search '~C$pattern'|| ||<br />
|-<br />
| List all packages which are required for the given package, aka show dependencies. ||pacman -[S<nowiki>|</nowiki>Q]i||dnf repoquery --requires||apt-cache depends / apt-cache show||zypper info --requires || emerge -ep<br />
|- style="background:#e4e4e4"<br />
| List what the current package provides ||||dnf provides ||dpkg -s / aptitude show||zypper info --provides ||equery files<br />
|-<br />
| List all packages that require a particular package ||||dnf repoquery --alldeps --whatrequires||aptitude search ~D{depends,recommends,suggests}:$pattern / aptitude why||zypper search --requires ||equery depends -a<br />
|- style="background:#e4e4e4"<br />
| Display all packages that the specified packages obsoletes. ||||dnf list obsoletes ||apt-cache show|||| <br />
|-<br />
| Generates an output suitable for processing with dotty for the given package(s). ||||||apt-cache dotty ||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 管理软件源 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Installation sources management ||${EDITOR} /etc/pacman.conf||${EDITOR} /etc/yum.repos.d/${REPO}.repo||${EDITOR} /etc/apt/sources.list||${EDITOR} /etc/zypp/repos.d/${REPO}.repo ||layman<br />
|- style="background:#e4e4e4"<br />
| Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command. Again others, like apt and dnf force editing a sources list. apt-cdrom is a special command, which offers special options design for CDs/DVDs as source. ||/etc/pacman.conf||/etc/yum.repos.d/*.repo||apt-cdrom add||zypper service-add ||layman, overlays<br />
|-<br />
| Refresh the information about the specified installation source(s) or all installation sources. ||pacman -Sy ([[System_maintenance#Partial upgrades are unsupported|always upgrade the whole system afterwards]]) ||dnf clean expire-cache && dnf check-update ||apt-get update||zypper refresh zypper ref||emerge --sync;layman -S<br />
|- style="background:#e4e4e4"<br />
| Prints a list of all installation sources including important information like URI, alias etc. ||cat /etc/pacman.d/mirrorlist||cat /etc/yum.repos.d/*||apt-cache policy||zypper service-list ||layman -l<br />
|-<br />
| Disable an installation source for an operation ||||dnf --disablerepo=||||||emerge package::repo-to-use<br />
|- style="background:#e4e4e4"<br />
| Download packages from a different version of the distribution than the one installed. ||||dnf --releasever= ||apt-get install -t release package/ apt-get install package/release (deps not covered)||||echo "category/package ~amd64" >> /etc/portage/package.keywords && emerge package<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== Overrides ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 增加包锁定规则来保持其当前状态不被改变 ||/etc/pacman.conf<br/>modify IgnorePkg array||dnf.conf <--”exclude” option (add/amend)||apt-mark hold pkg||Put package name in /etc/zypp/locks, or zypper al||/etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| 删除包锁定规则 ||remove package from IgnorePkg line in /etc/pacman.conf|| ||apt-mark unhold pkg||Remove package name from /etc/zypp/locks or zypper rl||/etc/portage/package.mask (or package.unmask) <br />
|-<br />
| 列出所有锁定规则 ||cat /etc/pacman.conf|| ||/etc/apt/preferences ||View /etc/zypp/locks or zypper ll||cat /etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source. ||${EDITOR} /etc/pacman.conf<br/>Modify HoldPkg and/or IgnorePkg arrays||||/etc/apt/preferences, apt-cache policy|| zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>Add a line with =category/package-version<br />
|-<br />
| Remove a previously set priority ||||||/etc/apt/preferences ||zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>remove offending line<br />
|- style="background:#e4e4e4"<br />
| Show a list of set priorities. ||||||apt-cache policy /etc/apt/preferences ||zypper lr -p || cat /etc/portage/package.keywords<br />
|-<br />
| Ignores problems that priorities may trigger. ||||||||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 校验和修复 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Verify single package||pacman -Qk[k]||rpm -V||debsums||rpm -V||equery check<br />
|- style="background:#e4e4e4"<br />
| Verify all packages||pacman -Qk[k]||rpm -Va||debsums||rpm -Va||equery check<br />
|-<br />
| Reinstall given Package - Will reinstall the given package without dependency hassle. ||pacman -S||dnf reinstall||apt install --reinstall||zypper install --force||emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| Verify dependencies of the complete system. Used if installation process was forcefully killed. ||pacman -Dk||dnf repoquery --requires ||apt-get check||zypper verify || emerge -uDN world<br />
|-<br />
| Use some magic to fix broken dependencies in a system || pacman dep level - pacman -Dk, shared lib level - findbrokenpkgs or lddd||dnf repoquery --unsatisfied||apt-get --fix-broken<br>aptitude install||zypper verify ||revdep-rebuild<br />
|- style="background:#e4e4e4"<br />
| 为包系统增加一个检查点以便未来回滚 ||||(unnecessary, done on every transaction)||||n/a||<br />
|-<br />
| 删除系统中的一个检查点 ||N/A||N/A||||n/a||<br />
|- style="background:#e4e4e4"<br />
| 提供所有系统检查点的列表 ||N/A||dnf history list||||n/a ||<br />
|-<br />
| 将所有包滚回特定日期或检查点 ||N/A||dnf history rollback||||n/a ||<br />
|- style="background:#e4e4e4"<br />
| 撤销特定改动 ||N/A||dnf history undo||||n/a||||<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 使用软件包文件和构建软件包 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Query a package supplied on the command line rather than an entry in the package management database||pacman -Qp||rpm -qp||dpkg -I||||<br />
|- style="background:#e4e4e4"<br />
| List the contents of a package file||pacman -Qpl||rpmls rpm -qpl||dpkg -c||rpm -qpl||<br />
|-<br />
| Installs local package file, e.g. app.rpm and uses the installation sources to resolve dependencies ||pacman -U||dnf install ||apt install||zypper in||emerge<br />
|- style="background:#e4e4e4"<br />
| Updates package(s) with local packages and uses the installation sources to resolve dependencies ||pacman -U||dnf upgrade ||debi||||emerge||<br />
|-<br />
| Add a local package to the local package cache mostly for debugging purposes. ||cp $filename /var/cache/pacman/pkg/||||apt-cache add ||n/a|| cp $filename /usr/portage/distfiles<br />
|- style="background:#e4e4e4"<br />
| 解包 ||tar -Jxvf||<nowiki>rpm2cpio | cpio -vid</nowiki>||dpkg-deb -x||<nowiki>rpm2cpio | cpio -vid</nowiki>||tar -jxvf<br />
|-<br />
| 安装/移除包以适合构建依赖(使用源码包中的信息) ||automatic||dnf builddep||apt-get build-dep ||zypper si -d||emerge -o <br />
|- style="background:#e4e4e4"<br />
| Display the source package to the given package name(s) ||||dnf repoquery -s||apt-cache showsrc ||n/a||<br />
|-<br />
| Downloads the corresponding source package(s) to the given package name(s) || Use [[ABS]] && makepkg -o ||dnf download --source||apt-get source / debcheckout||zypper source-install||emerge --fetchonly<br />
|- style="background:#e4e4e4"<br />
| Build a package||makepkg -s||rpmbuild -ba (normal)<br>mock (in chroot)||debuild||rpmbuild -ba; build; osc build ||ebuild; quickpkg<br />
|-<br />
| Check for possible packaging issues||namcap||rpmlint ||lintian||rpmlint ||repoman<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 参阅 ==<br />
<br />
* [http://dnf.readthedocs.org/en/latest/cli_vs_yum.html Changes in DNF CLI compared to Yum]</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Pacman_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/Rosetta_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=477742Pacman (简体中文)/Rosetta (简体中文)2017-05-19T08:16:35Z<p>Echizenryoma: /* 查询某个包的信息 */</p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Package management (简体中文)]]<br />
[[en:Pacman/Rosetta]]<br />
[[es:Pacman/Rosetta]]<br />
[[ja:Pacman 比較表]]<br />
[[sr:Pacman/Rosetta]]<br />
{{translateme (简体中文)}}<br />
{{TranslationStatus (简体中文)|Pacman/Rosetta|2017-03-06|464653}}<br />
<br />
这个页面用表格展示一些流行的 Linux 发行版[[Wikipedia:Package manager|包管理器]]命令的对应关系。这是受到 [http://old-en.opensuse.org/Software_Management_Command_Line_Comparison openSUSE's Software Management Command Line Comparison] 的启发而成的。<br />
<br />
{{Tip|Arch 用户在临时处理其他发行版时可以用 [https://github.com/icy/pacapt pacapt],它是对其它包管理器的简单包装。}}<br />
<br />
{{Note|<br />
* 这里描述的一些工具只针对特定版本的 pacman。其中的 -Qk 选项是在 pacman 4.1 中新实现的。<br />
* 您可以在 {{Pkg|pkgfile}} 中找到 {{ic|pkgfile}} 命令。<br />
}}<br />
<br />
== 基本操作 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">动作</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 按名安装包 ||pacman -S||dnf install ||apt install||zypper install<br>zypper in|| emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| 按名移除包 ||pacman -Rs||dnf remove ||apt remove||zypper remove<br>zypper rm ||emerge -C<br />
|-<br />
| 通过软件名、描述、简短描述来搜索包。默认搜索域依工具不同而异。Mostly options bring tools on par. ||pacman -Ss||dnf search ||apt search||zypper search<br>zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| 升级包(安装已有包的更新版本) ||pacman -Syu||dnf upgrade ||apt update; apt upgrade||zypper update zypper up||emerge -u world<br />
|-<br />
| 升级包(更新命令的另一种形式,可以进行更复杂形式的更新,例如发行版升级。当通常的更新命令会忽略软件更新时——例如依赖改变——本命令可以进行这些更新) ||pacman -Syu||dnf distro-sync ||apt full-upgrade||zypper dup||emerge -uDN world<br />
|- style="background:#e4e4e4"<br />
| 清除本地缓存(可能允许通过选项控制要清除拿些东西;autoclean 只清除过时的信息) ||pacman -Sc<br/>pacman -Scc ||dnf clean all ||apt-get clean / apt-get autoclean / aptitude clean|| zypper clean || eclean distfiles<br />
|-<br />
| 移除不再需要的依赖(例如当依赖某包的软件被移除) ||<nowiki>pacman -Qdtq | pacman -Rs -</nowiki>||dnf autoremove||apt-get autoremove ||zypper rm -u||emerge --depclean <br />
|- style="background:#e4e4e4"<br />
| 移除不再处于任何仓库中的包 ||<nowiki>pacman -Qm | pacman -Rs -</nowiki>||package-cleanup --orphans||aptitude purge '~o'||||<br />
|-<br />
| 将作为依赖安装的包指定为手动安装 ||pacman -D --asexplicit||dnf mark install||apt-mark manual||||emerge --select <br />
|- style="background:#e4e4e4"<br />
| 将包作为依赖安装 ||pacman -S --asdeps||dnf install => dnf mark remove||aptitude install '$package&M'||||emerge -1<br />
|-<br />
| 仅下载而不解包或安装 ||pacman -Sw||dnf download||apt-get install --download-only (into the package cache)<br>apt-get download (bypass the package cache)|| zypper --download-only ||emerge --fetchonly <br />
|- style="background:#e4e4e4"<br />
| 启动一个 shell 以便在一个会话中输入多个命令 ||||||apt-config shell||zypper shell ||<br />
|-<br />
| 查看日志 ||cat /var/log/pacman.log ||dnf history||cat /var/log/dpkg.log||cat /var/log/zypp/history || located in /var/log/portage<br />
|- style="background:#e4e4e4"<br />
| 获取当前系统所有软件包的状态 ||(see /var/lib/pacman/local)||(see /var/lib/rpm/Packages)||apt-cache stats||n/a ||emerge --info<br />
|-<br />
| 包变更时发送邮件 ||||||apt-get install apt-listchanges||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询某个包的信息 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 显示包的全部或者部分信息。各种包管理工具默认显示的详细程度各不相同,但是可以通过设置选项使其一致。||pacman -[S<nowiki>|</nowiki>Q]i ||dnf list, dnf info ||apt show / apt-cache policy||zypper info zypper if||emerge -S; emerge -pv; eix<br />
|- style="background:#e4e4e4"<br />
| 显示本地包信息,包括包名、版本、描述等。||pacman -Qi ||rpm -qi ||dpkg -s / aptitude show||zypper info; rpm -qi ||emerge -pv and emerge -S<br />
|-<br />
| 显示远程包信息,包括包名、版本、描述等。||pacman -Si ||dnf info ||apt-cache show / aptitude show||zypper info ||emerge -pv and emerge -S<br />
|- style="background:#e4e4e4"<br />
| 显示本地包提供的文件。||pacman -Ql ||rpm -ql||dpkg -L||rpm -Ql ||equery files<br />
|-<br />
| 显示远程包提供的文件。||pkgfile -l||dnf repoquery -l||apt-file list $pattern||||pfl<br />
|- style="background:#e4e4e4"<br />
| 查询提供某个文件的包。||pacman -Qo ||rpm -qf (installed only) or dnf provides (everything) ||dpkg -S / dlocate||zypper search -f ||equery belongs<br />
|-<br />
| 列出包中的文件。其他更复杂的命令亦可以提供该功能。||pacman -Ql <br/>pkgfile -l ||dnf repoquery -l ||dpkg-query -L || rpm -ql ||equery files<br />
|- style="background:#e4e4e4"<br />
| 查出文件是由哪一个包提供的,主要是为了检索特定文件。其他工具亦可能通过搜索命令提供该功能。||pkgfile||dnf provides ||apt-file search||zypper what-provides zypper wp|| equery belongs (only installed packages); pfl<br />
|-<br />
| 在所有包中查找包含指定文件的包。auto-apt 提供该功能。||pkgfile -s||dnf provides ||apt-file search||zypper search -f ||equery belongs<br />
|- style="background:#e4e4e4"<br />
| 显示包的更新日志。||pacman -Qc||rpm -q --changelog||apt-get changelog||rpm -q --changelog||equery changes -f<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包列表 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par. ||pacman -Ss ||dnf search ||apt search||zypper search zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options. ||pacman -Qu ||dnf list updates, dnf check-update ||apt-get upgrade -> n||zypper list-updates zypper patch-check (just for patches) ||emerge -uDNp world<br />
|-<br />
| Display a list of all packages in all installation sources that are handled by the packages management. Some tools provide options or additional commands to limit the output to a specific installation source. ||pacman -Sl ||dnf list available||apt-cache dumpavail apt-cache dump (Cache only) apt-cache pkgnames||zypper packages ||emerge -ep world<br />
|- style="background:#e4e4e4"<br />
| Generates a list of installed packages || pacman -Q || dnf list installed || |dpkg --list | grep ^i || zypper search --installed-only ||emerge -ep world<br />
|-<br />
| List packages that are installed but are not available in any installation source (anymore). ||pacman -Qm||dnf list extras || deborphan || |zypper se -si | grep 'System Packages'||eix-test-obsolete<br />
|- style="background:#e4e4e4"<br />
| List packages that were recently added to one of the installation sources, i.e. which are new to it. ||(none)||dnf list recent ||aptitude search '~N' / aptitude forget-new||n/a||eix-diff<br />
|-<br />
| List installed local packages along with version||pacman -Q||rpm -qa||dpkg -l||zypper search -s; rpm -qa ||emerge -e world<br />
|- style="background:#e4e4e4"<br />
| Search locally installed package for names or descriptions ||pacman -Qs||rpm -qa '*<str>*' ||aptitude search <nowiki>'~i(~n $name|~d $description)'</nowiki>|||||eix -S -I<br />
|-<br />
| List packages not required by any other package||pacman -Qt||package-cleanup --all --leaves||deborphan -anp1||||<br />
|- style="background:#e4e4e4"<br />
| List packages installed explicitly (not as dependencies)||pacman -Qe||||apt-mark showmanual||||<br />
|-<br />
| List packages installed automatically (as dependencies)||pacman -Qd||||apt-mark showauto||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包的依赖关系 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Display packages which require X to be installed, aka show reverse dependencies.||pacman -Sii||dnf repoquery --alldeps --whatrequires ||apt-cache rdepends / aptitude search ~D$pattern||zypper search --requires || equery depends<br />
|- style="background:#e4e4e4"<br />
| Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.||||dnf repoquery --conflicts||aptitude search '~C$pattern'|| ||<br />
|-<br />
| List all packages which are required for the given package, aka show dependencies. ||pacman -[S<nowiki>|</nowiki>Q]i||dnf repoquery --requires||apt-cache depends / apt-cache show||zypper info --requires || emerge -ep<br />
|- style="background:#e4e4e4"<br />
| List what the current package provides ||||dnf provides ||dpkg -s / aptitude show||zypper info --provides ||equery files<br />
|-<br />
| List all packages that require a particular package ||||dnf repoquery --alldeps --whatrequires||aptitude search ~D{depends,recommends,suggests}:$pattern / aptitude why||zypper search --requires ||equery depends -a<br />
|- style="background:#e4e4e4"<br />
| Display all packages that the specified packages obsoletes. ||||dnf list obsoletes ||apt-cache show|||| <br />
|-<br />
| Generates an output suitable for processing with dotty for the given package(s). ||||||apt-cache dotty ||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 管理软件源 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Installation sources management ||${EDITOR} /etc/pacman.conf||${EDITOR} /etc/yum.repos.d/${REPO}.repo||${EDITOR} /etc/apt/sources.list||${EDITOR} /etc/zypp/repos.d/${REPO}.repo ||layman<br />
|- style="background:#e4e4e4"<br />
| Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command. Again others, like apt and dnf force editing a sources list. apt-cdrom is a special command, which offers special options design for CDs/DVDs as source. ||/etc/pacman.conf||/etc/yum.repos.d/*.repo||apt-cdrom add||zypper service-add ||layman, overlays<br />
|-<br />
| Refresh the information about the specified installation source(s) or all installation sources. ||pacman -Sy ([[System_maintenance#Partial upgrades are unsupported|always upgrade the whole system afterwards]]) ||dnf clean expire-cache && dnf check-update ||apt-get update||zypper refresh zypper ref||emerge --sync;layman -S<br />
|- style="background:#e4e4e4"<br />
| Prints a list of all installation sources including important information like URI, alias etc. ||cat /etc/pacman.d/mirrorlist||cat /etc/yum.repos.d/*||apt-cache policy||zypper service-list ||layman -l<br />
|-<br />
| Disable an installation source for an operation ||||dnf --disablerepo=||||||emerge package::repo-to-use<br />
|- style="background:#e4e4e4"<br />
| Download packages from a different version of the distribution than the one installed. ||||dnf --releasever= ||apt-get install -t release package/ apt-get install package/release (deps not covered)||||echo "category/package ~amd64" >> /etc/portage/package.keywords && emerge package<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== Overrides ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 增加包锁定规则来保持其当前状态不被改变 ||/etc/pacman.conf<br/>modify IgnorePkg array||dnf.conf <--”exclude” option (add/amend)||apt-mark hold pkg||Put package name in /etc/zypp/locks, or zypper al||/etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| 删除包锁定规则 ||remove package from IgnorePkg line in /etc/pacman.conf|| ||apt-mark unhold pkg||Remove package name from /etc/zypp/locks or zypper rl||/etc/portage/package.mask (or package.unmask) <br />
|-<br />
| 列出所有锁定规则 ||cat /etc/pacman.conf|| ||/etc/apt/preferences ||View /etc/zypp/locks or zypper ll||cat /etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source. ||${EDITOR} /etc/pacman.conf<br/>Modify HoldPkg and/or IgnorePkg arrays||||/etc/apt/preferences, apt-cache policy|| zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>Add a line with =category/package-version<br />
|-<br />
| Remove a previously set priority ||||||/etc/apt/preferences ||zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>remove offending line<br />
|- style="background:#e4e4e4"<br />
| Show a list of set priorities. ||||||apt-cache policy /etc/apt/preferences ||zypper lr -p || cat /etc/portage/package.keywords<br />
|-<br />
| Ignores problems that priorities may trigger. ||||||||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 校验和修复 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Verify single package||pacman -Qk[k]||rpm -V||debsums||rpm -V||equery check<br />
|- style="background:#e4e4e4"<br />
| Verify all packages||pacman -Qk[k]||rpm -Va||debsums||rpm -Va||equery check<br />
|-<br />
| Reinstall given Package - Will reinstall the given package without dependency hassle. ||pacman -S||dnf reinstall||apt install --reinstall||zypper install --force||emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| Verify dependencies of the complete system. Used if installation process was forcefully killed. ||pacman -Dk||dnf repoquery --requires ||apt-get check||zypper verify || emerge -uDN world<br />
|-<br />
| Use some magic to fix broken dependencies in a system || pacman dep level - pacman -Dk, shared lib level - findbrokenpkgs or lddd||dnf repoquery --unsatisfied||apt-get --fix-broken<br>aptitude install||zypper verify ||revdep-rebuild<br />
|- style="background:#e4e4e4"<br />
| 为包系统增加一个检查点以便未来回滚 ||||(unnecessary, done on every transaction)||||n/a||<br />
|-<br />
| 删除系统中的一个检查点 ||N/A||N/A||||n/a||<br />
|- style="background:#e4e4e4"<br />
| 提供所有系统检查点的列表 ||N/A||dnf history list||||n/a ||<br />
|-<br />
| 将所有包滚回特定日期或检查点 ||N/A||dnf history rollback||||n/a ||<br />
|- style="background:#e4e4e4"<br />
| 撤销特定改动 ||N/A||dnf history undo||||n/a||||<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 使用软件包文件和构建软件包 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Query a package supplied on the command line rather than an entry in the package management database||pacman -Qp||rpm -qp||dpkg -I||||<br />
|- style="background:#e4e4e4"<br />
| List the contents of a package file||pacman -Qpl||rpmls rpm -qpl||dpkg -c||rpm -qpl||<br />
|-<br />
| Installs local package file, e.g. app.rpm and uses the installation sources to resolve dependencies ||pacman -U||dnf install ||apt install||zypper in||emerge<br />
|- style="background:#e4e4e4"<br />
| Updates package(s) with local packages and uses the installation sources to resolve dependencies ||pacman -U||dnf upgrade ||debi||||emerge||<br />
|-<br />
| Add a local package to the local package cache mostly for debugging purposes. ||cp $filename /var/cache/pacman/pkg/||||apt-cache add ||n/a|| cp $filename /usr/portage/distfiles<br />
|- style="background:#e4e4e4"<br />
| 解包 ||tar -Jxvf||<nowiki>rpm2cpio | cpio -vid</nowiki>||dpkg-deb -x||<nowiki>rpm2cpio | cpio -vid</nowiki>||tar -jxvf<br />
|-<br />
| 安装/移除包以适合构建依赖(使用源码包中的信息) ||automatic||dnf builddep||apt-get build-dep ||zypper si -d||emerge -o <br />
|- style="background:#e4e4e4"<br />
| Display the source package to the given package name(s) ||||dnf repoquery -s||apt-cache showsrc ||n/a||<br />
|-<br />
| Downloads the corresponding source package(s) to the given package name(s) || Use [[ABS]] && makepkg -o ||dnf download --source||apt-get source / debcheckout||zypper source-install||emerge --fetchonly<br />
|- style="background:#e4e4e4"<br />
| Build a package||makepkg -s||rpmbuild -ba (normal)<br>mock (in chroot)||debuild||rpmbuild -ba; build; osc build ||ebuild; quickpkg<br />
|-<br />
| Check for possible packaging issues||namcap||rpmlint ||lintian||rpmlint ||repoman<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 参阅 ==<br />
<br />
* [http://dnf.readthedocs.org/en/latest/cli_vs_yum.html Changes in DNF CLI compared to Yum]</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Pacman_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/Rosetta_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=477740Pacman (简体中文)/Rosetta (简体中文)2017-05-19T08:05:18Z<p>Echizenryoma: /* 查询某个包的信息 */</p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Package management (简体中文)]]<br />
[[en:Pacman/Rosetta]]<br />
[[es:Pacman/Rosetta]]<br />
[[ja:Pacman 比較表]]<br />
[[sr:Pacman/Rosetta]]<br />
{{translateme (简体中文)}}<br />
{{TranslationStatus (简体中文)|Pacman/Rosetta|2017-03-06|464653}}<br />
<br />
这个页面用表格展示一些流行的 Linux 发行版[[Wikipedia:Package manager|包管理器]]命令的对应关系。这是受到 [http://old-en.opensuse.org/Software_Management_Command_Line_Comparison openSUSE's Software Management Command Line Comparison] 的启发而成的。<br />
<br />
{{Tip|Arch 用户在临时处理其他发行版时可以用 [https://github.com/icy/pacapt pacapt],它是对其它包管理器的简单包装。}}<br />
<br />
{{Note|<br />
* 这里描述的一些工具只针对特定版本的 pacman。其中的 -Qk 选项是在 pacman 4.1 中新实现的。<br />
* 您可以在 {{Pkg|pkgfile}} 中找到 {{ic|pkgfile}} 命令。<br />
}}<br />
<br />
== 基本操作 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">动作</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 按名安装包 ||pacman -S||dnf install ||apt install||zypper install<br>zypper in|| emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| 按名移除包 ||pacman -Rs||dnf remove ||apt remove||zypper remove<br>zypper rm ||emerge -C<br />
|-<br />
| 通过软件名、描述、简短描述来搜索包。默认搜索域依工具不同而异。Mostly options bring tools on par. ||pacman -Ss||dnf search ||apt search||zypper search<br>zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| 升级包(安装已有包的更新版本) ||pacman -Syu||dnf upgrade ||apt update; apt upgrade||zypper update zypper up||emerge -u world<br />
|-<br />
| 升级包(更新命令的另一种形式,可以进行更复杂形式的更新,例如发行版升级。当通常的更新命令会忽略软件更新时——例如依赖改变——本命令可以进行这些更新) ||pacman -Syu||dnf distro-sync ||apt full-upgrade||zypper dup||emerge -uDN world<br />
|- style="background:#e4e4e4"<br />
| 清除本地缓存(可能允许通过选项控制要清除拿些东西;autoclean 只清除过时的信息) ||pacman -Sc<br/>pacman -Scc ||dnf clean all ||apt-get clean / apt-get autoclean / aptitude clean|| zypper clean || eclean distfiles<br />
|-<br />
| 移除不再需要的依赖(例如当依赖某包的软件被移除) ||<nowiki>pacman -Qdtq | pacman -Rs -</nowiki>||dnf autoremove||apt-get autoremove ||zypper rm -u||emerge --depclean <br />
|- style="background:#e4e4e4"<br />
| 移除不再处于任何仓库中的包 ||<nowiki>pacman -Qm | pacman -Rs -</nowiki>||package-cleanup --orphans||aptitude purge '~o'||||<br />
|-<br />
| 将作为依赖安装的包指定为手动安装 ||pacman -D --asexplicit||dnf mark install||apt-mark manual||||emerge --select <br />
|- style="background:#e4e4e4"<br />
| 将包作为依赖安装 ||pacman -S --asdeps||dnf install => dnf mark remove||aptitude install '$package&M'||||emerge -1<br />
|-<br />
| 仅下载而不解包或安装 ||pacman -Sw||dnf download||apt-get install --download-only (into the package cache)<br>apt-get download (bypass the package cache)|| zypper --download-only ||emerge --fetchonly <br />
|- style="background:#e4e4e4"<br />
| 启动一个 shell 以便在一个会话中输入多个命令 ||||||apt-config shell||zypper shell ||<br />
|-<br />
| 查看日志 ||cat /var/log/pacman.log ||dnf history||cat /var/log/dpkg.log||cat /var/log/zypp/history || located in /var/log/portage<br />
|- style="background:#e4e4e4"<br />
| 获取当前系统所有软件包的状态 ||(see /var/lib/pacman/local)||(see /var/lib/rpm/Packages)||apt-cache stats||n/a ||emerge --info<br />
|-<br />
| 包变更时发送邮件 ||||||apt-get install apt-listchanges||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询某个包的信息 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 显示包的全部或者部分信息。包管理工具默认所显示信息的详细程度各不相同,但是可以通过设置选项使其一致。||pacman -[S<nowiki>|</nowiki>Q]i ||dnf list, dnf info ||apt show / apt-cache policy||zypper info zypper if||emerge -S; emerge -pv; eix<br />
|- style="background:#e4e4e4"<br />
| 显示本地包信息,包括包名、版本、描述等。||pacman -Qi ||rpm -qi ||dpkg -s / aptitude show||zypper info; rpm -qi ||emerge -pv and emerge -S<br />
|-<br />
| 显示远程包信息,包括包名、版本、描述等。||pacman -Si ||dnf info ||apt-cache show / aptitude show||zypper info ||emerge -pv and emerge -S<br />
|- style="background:#e4e4e4"<br />
| 显示本地包提供的文件。||pacman -Ql ||rpm -ql||dpkg -L||rpm -Ql ||equery files<br />
|-<br />
| 显示远程包提供的文件。||pkgfile -l||dnf repoquery -l||apt-file list $pattern||||pfl<br />
|- style="background:#e4e4e4"<br />
| 查询提供某个文件的包。||pacman -Qo ||rpm -qf (installed only) or dnf provides (everything) ||dpkg -S / dlocate||zypper search -f ||equery belongs<br />
|-<br />
| 列出包中的文件。(其他更复杂的命令也可以提供这个功能。)||pacman -Ql <br/>pkgfile -l ||dnf repoquery -l ||dpkg-query -L || rpm -ql ||equery files<br />
|- style="background:#e4e4e4"<br />
| Displays packages which provide the given exp. aka reverse provides. Mainly a shortcut to search a specific field. Other tools might offer this functionality through the search command. ||pkgfile||dnf provides ||apt-file search||zypper what-provides zypper wp|| equery belongs (only installed packages); pfl<br />
|-<br />
| 在所有包中查找包含指定文件的包。auto-apt 使用了这个功能。||pkgfile -s||dnf provides ||apt-file search||zypper search -f ||equery belongs<br />
|- style="background:#e4e4e4"<br />
| Show the changelog of a package||pacman -Qc||rpm -q --changelog||apt-get changelog||rpm -q --changelog||equery changes -f<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包列表 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Search for package(s) by searching the expression in name, description, short description. What exact fields are being searched by default varies in each tool. Mostly options bring tools on par. ||pacman -Ss ||dnf search ||apt search||zypper search zypper se [-s]||emerge -S <br />
|- style="background:#e4e4e4"<br />
| Lists packages which have an update available. Note: Some provide special commands to limit the output to certain installation sources, others use options. ||pacman -Qu ||dnf list updates, dnf check-update ||apt-get upgrade -> n||zypper list-updates zypper patch-check (just for patches) ||emerge -uDNp world<br />
|-<br />
| Display a list of all packages in all installation sources that are handled by the packages management. Some tools provide options or additional commands to limit the output to a specific installation source. ||pacman -Sl ||dnf list available||apt-cache dumpavail apt-cache dump (Cache only) apt-cache pkgnames||zypper packages ||emerge -ep world<br />
|- style="background:#e4e4e4"<br />
| Generates a list of installed packages || pacman -Q || dnf list installed || |dpkg --list | grep ^i || zypper search --installed-only ||emerge -ep world<br />
|-<br />
| List packages that are installed but are not available in any installation source (anymore). ||pacman -Qm||dnf list extras || deborphan || |zypper se -si | grep 'System Packages'||eix-test-obsolete<br />
|- style="background:#e4e4e4"<br />
| List packages that were recently added to one of the installation sources, i.e. which are new to it. ||(none)||dnf list recent ||aptitude search '~N' / aptitude forget-new||n/a||eix-diff<br />
|-<br />
| List installed local packages along with version||pacman -Q||rpm -qa||dpkg -l||zypper search -s; rpm -qa ||emerge -e world<br />
|- style="background:#e4e4e4"<br />
| Search locally installed package for names or descriptions ||pacman -Qs||rpm -qa '*<str>*' ||aptitude search <nowiki>'~i(~n $name|~d $description)'</nowiki>|||||eix -S -I<br />
|-<br />
| List packages not required by any other package||pacman -Qt||package-cleanup --all --leaves||deborphan -anp1||||<br />
|- style="background:#e4e4e4"<br />
| List packages installed explicitly (not as dependencies)||pacman -Qe||||apt-mark showmanual||||<br />
|-<br />
| List packages installed automatically (as dependencies)||pacman -Qd||||apt-mark showauto||||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 查询包的依赖关系 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Display packages which require X to be installed, aka show reverse dependencies.||pacman -Sii||dnf repoquery --alldeps --whatrequires ||apt-cache rdepends / aptitude search ~D$pattern||zypper search --requires || equery depends<br />
|- style="background:#e4e4e4"<br />
| Display packages which conflict with given expression (often package). Search can be used as well to mimic this function.||||dnf repoquery --conflicts||aptitude search '~C$pattern'|| ||<br />
|-<br />
| List all packages which are required for the given package, aka show dependencies. ||pacman -[S<nowiki>|</nowiki>Q]i||dnf repoquery --requires||apt-cache depends / apt-cache show||zypper info --requires || emerge -ep<br />
|- style="background:#e4e4e4"<br />
| List what the current package provides ||||dnf provides ||dpkg -s / aptitude show||zypper info --provides ||equery files<br />
|-<br />
| List all packages that require a particular package ||||dnf repoquery --alldeps --whatrequires||aptitude search ~D{depends,recommends,suggests}:$pattern / aptitude why||zypper search --requires ||equery depends -a<br />
|- style="background:#e4e4e4"<br />
| Display all packages that the specified packages obsoletes. ||||dnf list obsoletes ||apt-cache show|||| <br />
|-<br />
| Generates an output suitable for processing with dotty for the given package(s). ||||||apt-cache dotty ||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 管理软件源 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Installation sources management ||${EDITOR} /etc/pacman.conf||${EDITOR} /etc/yum.repos.d/${REPO}.repo||${EDITOR} /etc/apt/sources.list||${EDITOR} /etc/zypp/repos.d/${REPO}.repo ||layman<br />
|- style="background:#e4e4e4"<br />
| Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command. Again others, like apt and dnf force editing a sources list. apt-cdrom is a special command, which offers special options design for CDs/DVDs as source. ||/etc/pacman.conf||/etc/yum.repos.d/*.repo||apt-cdrom add||zypper service-add ||layman, overlays<br />
|-<br />
| Refresh the information about the specified installation source(s) or all installation sources. ||pacman -Sy ([[System_maintenance#Partial upgrades are unsupported|always upgrade the whole system afterwards]]) ||dnf clean expire-cache && dnf check-update ||apt-get update||zypper refresh zypper ref||emerge --sync;layman -S<br />
|- style="background:#e4e4e4"<br />
| Prints a list of all installation sources including important information like URI, alias etc. ||cat /etc/pacman.d/mirrorlist||cat /etc/yum.repos.d/*||apt-cache policy||zypper service-list ||layman -l<br />
|-<br />
| Disable an installation source for an operation ||||dnf --disablerepo=||||||emerge package::repo-to-use<br />
|- style="background:#e4e4e4"<br />
| Download packages from a different version of the distribution than the one installed. ||||dnf --releasever= ||apt-get install -t release package/ apt-get install package/release (deps not covered)||||echo "category/package ~amd64" >> /etc/portage/package.keywords && emerge package<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== Overrides ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| 增加包锁定规则来保持其当前状态不被改变 ||/etc/pacman.conf<br/>modify IgnorePkg array||dnf.conf <--”exclude” option (add/amend)||apt-mark hold pkg||Put package name in /etc/zypp/locks, or zypper al||/etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| 删除包锁定规则 ||remove package from IgnorePkg line in /etc/pacman.conf|| ||apt-mark unhold pkg||Remove package name from /etc/zypp/locks or zypper rl||/etc/portage/package.mask (or package.unmask) <br />
|-<br />
| 列出所有锁定规则 ||cat /etc/pacman.conf|| ||/etc/apt/preferences ||View /etc/zypp/locks or zypper ll||cat /etc/portage/package.mask<br />
|- style="background:#e4e4e4"<br />
| Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source. ||${EDITOR} /etc/pacman.conf<br/>Modify HoldPkg and/or IgnorePkg arrays||||/etc/apt/preferences, apt-cache policy|| zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>Add a line with =category/package-version<br />
|-<br />
| Remove a previously set priority ||||||/etc/apt/preferences ||zypper mr -p || ${EDITOR} /etc/portage/package.keywords<br/>remove offending line<br />
|- style="background:#e4e4e4"<br />
| Show a list of set priorities. ||||||apt-cache policy /etc/apt/preferences ||zypper lr -p || cat /etc/portage/package.keywords<br />
|-<br />
| Ignores problems that priorities may trigger. ||||||||n/a||<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 校验和修复 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Verify single package||pacman -Qk[k]||rpm -V||debsums||rpm -V||equery check<br />
|- style="background:#e4e4e4"<br />
| Verify all packages||pacman -Qk[k]||rpm -Va||debsums||rpm -Va||equery check<br />
|-<br />
| Reinstall given Package - Will reinstall the given package without dependency hassle. ||pacman -S||dnf reinstall||apt install --reinstall||zypper install --force||emerge [-a]<br />
|- style="background:#e4e4e4"<br />
| Verify dependencies of the complete system. Used if installation process was forcefully killed. ||pacman -Dk||dnf repoquery --requires ||apt-get check||zypper verify || emerge -uDN world<br />
|-<br />
| Use some magic to fix broken dependencies in a system || pacman dep level - pacman -Dk, shared lib level - findbrokenpkgs or lddd||dnf repoquery --unsatisfied||apt-get --fix-broken<br>aptitude install||zypper verify ||revdep-rebuild<br />
|- style="background:#e4e4e4"<br />
| 为包系统增加一个检查点以便未来回滚 ||||(unnecessary, done on every transaction)||||n/a||<br />
|-<br />
| 删除系统中的一个检查点 ||N/A||N/A||||n/a||<br />
|- style="background:#e4e4e4"<br />
| 提供所有系统检查点的列表 ||N/A||dnf history list||||n/a ||<br />
|-<br />
| 将所有包滚回特定日期或检查点 ||N/A||dnf history rollback||||n/a ||<br />
|- style="background:#e4e4e4"<br />
| 撤销特定改动 ||N/A||dnf history undo||||n/a||||<br />
|-<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 使用软件包文件和构建软件包 ==<br />
<br />
{|<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SLES/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|-<br />
| Query a package supplied on the command line rather than an entry in the package management database||pacman -Qp||rpm -qp||dpkg -I||||<br />
|- style="background:#e4e4e4"<br />
| List the contents of a package file||pacman -Qpl||rpmls rpm -qpl||dpkg -c||rpm -qpl||<br />
|-<br />
| Installs local package file, e.g. app.rpm and uses the installation sources to resolve dependencies ||pacman -U||dnf install ||apt install||zypper in||emerge<br />
|- style="background:#e4e4e4"<br />
| Updates package(s) with local packages and uses the installation sources to resolve dependencies ||pacman -U||dnf upgrade ||debi||||emerge||<br />
|-<br />
| Add a local package to the local package cache mostly for debugging purposes. ||cp $filename /var/cache/pacman/pkg/||||apt-cache add ||n/a|| cp $filename /usr/portage/distfiles<br />
|- style="background:#e4e4e4"<br />
| 解包 ||tar -Jxvf||<nowiki>rpm2cpio | cpio -vid</nowiki>||dpkg-deb -x||<nowiki>rpm2cpio | cpio -vid</nowiki>||tar -jxvf<br />
|-<br />
| 安装/移除包以适合构建依赖(使用源码包中的信息) ||automatic||dnf builddep||apt-get build-dep ||zypper si -d||emerge -o <br />
|- style="background:#e4e4e4"<br />
| Display the source package to the given package name(s) ||||dnf repoquery -s||apt-cache showsrc ||n/a||<br />
|-<br />
| Downloads the corresponding source package(s) to the given package name(s) || Use [[ABS]] && makepkg -o ||dnf download --source||apt-get source / debcheckout||zypper source-install||emerge --fetchonly<br />
|- style="background:#e4e4e4"<br />
| Build a package||makepkg -s||rpmbuild -ba (normal)<br>mock (in chroot)||debuild||rpmbuild -ba; build; osc build ||ebuild; quickpkg<br />
|-<br />
| Check for possible packaging issues||namcap||rpmlint ||lintian||rpmlint ||repoman<br />
|- style="background:#e4e4e4"<br />
| style="background:#f0f0f0;"|'''<font color="#707070">Action</font>'''<br />
| style="background:#f0f0f0;"|'''Arch'''<br />
| style="background:#f0f0f0;"|'''Red Hat/Fedora'''<br />
| style="background:#f0f0f0;"|'''Debian/Ubuntu'''<br />
| style="background:#f0f0f0;"|'''SUSE/openSUSE'''<br />
| style="background:#f0f0f0;"|'''Gentoo'''<br />
|}<br />
<br />
== 参阅 ==<br />
<br />
* [http://dnf.readthedocs.org/en/latest/cli_vs_yum.html Changes in DNF CLI compared to Yum]</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453146Infinality (简体中文)2016-10-07T07:25:03Z<p>Echizenryoma: /* 字体替换 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过修改环境变量来启用一些功能:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5|导入非官方密钥]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)|官方源]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig 设置 ===<br />
<br />
Infinality 补丁 [[fontconfig]] 提供一组不同的示例配置和一个默认配置。 [[fontconfig]] 提供多种预设配置,运行 {{ic|fc-presets help}} 以获取更多信息。<br />
<br />
譬如,如果你想使用微软专有字体集,可以不安装 ''infinality-bundle-fonts'' ,但是必须选择 fontconfig 的 ms 预设配置保证正确的字体集被选中,执行<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
然后选择 {{ic|3}}。<br />
<br />
如果你希望使用自定义字体集合,{{ic|combi}} 预设配置可让你调整相应的 fontconfig 参数。当选择 {{ic|combi}} 预设配置时,combi 配置文件({{ic|/etc/fonts/conf.avail.infinality/combi}}) 的内容可以随意修改。当完成修改之后,不要忘记创建 combi 目录的备份。<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== 字体替换 ====<br />
<br />
想要覆盖在 {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} 中设置的默认字体替换,或者想要添加新的字体替换,请使用 {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} 。你需要复制每个字体家族模板(16行代码),在此基础上进行更换为适当的字体名称。<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453014Infinality (简体中文)2016-10-06T04:29:40Z<p>Echizenryoma: /* 附加字体 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过修改环境变量来启用一些功能:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5|导入非官方密钥]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)|官方源]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig 设置 ===<br />
<br />
Infinality 补丁 [[fontconfig]] 提供一组不同的示例配置和一个默认配置。 [[fontconfig]] 提供多种预设配置,运行 {{ic|fc-presets help}} 以获取更多信息。<br />
<br />
譬如,如果你想使用微软专有字体集,可以不安装 ''infinality-bundle-fonts'' ,但是必须选择 fontconfig 的 ms 预设配置保证正确的字体集被选中,执行<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
然后选择 {{ic|3}}。<br />
<br />
如果你希望使用自定义字体集合,{{ic|combi}} 预设配置可让你调整相应的 fontconfig 参数。当选择 {{ic|combi}} 预设配置时,combi 配置文件({{ic|/etc/fonts/conf.avail.infinality/combi}}) 的内容可以随意修改。当完成修改之后,不要忘记创建 combi 目录的备份。<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== 字体替换 ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453013Infinality (简体中文)2016-10-06T04:25:42Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过修改环境变量来启用一些功能:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5|导入非官方密钥]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig 设置 ===<br />
<br />
Infinality 补丁 [[fontconfig]] 提供一组不同的示例配置和一个默认配置。 [[fontconfig]] 提供多种预设配置,运行 {{ic|fc-presets help}} 以获取更多信息。<br />
<br />
譬如,如果你想使用微软专有字体集,可以不安装 ''infinality-bundle-fonts'' ,但是必须选择 fontconfig 的 ms 预设配置保证正确的字体集被选中,执行<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
然后选择 {{ic|3}}。<br />
<br />
如果你希望使用自定义字体集合,{{ic|combi}} 预设配置可让你调整相应的 fontconfig 参数。当选择 {{ic|combi}} 预设配置时,combi 配置文件({{ic|/etc/fonts/conf.avail.infinality/combi}}) 的内容可以随意修改。当完成修改之后,不要忘记创建 combi 目录的备份。<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== 字体替换 ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453012Infinality (简体中文)2016-10-06T04:14:29Z<p>Echizenryoma: /* Fontconfig settings */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5|导入非官方密钥]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig 设置 ===<br />
<br />
Infinality 补丁 [[fontconfig]] 提供一组不同的示例配置和一个默认配置。 [[fontconfig]] 提供多种预设配置,运行 {{ic|fc-presets help}} 以获取更多信息。<br />
<br />
譬如,如果你想使用微软专有字体集,可以不安装 ''infinality-bundle-fonts'' ,但是必须选择 fontconfig 的 ms 预设配置保证正确的字体集被选中,执行<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
然后选择 {{ic|3}}。<br />
<br />
如果你希望使用自定义字体集合,{{ic|combi}} 预设配置可让你调整相应的 fontconfig 参数。当选择 {{ic|combi}} 预设配置时,combi 配置文件({{ic|/etc/fonts/conf.avail.infinality/combi}}) 的内容可以随意修改。当完成修改之后,不要忘记创建 combi 目录的备份。<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== 字体替换 ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453011Infinality (简体中文)2016-10-06T03:51:13Z<p>Echizenryoma: /* Infinality-bundle */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5|导入非官方密钥]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453010Infinality (简体中文)2016-10-06T03:50:21Z<p>Echizenryoma: /* Xft 和 FreeType 设置 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variables (简体中文)|环境变量]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453009Infinality (简体中文)2016-10-06T03:48:48Z<p>Echizenryoma: /* Xft and FreeType settings */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft 和 FreeType 设置 ===<br />
<br />
[[Font configuration#Applications without fontconfig support|Xft]] 的配置文件 ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}) 不应该重复设置:<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
除了上述这些值以外,你可以修改 {{ic|INFINALITY_FT}} [[environment variable (简体中文)]]。 例如:<br />
<br />
{{bc|<nowiki><br />
# 使字体更粗或者更细<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# 不要太锐利,也不要太平滑<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|在升级 infinality 包过后,自定义设置 将被保存在 {{ic|.pacsave}} 文件中。}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453008Infinality (简体中文)2016-10-06T03:39:48Z<p>Echizenryoma: /* 许可限制字体 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下免费安装和使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453007Infinality (简体中文)2016-10-06T03:38:48Z<p>Echizenryoma: /* Fonts with restricted licenses */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== 许可限制字体 ===<br />
<br />
你会发现下列字体是不能自由分发的,所以这些字体并不在 ''infinality-bundle-fonts'' 的字体包里。但是,它们仍然可以在指定的条件下安装使用。源包可以在[[AUR]]中找到。在使用的这些字体之前,请认真阅读'''最终用户许可协议'''!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453006Infinality (简体中文)2016-10-06T03:30:35Z<p>Echizenryoma: /* Configuration */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== 设置 ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453005Infinality (简体中文)2016-10-06T03:30:09Z<p>Echizenryoma: /* AUR */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得除了系统渲染引擎的设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453004Infinality (简体中文)2016-10-06T03:28:55Z<p>Echizenryoma: /* 附加字体 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 可供安装。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
可以列出所有可用的字体包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得引擎自身渲染设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453003Infinality (简体中文)2016-10-06T03:26:34Z<p>Echizenryoma: /* AUR */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
截至 2016年04月,以下是可用的包含 (大部分是 Bohoomil 的)Infinality 补丁的 AUR 包:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7) 已经包含 Infinality 补丁,所以维护者只要设置 <tt>--enable-infinality=yes</tt> 即可。<br />
<br />
虽然这些软件包是使用和 Bohoomil 库相同的补丁源码,但是他们通常以 Bohoomil 库中的一个具体的提交,所以可能有些延迟。打包者对于打什么补丁可能有自己的想法。<br />
<br />
除了 {{AUR|freetype2-infinality}} 以外,建议同时安装 {{AUR|fontconfig-infinality}},使得引擎自身渲染设置以外的预定义字体替换样式和抗锯齿的设置能够启用。<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453002Infinality (简体中文)2016-10-06T01:54:06Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以通过在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 设置 USE_STYLE 环境变量来使用。<br />
<br />
Infinality 的环境变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于 2.4x 的 freetype2 使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453001Infinality (简体中文)2016-10-06T01:47:42Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality 可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
Infinality 内置了一些预设置,可以使用在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量。<br />
<br />
USE_STYLE 变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=453000Infinality (简体中文)2016-10-06T01:31:07Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452930Infinality (简体中文)2016-10-05T06:11:56Z<p>Echizenryoma: /* 附加字体 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|从 [[official repositories (简体中文)]] 或 [[AUR]] 安装第三方字体之前,应该检查该字体是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452929Infinality (简体中文)2016-10-05T06:07:14Z<p>Echizenryoma: /* 附加字体 */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部包。除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|无论从[[official repositories (简体中文)]]或[[AUR]]安装任何第三方字体之前,经常检查是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452928Infinality (简体中文)2016-10-05T06:05:24Z<p>Echizenryoma: /* Additional fonts */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== 附加字体 ====<br />
<br />
如果想要安装更多字体,还有一个额外字体集合 ''infinality-bundle-fonts-extra'' 。运行<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
列出可用的安装包。<br />
<br />
{{Warning|'''不要'''尝试安装 ''infinality-bundle-fonts'' 组或者 ''infinality-bundle-fonts-extra'' 组的全部安装包。 除非你确信你需要有可用的字体在其中,否则你只会无缘无故地塞满你的硬盘以及降低字体缓存性能。''ibfonts-meta-extended'' 大多数情况下甚至复杂的应用场景应该是够用的。此外,一些字体家族有多种字体格式(T1、TTF、OTF)可供选择。尝试安装所有的字体包可能会导致无法解决安装包的冲突。如果是这种情况,你应该坚持每个字体家族只使用一种字体格式。<br />
}}<br />
{{Tip|无论从[[official repositories (简体中文)]]或[[AUR]]安装任何第三方字体之前,经常检查是否包含在 ''infinality-bundle-fonts'' 里。<br />
}}<br />
<br />
{{Note|当'''报告错误'''时,所有与代码相关的问题(如不正确渲染、fontconfig 的问题等)请在GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] 上提交,其他具体问题(包括有关维护、打包和一般性问题)请在Arch论坛反应。提交报告之前,请确保正确安装或定制 [infinality-bundle]。}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452927Infinality (简体中文)2016-10-05T05:33:31Z<p>Echizenryoma: /* Infinality-bundle */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现超文本文件所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
安装包括向 {{ic|pacman.conf}} 添加所选源和 [[安装]] 相关组或安装包两步。在安装后,记得重新启动 X server 以便看生效。<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] 源包含的核心包,构成 ''infinality-bundle'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] 源包含x86_64架构可选 multilib 库,构成 ''infinality-bundle-multilib'' 组。<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] 源包含广泛收集的免费字体,构成''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' 安装包。<br />
<br />
{{Note|<br />
* 不要忘记向pacman密钥环导入密钥 '''962DDE58'''。详细介绍详见 [[Pacman-key (简体中文)#.E5.AF.BC.E5.85.A5.E9.9D.9E.E5.AE.98.E6.96.B9.E5.AF.86.E9.92.A5]]。<br />
* 当pacman解决软件包依赖和冲突时,例如:{{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} 回答 {{ic|y}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452926Infinality (简体中文)2016-10-05T05:09:20Z<p>Echizenryoma: /* Infinality-bundle */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' 是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle''' 包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现'''超文本文件'''所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452925Infinality (简体中文)2016-10-05T05:09:01Z<p>Echizenryoma: /* Infinality-bundle */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle'''是一个在Arch Linux 下由 Bohoomil 打包的旨在改善文字显示的软件合集。<br />
<br />
目前,'''Infinality-bundle'''包括:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; 使用 {{Pkg|freetype2}} 的构建的含额外补丁的 [http://www.infinality.net/blog/ Infinality]。<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} 使用 ''freetype2-infinality-ultimate'' 优化显示,其中包括独立预设配置:自由(默认)、微软和自定义字体集合。更改列表详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG 更改日志]。<br />
* ''cairo-infinality-ultimate'' &ndash; 使用Ubuntu来构建的含额外补丁的{{Pkg|cairo}}<br />
* ''jdk8-openjdk-infinality'' &ndash; 使用 infinality 补丁的{{Pkg|jdk8-openjdk}}。<br />
<br />
附加源 ''infinality-bundle-fonts'' 提供一个用于创建和再现'''超文本文件'''所需的字体的可供选择的仓库。所有字体根据GPL、OFL、兼容 Apache 和非限制性许可证授权完全免费提供。<br />
<br />
默认情况下不需要额外的配置。要自定义设置,请参阅[[#Configuration]]。<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452924Infinality (简体中文)2016-10-05T04:44:26Z<p>Echizenryoma: /* Installation */</p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== 安装 ==<br />
<br />
{{Warning|上游 infinality 补丁为早于2.4x的freetype2使用的。建议用户使用''Bohoomil''的[[#Infinality-bundle|infinality-bundle]]。}}<br />
<br />
{{Accuracy|本部分不清楚:Bohoomil 包是来做什么的?除了能在新版 FreeType 下工作以外,和现有的补丁infinality 有何不同?“预设值”等等问题。}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452923Infinality (简体中文)2016-10-05T04:09:43Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS 风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]。<br />
<br />
{{Accuracy|上游和Bohoomil对于配置路径有分歧。上游版本似乎已经消失了。在Bohoomil的''infinality-bundle''中, [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh 上游的配置] 在 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} 和 {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} 中可以使用,并已经被复制到 {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
内置了一些预设置,可以通过设置那些在 {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}} 中的 USE_STYLE 变量在来使用。<br />
<br />
变量应该在 {{ic|/etc/profile.d/infinality-settings.sh}} 里进行设置。模板详见 [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh]。<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452922Infinality (简体中文)2016-10-05T03:49:59Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
[http://www.infinality.net/ infinality]补丁集可以显著改善 freetype2 字体渲染。另外也新增了一些新功能。<br />
<br />
Infinality可以通过动态设置环境变量来启用功能。设置如下:<br />
<br />
*'''加粗增强 (Emboldening Enhancement)''':禁用Y加粗可以(使用原生 TrueType 微调器或者自动微调器)使得没有加粗版本的字体的显示得以改善。<br />
*'''自动微调 (Auto-Autohint)''':强制那些不含 TrueType 信息的字体使用自动微调。<br />
*'''自动微调增强 (Autohint Enhancement)''':自动微调使得水平字符主干微移 (snap horizontal stems) 对齐像素。看起来就像精心微调 TrueType 的字体一样。<br />
*'''自定义有限冲激响应滤波器 (Customized FIR Filter)''':运行时(使用原生 TrueType 微调器或者自动微调器)选择[http://www.infinality.net/forum/viewtopic.php?f=2&t=19 过滤器的值] 。<br />
*'''字符主干对齐 (Stem Alignment)''':根据字符的像素边界优化调整。适用于原生 TrueType 微调器或者自动微调器。<br />
*'''伪伽玛校正 (Pseudo Gamma Correction)''':(使用原生 TrueType 微调器或者自动微调器)亮化和暗化给定大小的字形达到规定的值。<br />
*'''加粗细体字体 (Embolden Thin Fonts)''':加粗细体字体,使得他们更加好看(自动微调)。<br />
*'''强制微少微调 (Force Slight Hinting)''':强制微少微调甚至程序希望饱和微调。<br />
*'''ChromeOS风格锐化 (ChromeOS Style Sharpening)''': ChromeOS 所使用的锐化字体渲染的补丁现在包含在当infinality补丁集里。<br />
<br />
具体详见 [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README]<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Fonts_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452909Fonts (简体中文)2016-10-04T15:01:16Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Fonts (简体中文)]]<br />
[[Category:Graphics and desktop publishing (简体中文)]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[en:Fonts]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-TW:Fonts]]<br />
{{translateme (简体中文)}}<br />
{{Related articles start (简体中文)}}<br />
{{Related2|Font Configuration (简体中文)|字体设定}}<br />
{{Related2|MS Fonts (简体中文)|微软字体}}<br />
{{Related2|Java Fonts - Sun JRE|Java 环境字体(英文)}}<br />
{{Related2|Infinality (简体中文)|Infinality (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Fonts|2016-09-14|450802}}<br />
引自 [[Wikipedia:zh:计算机字体|维基百科]]:"'''计算机字体'''(computer font),简称'''字体'''(font),是包含有一套字形与字符的电子数据文件。"<br />
<br />
注意:部分字体在许可协议中规定了使用时的法律限制。<br />
<br />
== 字体类型 ==<br />
<br />
现今计算机使用的绝大多数字体,都是属于'''点阵字体'''或者'''轮廓字体'''二者之一。<br />
;点阵字体: 每种字形的每种形式和每种尺寸的图像都由点或者像素组成的矩阵构成。由于位图的原故,点阵字体很难进行缩放,特定的点阵字体只能清晰地显示在相应的字号下。但对于 12-16 px 的小号汉字来说,点阵字体往往比其它类型的字体在屏幕上有更好的显示效果。<br />
;轮廓字体或称矢量字体: 使用贝塞尔曲线、绘图指令和数学公式来描述每种字形,使得字体可以适应各种尺寸。<br />
<br />
=== 常见格式 ===<br />
<br />
* {{ic|bdf}} 与 {{ic|bdf.gz}} – 点阵字体,'''b'''itmap '''d'''istribution '''f'''ormat(位图布局格式)的缩写,后者表示以 gzip 压缩的 {{ic|bdf}}。<br />
* {{ic|pcf}} 与 {{ic|pcf.gz}} – 点阵字体, '''p'''ortable '''c'''ompiled '''f'''ont(可移植编译字体)的缩写,后者表示以 gzip 压缩的 {{ic|pcf}}。<br />
* {{ic|psf}},{{ic|psfu}}与{{ic|psf.gz}},{{ic|psfu.gz}} – 点阵字体,前两者分别是 '''P'''C '''s'''creen '''f'''ont(电脑屏幕字体)与 '''P'''C '''s'''creen '''f'''ont '''U'''nicode(Unicode 电脑屏幕字体)的缩写。两者分别表示用 gzip 压缩的 {{ic|psf}} 与 {{ic|psfu}(不适用于 X.Org)。<br />
* {{ic|pfa}} 与 {{ic|pfb}} – 矢量字体,分别是 '''P'''ostScript '''f'''ont '''A'''SCII 与 '''P'''ostScript '''f'''ont '''b'''inary 的缩写。PostScript 字体内带有打印指令。<br />
* {{ic|ttf}} – outline,'''T'''rue'''T'''ype 字体。作为 PostScript 字体的替代。<br />
* {{ic|otf}} – outline,'''O'''pen'''T'''ype 字体。带有 PostScript 打印指令的 TrueType 字体。<br />
<br />
在多数情况下,TrueType 和 OpenType 的技术差异可以忽略,一些带有 {{ic|ttf}} 扩展的字体实际上是 OpenType 字体。<br />
<br />
=== 其它格式 ===<br />
<br />
排版程序 '''TeX''' 和配套的字体软件 '''Metafont''' 用它们自己的方法渲染字体。部分用于这两个程序的字体的文件后缀有 {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} 与 {{ic|vf}}。<br />
<br />
'''FontForge''',一个字体编辑程序,可以用自己的格式来储存字体,例如 {{ic|sfd}} (''s''pline ''f''ont ''d''atabase)。<br />
<br />
[http://www.w3.org/TR/SVG/fonts.html SVG] 格式也有自己的字体描述方法。<br />
<br />
== 安装 ==<br />
<br />
你可以使用多种方法安装字体。<br />
<br />
=== Pacman ===<br />
<br />
有效的源中的字体和字体集可以使用 [[pacman]] 来安装。 可以使用以下方式查找字体:<br />
$ pacman -Ss font<br />
或者也可以只查找 {{ic|ttf}} 字体:<br />
$ pacman -Ss ttf<br />
<br />
=== 创建字体包 ===<br />
<br />
如果您想用 pacman 来管理你自己的字体,可以创建一个 Arch 软件包。这些包也可以在 [[Arch User Repository (简体中文)|AUR]] 中与社区成员分享。下面是一个创建软件包的基本样例。您还可以参考 [[PKGBUILD (简体中文)|PKGBUILD]] 来获取更多有关创建软件包的资料。<br />
<br />
{{bc|<nowiki><br />
pkgname=ttf-fontname<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="custom fonts"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -d "$pkgdir/usr/share/fonts/TTF"<br />
install -m644 "$srcdir/$pkgname/"*.ttf "$pkgdir/usr/share/fonts/TTF/"<br />
}<br />
</nowiki>}}<br />
<br />
PKGBUILD 推断这些字体是 TrueType 字体。需要创建一个安装文件 ({{ic|ttf-fontname.install}}) 以便更新字体缓存:<br />
<br />
{{bc|<nowiki><br />
post_install() {<br />
echo -n "Updating font cache... "<br />
fc-cache >/dev/null -f<br />
mkfontscale /usr/share/fonts/TTF<br />
mkfontdir /usr/share/fonts/TTF<br />
echo done<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
如果想更方便地从TTFs创建自己的包,可以使用 [[Arch User Repository (简体中文)|AUR]] 中的 {{AUR|makefontpkg}}。<br />
<br />
=== 手动安装字体 ===<br />
<br />
要安装不在源中的字体,推荐的方法请参考[[#创建字体包]]。这样使得 pacman 在以后能够更新或者移除它们。当然字体也可以通过手工方式安装。<br />
<br />
要在系统范围内(对所有用户有效)安装字体,请将文件夹移动到 {{ic|/usr/share/fonts/}} 目录。这些文件需要对每个用户而言都是可读的,使用 [[chmod]] 来设置合理的权限 (比如,文件至少为 {{ic|0444}} ,而目录至少为 {{ic|0555}})。要为单个用户安装字体,请使用 {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} 现在已经过时了)。<br />
要让 Xserver 能直接载入字体(而不使用某些'''字体服务'''),就需要将新增字体的目录加入到 FontPath 中。它位于[[Xorg#Configuration|您的 Xorg 设置目录]]中(例如 {{ic|/etc/X11/xorg.conf}} 或 {{ic|/etc/xorg.conf}}) 中。更多详细内容请查阅[[#X.Org 中的字体]]{{Broken section link}}<br />
<br />
然后更新 fontconfig 的字体缓存:<br />
<br />
$ fc-cache -vf<br />
<br />
==== 手动安装:高级模式 ====<br />
<br />
如果您有特殊的字体收集需求,例如使用商业字体、使用不同格式的字体、安装/删除字体相当频繁,或只是希望可以更能够控制访问自己的字体资源,那就相当适合用手动的方式来安装维护字体。采用这种方案会获得很多好处:<br />
<br />
* 避免重复安装不同版本、格式的同一种字体集 (经常容易导致渲染问题)。<br />
* 字体可使用多个非标准的实体来源 (例如额外的硬盘、分区)。<br />
* 避免依赖隐晦又占体积的本地字体来源(例如 TeX Live & {{ic|09-texlive-fonts.conf}},或是 AUR 中的某个字体包);使用这些字体来源时,您可能只需要其中的 5 种字体,却必须连带安装其它 55 种不需要的字体。<br />
* 避免字体渲染问题,在您的 fontconfig 配置文件已被修改成与安装在系统的那份不同的格式。<br />
* 只要观察主字体目录下的内容,就能够确定系统上有哪种格式的字体集可供应用程序使用。您不需要复杂、占用大量资源的字体管理程序;{{Pkg|gtk2fontsel}} 和基本的指令工具 (如 {{Pkg|fontconfig}} 软件包下的 {{ic|fc-query}}) 就可以将这件差事办得又快又好。<br />
* 当您安装或升级单一字体,所有应用程序都可以使用新版本字体,包括 LaTeX 相关软件。<br />
* 有必要的话,可以快速启用 / 停用某个字体集,因为您知道它们在哪个目录下(调试时很好用)。<br />
* 不需担心有任何多余的 {{ic|/etc/fonts/conf.avail/nn-foo.conf}} fontconfig 文件会可能与您的渲染设置起冲突 (特别是当您使用[[Font configuration (简体中文)#补丁包|自定的字体设置与修补过的函式库]]时)。<br />
* 长远来看,可以省下那些因软件包管理器的失误,解决问题和清除冲突所浪费的宝贵时间。<br />
<br />
实际操作上有几种方式,有必要的话可任由软件包管理员采用。以下所举出的操作方式相当有效率,即使字体数目众多也相当安全。<br />
<br />
* 我们要将字体来源位置 (例如 {{ic|/usr/share/fonts.avail}}:这是我们要存放字体的位置) 和包含字体集软链接的目录 ({{ic|/usr/share/fonts}}) 给分隔开来。<br />
<br />
* 将每个字体集分别放在一个明确命名的子目录下。命名规则必须一致且明确,例如这样:<br />
<br />
{{bc|<nowiki><br />
<ttf|otf|t1>-<字体作者或组织(选用)>-<字体集名称><br />
</nowiki>}}<br />
<br />
字体来源目录的内容会长得像这样:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts.avail<br />
<br />
/usr/share/fonts.avail/otf-heuristica<br />
/usr/share/fonts.avail/ttf-liberation<br />
/usr/share/fonts.avail/ttf-ms-arial<br />
...<br />
</nowiki>}}<br />
<br />
* 我们不会涉及到 TeX Live 的字体目录,以避免 LaTeX 软件发生任何问题。既然我们可以使用多个位置,我们将在 {{ic|/usr/share/fonts}} 创建软链接,让应用程序可以访问特定的字体集:<br />
<br />
{{bc|<nowiki><br />
# cd /usr/share/fonts<br />
# ln -s ../fonts.avail/otf-heuristica .<br />
# ln -s /opt/texlive/texmf-dist/fonts/truetype/public/opensans ttf-texlive-open.sans<br />
</nowiki>}}<br />
<br />
结果如下:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts<br />
<br />
ttf-liberation -> ..fonts.avail/ttf-liberation<br />
ttf-ms-arial -> ..fonts.avail/ttf-ms-arial<br />
otf-heuristica -> ..fonts.avail/otf-heuristica<br />
otf-texlive-tex.gyre -> /opt/texlive/texmf-dist/fonts/opentype/public/tex-gyre<br />
ttf-texlive-open.sans -> /opt/texlive/texmf-dist/fonts/truetype/public/opensans<br />
...<br />
</nowiki>}}<br />
<br />
最后,依照惯例执行:<br />
<br />
{{bc|<nowiki><br />
# fc-cache && mkfontscale && mkfontdir<br />
</nowiki>}}<br />
<br />
[[TeXLive (简体中文)|TeX Live]] Wiki 文章内也有一个类似做法,比较简单,但更适用于单一用户的情形,而非全局设置。<br />
<br />
==== 过老的应用程序 ====<br />
<br />
过老而不支持 fontconfig 的应用程序(例如 GTK+ 1.x 应用,及 {{ic|xfontsel}}),需要在字体目录创建索引:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
或在一条命令中包含多个目录:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
或者如果字体被安装在一个不同的子文件夹,比如在 {{ic|/usr/share/fonts}} 下:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
有时候 X server 可能会不能成功加载字体目录,这时你需要重新扫描 {{ic|fonts.dir}} 文件:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
查询字体是否已经生效,可以使用:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{注意|许多软件包会自动配置 Xorg 安装时需要的字体。若这样,便可跳过此步。}}<br />
<br />
为了让 [[Xorg]] 找到并使用你新安装的字体,你必须把字体路径加入到 {{ic|/etc/X11/xorg.conf}}(另一个 X.Org 配置文件或许也可以)。<br />
<br />
这个例子演示了必须加入到 {{ic|/etc/X11/xorg.conf}} 中的代码片断。请根据你的实际需要添加或删除路径。<br />
# 让 X.Org 知道自定义字体目录<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango 警告 ===<br />
当你的系统中安装了[http://www.pango.org/ Pango],它会从 [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] 查找字体来源。<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
如果你看到类似的错误,或在应用程序中看到方块而不是文字,这表示你需要添加字体并更新字体缓存。以下示例使用{{Pkg|ttf-liberation}}字体讲解如何解决这个问题。使用 root 权限运行如下命令可以使字体在系统范围内生效。<br />
<br />
# pacman -S ttf-liberation<br />
-- output abbreviated, assumes installation succeeded -- <br />
<br />
# fc-cache -vfs<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory <br />
fc-cache: succeeded<br />
<br />
你可以这样测试一个正在设置的默认字体:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== 终端字体 ==<br />
<br />
{{注意|这部分是关于 [[Wikipedia:Linux console|Linux console]]。如果您想获取其它的更加丰富的关于终端的解决方案 (完备的 Unicode 字体, 现代的图形化配适器,等等。), 请参照 [[fbterm]], [[KMSCON]] 或者类似的项目.}}<br />
<br />
默认情况下, [[Wikipedia:Virtual console|virtual console]] 使用内核的内置字体,其包含 [[Wikipedia:CP437|CP437]] 字体集,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> 但是这个设置可以非常容易改变.<br />
<br />
[[Wikipedia:Linux console|Linux console]] 默认使用 UTF-8 编码, 但是由于使用的是标准的兼容 VGA 的帧缓存, 终端字体限定为 256 或 512 个字形。如果字体超出了256个字形, 那么颜色的数量就会从 16 减少到 8。为了针对给定的 Unicode z值分配正确的可显示符号,一种特殊的翻译映射,通常叫做 ''unimap'',是必须的。 就目前来看大多数终端字体都具有内置的 ''unimap'', 但是历史上它是需要被单独载入的。<br />
<br />
{{Pkg|kbd}} 包提供了改变虚拟终端字体和字体映射的工具。可以使用的字体存储在 {{ic|/usr/share/kbd/consolefonts/}} 目录下, 那些以 ''.psfu'' 或者 ''.psfu.gz'' 结尾的具有一个内嵌的 Unicode 翻译映射。<br />
<br />
键盘映射 (Keymap) 是按键和计算机使用字符的对应关系表,可以在 {{ic|/usr/share/kbd/keymaps/}} 的子目录下找到,详情请查看 [[Keyboard configuration in console]] 。<br />
<br />
{{注意|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== 预览和测试 ===<br />
<br />
{{提示|这里有一个整理过的预览影像数据库:[http://alexandre.deverteuil.net/pages/consolefonts/ Linux 终端字体截图]。}}<br />
<br />
''showconsolefont'' 指令会以表格形式显示可用字与字符:<br />
<br />
$ showconsolefont<br />
<br />
''setfont'' 工具可以暂时改变字体,让用户可以决定是否要设为永久性设置。只要指定字体名称即可 (这些字体位于 {{ic|/usr/share/kbd/consolefonts/}}),比如:<br />
<br />
$ setfont lat2-16<br />
<br />
如果对新换的字体不满意,可以用以下指令撤消至默认字体 (就算终端显示乱码,这个指令依然可以执行,将指令「盲打」进去即可):<br />
<br />
$ setfont<br />
<br />
{{注意|''setfont'' 只作用于当前正在使用的终端。其它终端无论活跃与否都不受影响。}}<br />
<br />
=== 持久性配置 ===<br />
<br />
{{ic|/etc/vconsole.conf}} 的 {{ic|FONT}} 变量可以用来在启动时设置字体, 对于所有的终端都具有持久性作用。详情请查看 {{ic|man 5 vconsole.conf}} 。<br />
<br />
若要显示 ''Č, ž, đ, š'' 或 ''Ł, ę, ą, ś'' 之类的字符,请使用 {{ic|lat2-16.psfu.gz}} 这个字体:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
<br />
}}<br />
<br />
这代表使用 ISO/IEC 8859 字符的第二部分,尺寸设置为 16。您可以使用其它值更改字体尺寸 (如 {{ic|lat2-08}})。您可以在[[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia的这张表]]查询 8859 规范定义的本地。<br />
<br />
若要为早期的用户空间套用指定字体,请在 {{ic|/etc/mkinitcpio.conf}} 使用 {{ic|consolefont}} 勾子。更多信息请参阅 [[Mkinitcpio (简体中文)#钩子(HOOKS)]]。<br />
<br />
如果开机时字体没有任何变化,或只变化一下就恢复原样,则有可能是因为显卡驱动引导时字体被复位,然后终端被切至帧缓冲 (framebuffer)。提早装入图形驱动可以避免这个问题。若要在套用 {{ic|/etc/vconsole.conf}} 之前将帧缓冲准备好,请参阅[[Kernel mode setting (简体中文)#KMS 早启动|核心模式设置#提早引导 KMS]]、[https://bbs.archlinux.org/viewtopic.php?id=145765] 或其它方式。<br />
<br />
==字体包==<br />
以下是官方源和 [[Arch User Repository (简体中文)|AUR]] 中提供的安装包列表以供参考。支持 Unicode 的字体都标注上了“Unicode”字样。欲知详情请查看具体项目或维基百科。<br />
<br />
Github用户Ternstor编写了一段python脚本,可以通过在 AUR 和官方源中所有字体的 PNG 图像产生 HTML 文件: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== 盲文点字 ===<br />
<br />
*{{Pkg|ttf-ubraille}} - 包含 Unicode '''盲文点字'''符号的字体。<br />
<br />
=== 数学和符号字体===<br />
<br />
*{{Pkg|ttf-symbola}} - 提供许多 Unicode 符号,包括 Emoji<br />
*{{Pkg|font-mathematica}} - Wolfram 公司的 Mathematica 字体<br />
*{{Pkg|texlive-core}}, {{Pkg|texlive-fontsextra}} 包含许多数学字体,如拉丁符号。<br />
*{{Pkg|noto-fonts-emoji}} - Google 的 emoji 字体<br />
*{{AUR|ttf-mathtype}} - MathType 字体<br />
*{{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
*{{AUR|otf-latin-modern}}, {{AUR|otf-latinmodern-math}} -Computer Modern fonts 的改进版本<br />
*{{AUR|otf-xits}} - STIX 字体的 OpenType 实现,以及对从右到左的书写支持。<br />
*{{AUR|emojione-color-font}} -完整、独立、开源的 Emoji 字体集,专心于设计正确<br />
*{{AUR|twemoji-color-font}} - Twitter 的开源 Emoji 字形<br />
<br />
<br />
<br />
=== 非英文使用者 ===<br />
<br />
应用程序与浏览器会根据 fontconfig 设置和 Unicode 文字可用的字体来选择其显示字体。用指令 {{ic|<nowiki>fc-list :lang="双字母的语言代码"</nowiki>}} 枚举系统安装了哪些可对应该语言的字体。例如,枚举已经安装的阿拉伯文字体,以及支持阿拉伯字的字体:<br />
{{hc|$ fc-list :lang&#61;ar &#124; cut -d: -f1|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
若要在多国语言的网站(如Wikipedia、Arch Linux Wiki)中正确显示字形,需要安装下列一项软件包:<br />
* 谷歌的 [http://www.google.com/get/noto/ Noto] 字体家族旨在支持所有语言。请安装 {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} 和 {{Pkg|noto-fonts-emoji}} 软件包。<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== 中日韩越文字 ====<br />
<br />
===== Pan-CJK =====<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Google Noto CJK 字体, 提供简体中文、繁体中文、日文、韩文一致的设计和外观。它是基于 {{Pkg|adobe-source-han-sans-otc-fonts}} 重贴的商标。<br />
*{{Pkg|adobe-source-han-sans-otc-fonts}} - 思源黑体, 是由 Adobe 与 Google 合资开发的,囊括简体中文、繁体中文、日文、韩文字形和来自 Source Sans 字体家族的拉丁文、希腊文和西里尔文字形的高质量无衬线 OpenType 字体。<br />
<br />
===== 中文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-cn-fonts}} - 思源黑体简体中文部分<br />
*{{Pkg|adobe-source-han-sans-tw-fonts}} - 思源黑体繁体中文部分<br />
*{{Pkg|wqy-microhei}} - 文泉驿微米黑,无衬线形式的高质量中日韩越 (CJKV) 轮廓字体。<br />
*{{Pkg|wqy-zenhei}} - 文泉驿正黑,黑体 (无衬线) 的中文轮廓字体,附带文泉驿点阵宋体 (也支持部分日韩字符)。<br />
*{{Pkg|ttf-arphic-ukai}} - '''楷书''' (带有笔触) Unicode 字体 (推荐启用反锯齿)<br />
*{{Pkg|ttf-arphic-uming}} - '''明体''' (印刷) Unicode 字体<br />
*{{Pkg|opendesktop-fonts}} - '''新宋'''字体,之前为 ttf-fireflysung<br />
*{{Pkg|wqy-bitmapfont}} - 文泉驿点阵宋体 (衬线) 中文字体<br />
*{{Pkg|ttf-hannom}} - 中文、越南文 TrueType 字体<br />
*{{AUR|ttf-tw}} - (繁体)台湾教育部发行的标准楷书、宋体字体<br />
<br />
===== 日文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-jp-fonts}} - 思源黑体日文部分<br />
*{{Pkg|otf-ipafont}} - 正式的日文哥特体(无衬线)与明朝体 (衬线)字形集,高质量的开源字体之一,openSUSE-ja 的默认字形。<br />
*{{Pkg|ttf-hanazono}} - 一款免费的日文汉字字体,Mincho(衬线)风格。<br />
*{{Pkg|ttf-sazanami}} - 自由的日文 TrueType 字体。已经过期无人维护,但在某些环境下可当作备用字体使用。<br />
*{{AUR|ttf-vlgothic}} - 日文哥特体字形。Debian/Fedora/Vine Linux 的默认字体<br />
*{{AUR|ttf-mplus}} - 现代哥特体的日文轮廓字体。包含所有日文平假名/片假名、Basic Latin、Latin-1 Supplement、Latin Extended-A、IPA Extensions。另外还有大部分日文汉字、希腊字母、西里尔字与越南文字,可以 7 磅 (等比例) 或 5 磅 (等宽) 字重显示。<br />
*{{AUR|ttf-monapo}} - 日文字体,可正确显示 [[wikipedia:2channel_Shift_JIS_art|2ch 的 Shift JIS 艺术创作]]。<br />
<br />
===== 韩文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-kr-fonts}} - 思源黑体韩文部分<br />
*{{Pkg|ttf-baekmuk}} - 韩文 TrueType 字体集合<br />
*{{AUR|ttf-nanum}} - Nanum 系列 TrueType 字体<br />
*{{AUR|ttf-nanumgothic_coding}} - Nanum 系列 TrueType 等宽字体<br />
*{{AUR|ttf-d2coding}} - 由 Naver 制作的 TrueType 等宽字体<br />
*{{AUR|spoqa-han-sans}} - 由 Spoqa 定制的 Source Han Sans 字体。<br />
<br />
<br />
==== 阿拉伯和乌尔都文字 ====<br />
<br />
*{{AUR|ttf-qurancomplex-fonts}} - 位于麦地那的 King Fahd Glorious Quran Printing Complex 制作的字体<br />
*{{AUR|ttf-amiri}} - 一个典型的阿拉伯文誊抄体 (Naskh) 字体,一开始由 Amiria Press 采用<br />
*{{AUR|ttf-sil-lateef}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-sil-scheherazade}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-arabeyes-fonts}} - 自由的阿拉伯文字体集合<br />
*{{AUR|ttf-urdufonts}} - Urdu 字体<br />
<br />
==== 波斯文字 ====<br />
<br />
*{{AUR|ttf-irfonts}} - 伊朗信息与通信技术高级理事会(SCICT)的官方标准波斯字体集<br />
*{{AUR|ttf-borna}} - Borna Rayaneh 波斯 B 字体系列<br />
*{{AUR|ttf-x2}} - X 系列 2 字体是建立在开源可使用的字体基础上并扩展支持波斯语,阿拉伯语,乌尔都语,普什图语,达里语,乌兹别克语,库尔德语,维吾尔语,老土耳其(奥斯曼)和现代土耳其(罗马).<br />
*{{AUR|ttf-iran-nastaliq}} - 由伊朗信息高级理事会公布的一款 Unicode 书法字体<br />
<br />
==== 缅甸文字 ====<br />
<br />
*{{AUR|ttf-myanmar-fonts}} - 源自myordbok.com的121款字体''(AUR)''<br />
<br />
==== 西里尔文字 ====<br />
<br />
另请参阅[[#等宽字体]]、[[#无衬线字体]]和[[#衬线字体]]<br />
*{{AUR|ttf-paratype}} - ParaType类别的字体: sans, serif, mono, 扩展的西里尔和拉丁文字, OFL 认证<br />
<br />
==== 希腊文字 ====<br />
<br />
几乎所有 Unicode 字体都包含希腊代码集 (也包含多调变音符号),某些额外字体包虽然未包含完整的 Unicode 集,但拥有高质量的希腊字字形 (也包含拉丁字):<br />
*{{AUR|otf-gfs}} - 由 Greek Font Society 选用的 OpenType 字体<br />
*{{AUR|ttf-mgopen}} - 来自 Magenta 的专业 TrueType 字体<br />
<br />
==== 希伯来文字 ====<br />
<br />
*{{AUR|culmus}} - 自由的希伯来文字体集合<br />
<br />
==== 印地文字 ====<br />
<br />
*{{Pkg|ttf-freebanglafont}} - 孟加拉文字体<br />
*{{Pkg|ttf-indic-otf}} - 印地文 OpenType 字体集合 (包含 ttf-freebanglafont)<br />
:(This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - 来自 Fedora 专案的印地文 TrueType 字体 (包含 Oriya 字体以及更多)<br />
* {{AUR|ttf-devanagarifonts}} - 梵文TrueType字体(包含 283 种字体)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF 古吉拉特 fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== 高棉文字 ====<br />
<br />
*{{Pkg|ttf-khmer}} - 涵盖高棉语 (Khmer) 文字的字体<br />
*[https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== 僧伽罗文字 ====<br />
<br />
*{{AUR|ttf-lklug}} - 僧伽罗文 (Sinhala) Unicode 字体<br />
<br />
==== 塔米尔文字 ====<br />
<br />
*{{AUR|ttf-tamil}} - 塔米尔文 (Tamil) Unicode 字体<br />
<br />
==== 藏文字 ====<br />
<br />
*{{Pkg|ttf-tibetan-machine}} - 藏文 (Tibetan) Machine TTFont<br />
<br />
=== Microsoft 字体 ===<br />
<br />
参阅[[Microsoft fonts (简体中文)|微软字体]]。<br />
<br />
=== Apple OS X 字体 ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType 字体<br />
* {{AUR|ttf-mac}}{{Broken package link|{{aur-mirror|ttf-mac}}}} - Mac OS X TrueType 字体。这个软件包没有内含 ttf 字体 (只有 otf 字体),用户必须自备这些字体。<br />
<br />
=== 等宽字体 ===<br />
<br />
建议:每位用户偏爱的字体不尽不同,如想找到您心目中的理想字体,还请多加尝试。 <br />
如果您没有太多时间,可以阅读 Dan Benjamin 博客的文章:[http://hivelogic.com/articles/top-10-programming-fonts 十大最适合编程的字体](英文)。<br />
<br />
这里内还有 Trevor Lowing 整理的一长串字体清单:http://www.lowing.org/fonts/ (英文)。<br />
<br />
Slant 上的字体图片比较: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts 最好的编程字体是什么?](英文)<br />
<br />
还有 Stack Overflow 上的带一些图片的回答: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming 推荐编程字体](英文)。<br />
<br />
==== TrueType 字体 ====<br />
<br />
* Agave ({{AUR|ttf-agave}}{{Broken package link|{{aur-mirror|ttf-agave}}}})<br />
* [[Wikipedia:zh:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* Anka/Coder ({{AUR|ttf-anka-coder}}{{Broken package link|{{aur-mirror|ttf-anka-coder}}}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{Pkg|ttf-anonymous-pro}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:zh:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:zh:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows 下的编程用字体<br />
* [[Wikipedia:zh:Courier|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Courier New 替换 (metric-compatible)<br />
* [[Wikipedia:zh:DejaVu字体|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:zh:Droid|Droid Sans Mono]] ({{Pkg|ttf-droid}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* Envy Code R ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} 或 {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}) - 极佳的编程用字体<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - 加入一些亲近编程人员的调整<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - 取代 Courier New,基于Cousine (metric-compatible)。<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (包含于 {{AUR|jre}} 软件包)<br />
* [[Wikipedia:zh:Monaco|Monaco]] ({{AUR|ttf-monaco}}) - OSX/Textmate 下知名的编程用字体<br />
* Monofur ({{AUR|ttf-monofur}}) <br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== 点阵字体 ====<br />
*Default 8x16<br />
*Dina ({{Pkg|dina-font}})<br />
*[http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
*Lime ({{Pkg|artwiz-fonts}})<br />
*[[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
*[[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
*Proggy opti cyrillic ({{AUR|proggyopticyr-font}}{{Broken package link|{{aur-mirror|proggyopticyr-font}}}})<br />
*Tamsyn ({{Pkg|tamsyn-font}})<br />
*[http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
*Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== 无衬线字体 ===<br />
<br />
*[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}},包含于 {{AUR|ttf-sil-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
*Arimo ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Arial 替换 (metric-compatible)<br />
*[[Wikipedia:zh:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:zh:Droid|Droid Sans]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}},取代 Arial, 基于 Arimo (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
*[[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - 3 种主要变体:正常、变窄与标题 - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
*[[Wikipedia:zh:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
*[[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Ubuntu-Title|Ubuntu-Title]] ({{AUR|ttf-ubuntu-title}}{{Broken package link|{{aur-mirror|ttf-ubuntu-title}}}})<br />
*[[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
*[[Wikipedia:zh:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 手写体 ===<br />
<br />
*[[Wikipedia:zh:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 衬线字体 ===<br />
*[[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Charis SIL|Charis]] ({{AUR|ttf-charis}}{{Broken package link|{{aur-mirror|ttf-charis}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:Doulos SIL|Doulos]] ({{AUR|doulos-sil}}{{Broken package link|{{aur-mirror|doulos-sil}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:Droid|Droid Serif]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、希腊字、西里尔字、音标字母<br />
*[[Wikipedia:zh:Georgia (字型)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - 取代 Times New Roman,基于Tinos (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode:拉丁字、希腊字、西里尔字、希伯来字<br />
*[[Wikipedia:zh:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
*Tinos ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Times New Roman 替换 (metric-compatible)<br />
<br />
=== 未分类字体 ===<br />
<!--这里的内容应该被分类放入衬线字体,无衬线字体和等宽字体小节内--><br />
*{{AUR|ttf-google-fonts-git}} 与 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} — 一个免费字体的大合集(囊括里 ubuntu、inconsolata、droid 等字体)-注意:如果安装这个包,您的系统内将添加 100 多个字体,这将会使您的字体对话框变得很长。{{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 会从上游网络字体项目中拖下整个 Mercurial 库。{{AUR|ttf-google-fonts-git}}则会从 Git 中拖下一个更小,更精简的非官方库。''(AUR)''<br />
*{{Pkg|ttf-mph-2b-damase}} — Covers full plane 1 and several scripts<br />
*{{Pkg|ttf-symbola}} — 提供了绘文字及其它一些符号。<br />
*{{AUR|ttf-sil-fonts}} — STL 内的 Gentium, Charis, Doulos, Andika and Abyssinica ''(AUR)''<br />
*{{Pkg|font-bh-ttf}} — X.Org Luxi 字体<br />
*{{Pkg|ttf-cheapskate}} — 从 ''dustismo.com'' 收集来的字体库<br />
*{{AUR|ttf-isabella}}{{Broken package link|{{aur-mirror|ttf-isabella}}}} — 一款书法字体,基于 1497 年的 ''Isabella Breviary''<br />
*{{Pkg|ttf-junicode}} — Junius 字体,几乎包括了所有中世纪的拉丁文字形<br />
*arkpandorafonts {{AUR|ttf-arkpandora}}{{Broken package link|{{aur-mirror|ttf-arkpandora}}}} — Arial 与 Times New Roman 字体的一个替代字体 ''(AUR)''<br />
*{{Pkg|xorg-fonts-type1}} — IBM Courier 和 Adobe Utopia 的 [[Wikipedia:PostScript fonts|PostScript 字体]]<br />
<br />
== X11中的字体回滚顺序 ==<br />
Fontconfig 会自动选择一个符合当前场景的字体。也就是说,如果有人正在浏览一个既有英文又有中文的窗口,而默认的字体不支持中文,它会自动切换到另一种字体以便显示中文。<br />
<br />
Fontconfig 让每个用户能够通过{{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}来调整字体被使用的顺序。<br />
如果你想要在最喜欢的Serif字体之后使用某个特定的中文字体,你的配置文件看起来会是这样:<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>你喜欢的拉丁衬线字体名称</family><br />
<family>你的中文衬线字体名称</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
当然你也可以为 Sans-serif和 monospace 字体像上面一样添加一段。更多信息请参考 fontconfig 说明。<br />
<br />
== 字体别名 ==<br />
在 Linux 系统中有几种字体别名,它们实际代表着别的字体,这样以达到让应用程序的字体看起来类似。最常见的别名有:{{ic|serif}} 代表一种[[Wikipedia:zh:衬线体|衬线体]](关于衬线体与非衬线体概念请参考[http://wiki.ubuntu.org.cn/%E5%AD%97%E4%BD%93#.E5.9F.BA.E7.A1.80.E7.9F.A5.E8.AF.86 UbuntuCN:字体#基础知识]——译注)(例如 DejaVu Serif、宋体);{{ic|sans-serif}}代表一种[[Wikipedia:zh:无衬线体|无衬线体]](例如 DejaVu Sans 和各种黑体);而{{ic|monospace}} 则代表[[Wikipedia:zh:等宽字体|等宽字体]](例如 DejaVu Sans Mono)。 然而,这些别名所代表的字体有可能会变化,而且通常 KDE 和其他桌面环境中的字体管理工具不会显示其内在联系。<br />
<br />
如果想通过别名反向查找是哪种字体被展现出来,运行:<br />
$ fc-match monospace<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
<br />
在这种情况下 Monospace 别名展现的是 DejaVuSansMono.ttf 字体。<br />
<br />
== 小提示 ==<br />
<br />
=== 列出已安装字体 ===<br />
你可以使用以下命令来列出当前系统中所有已安装字体的字体:<br />
<br />
$ fc-list<br />
<br />
=== 应用程序专用的字体高速缓冲 ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} 或 {{pkg|python2-matplotlib}}) 使用自己的字体高速缓冲,因此更新字体后记得删除 {{ic|$HOME/.matplotlib/fontList.cache}},{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}} 等文件。这样它才会再一次产生高速缓冲并找到新字体 [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html]。<br />
<br />
<br />
== 参见 ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Fonts_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452908Fonts (简体中文)2016-10-04T14:59:16Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Fonts (简体中文)]]<br />
[[Category:Graphics and desktop publishing (简体中文)]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[en:Fonts]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-TW:Fonts]]<br />
{{translateme (简体中文)}}<br />
{{Related articles start (简体中文)}}<br />
{{Related2|Font Configuration (简体中文)|字体设定}}<br />
{{Related2|MS Fonts (简体中文)|微软字体}}<br />
{{Related2|Java Fonts - Sun JRE|Java 环境字体(英文)}}<br />
{{Related2|Infinality (简体中文)|Infinality (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Fonts|2016-09-14|450802}}<br />
引自 [[Wikipedia:zh:计算机字体|维基百科]]:"'''计算机字体'''(computer font),简称'''字体'''(font),是包含有一套字形与字符的电子数据文件。"<br />
<br />
注意:部分字体在许可协议中规定了使用时的法律限制。<br />
<br />
== 字体类型 ==<br />
<br />
现今计算机使用的绝大多数字体,都是属于'''点阵字体'''或者'''轮廓字体'''二者之一。<br />
;点阵字体: 每种字形的每种形式和每种尺寸的图像都由点或者像素组成的矩阵构成。由于位图的原故,点阵字体很难进行缩放,特定的点阵字体只能清晰地显示在相应的字号下。但对于 12-16 px 的小号汉字来说,点阵字体往往比其它类型的字体在屏幕上有更好的显示效果。<br />
;轮廓字体或称矢量字体: 使用贝塞尔曲线、绘图指令和数学公式来描述每种字形,使得字体可以适应各种尺寸。<br />
<br />
=== 常见格式 ===<br />
<br />
* {{ic|bdf}} 与 {{ic|bdf.gz}} – 点阵字体,'''b'''itmap '''d'''istribution '''f'''ormat(位图布局格式)的缩写,后者表示以 gzip 压缩的 {{ic|bdf}}。<br />
* {{ic|pcf}} 与 {{ic|pcf.gz}} – 点阵字体, '''p'''ortable '''c'''ompiled '''f'''ont(可移植编译字体)的缩写,后者表示以 gzip 压缩的 {{ic|pcf}}。<br />
* {{ic|psf}},{{ic|psfu}}与{{ic|psf.gz}},{{ic|psfu.gz}} – 点阵字体,前两者分别是 '''P'''C '''s'''creen '''f'''ont(电脑屏幕字体)与 '''P'''C '''s'''creen '''f'''ont '''U'''nicode(Unicode 电脑屏幕字体)的缩写。两者分别表示用 gzip 压缩的 {{ic|psf}} 与 {{ic|psfu}(不适用于 X.Org)。<br />
* {{ic|pfa}} 与 {{ic|pfb}} – 矢量字体,分别是 '''P'''ostScript '''f'''ont '''A'''SCII 与 '''P'''ostScript '''f'''ont '''b'''inary 的缩写。PostScript 字体内带有打印指令。<br />
* {{ic|ttf}} – outline,'''T'''rue'''T'''ype 字体。作为 PostScript 字体的替代。<br />
* {{ic|otf}} – outline,'''O'''pen'''T'''ype 字体。带有 PostScript 打印指令的 TrueType 字体。<br />
<br />
在多数情况下,TrueType 和 OpenType 的技术差异可以忽略,一些带有 {{ic|ttf}} 扩展的字体实际上是 OpenType 字体。<br />
<br />
=== 其它格式 ===<br />
<br />
排版程序 '''TeX''' 和配套的字体软件 '''Metafont''' 用它们自己的方法渲染字体。部分用于这两个程序的字体的文件后缀有 {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} 与 {{ic|vf}}。<br />
<br />
'''FontForge''',一个字体编辑程序,可以用自己的格式来储存字体,例如 {{ic|sfd}} (''s''pline ''f''ont ''d''atabase)。<br />
<br />
[http://www.w3.org/TR/SVG/fonts.html SVG] 格式也有自己的字体描述方法。<br />
<br />
== 安装 ==<br />
<br />
你可以使用多种方法安装字体。<br />
<br />
=== Pacman ===<br />
<br />
有效的源中的字体和字体集可以使用 [[pacman]] 来安装。 可以使用以下方式查找字体:<br />
$ pacman -Ss font<br />
或者也可以只查找 {{ic|ttf}} 字体:<br />
$ pacman -Ss ttf<br />
<br />
=== 创建字体包 ===<br />
<br />
如果您想用 pacman 来管理你自己的字体,可以创建一个 Arch 软件包。这些包也可以在 [[Arch User Repository (简体中文)|AUR]] 中与社区成员分享。下面是一个创建软件包的基本样例。您还可以参考 [[PKGBUILD (简体中文)|PKGBUILD]] 来获取更多有关创建软件包的资料。<br />
<br />
{{bc|<nowiki><br />
pkgname=ttf-fontname<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="custom fonts"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -d "$pkgdir/usr/share/fonts/TTF"<br />
install -m644 "$srcdir/$pkgname/"*.ttf "$pkgdir/usr/share/fonts/TTF/"<br />
}<br />
</nowiki>}}<br />
<br />
PKGBUILD 推断这些字体是 TrueType 字体。需要创建一个安装文件 ({{ic|ttf-fontname.install}}) 以便更新字体缓存:<br />
<br />
{{bc|<nowiki><br />
post_install() {<br />
echo -n "Updating font cache... "<br />
fc-cache >/dev/null -f<br />
mkfontscale /usr/share/fonts/TTF<br />
mkfontdir /usr/share/fonts/TTF<br />
echo done<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
如果想更方便地从TTFs创建自己的包,可以使用 [[Arch User Repository (简体中文)|AUR]] 中的 {{AUR|makefontpkg}}。<br />
<br />
=== 手动安装字体 ===<br />
<br />
要安装不在源中的字体,推荐的方法请参考[[#创建字体包]]。这样使得 pacman 在以后能够更新或者移除它们。当然字体也可以通过手工方式安装。<br />
<br />
要在系统范围内(对所有用户有效)安装字体,请将文件夹移动到 {{ic|/usr/share/fonts/}} 目录。这些文件需要对每个用户而言都是可读的,使用 [[chmod]] 来设置合理的权限 (比如,文件至少为 {{ic|0444}} ,而目录至少为 {{ic|0555}})。要为单个用户安装字体,请使用 {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} 现在已经过时了)。<br />
要让 Xserver 能直接载入字体(而不使用某些'''字体服务'''),就需要将新增字体的目录加入到 FontPath 中。它位于[[Xorg#Configuration|您的 Xorg 设置目录]]中(例如 {{ic|/etc/X11/xorg.conf}} 或 {{ic|/etc/xorg.conf}}) 中。更多详细内容请查阅[[#X.Org 中的字体]]{{Broken section link}}<br />
<br />
然后更新 fontconfig 的字体缓存:<br />
<br />
$ fc-cache -vf<br />
<br />
==== 手动安装:高级模式 ====<br />
<br />
如果您有特殊的字体收集需求,例如使用商业字体、使用不同格式的字体、安装/删除字体相当频繁,或只是希望可以更能够控制访问自己的字体资源,那就相当适合用手动的方式来安装维护字体。采用这种方案会获得很多好处:<br />
<br />
* 避免重复安装不同版本、格式的同一种字体集 (经常容易导致渲染问题)。<br />
* 字体可使用多个非标准的实体来源 (例如额外的硬盘、分区)。<br />
* 避免依赖隐晦又占体积的本地字体来源(例如 TeX Live & {{ic|09-texlive-fonts.conf}},或是 AUR 中的某个字体包);使用这些字体来源时,您可能只需要其中的 5 种字体,却必须连带安装其它 55 种不需要的字体。<br />
* 避免字体渲染问题,在您的 fontconfig 配置文件已被修改成与安装在系统的那份不同的格式。<br />
* 只要观察主字体目录下的内容,就能够确定系统上有哪种格式的字体集可供应用程序使用。您不需要复杂、占用大量资源的字体管理程序;{{Pkg|gtk2fontsel}} 和基本的指令工具 (如 {{Pkg|fontconfig}} 软件包下的 {{ic|fc-query}}) 就可以将这件差事办得又快又好。<br />
* 当您安装或升级单一字体,所有应用程序都可以使用新版本字体,包括 LaTeX 相关软件。<br />
* 有必要的话,可以快速启用 / 停用某个字体集,因为您知道它们在哪个目录下(调试时很好用)。<br />
* 不需担心有任何多余的 {{ic|/etc/fonts/conf.avail/nn-foo.conf}} fontconfig 文件会可能与您的渲染设置起冲突 (特别是当您使用[[Font configuration (简体中文)#补丁包|自定的字体设置与修补过的函式库]]时)。<br />
* 长远来看,可以省下那些因软件包管理器的失误,解决问题和清除冲突所浪费的宝贵时间。<br />
<br />
实际操作上有几种方式,有必要的话可任由软件包管理员采用。以下所举出的操作方式相当有效率,即使字体数目众多也相当安全。<br />
<br />
* 我们要将字体来源位置 (例如 {{ic|/usr/share/fonts.avail}}:这是我们要存放字体的位置) 和包含字体集软链接的目录 ({{ic|/usr/share/fonts}}) 给分隔开来。<br />
<br />
* 将每个字体集分别放在一个明确命名的子目录下。命名规则必须一致且明确,例如这样:<br />
<br />
{{bc|<nowiki><br />
<ttf|otf|t1>-<字体作者或组织(选用)>-<字体集名称><br />
</nowiki>}}<br />
<br />
字体来源目录的内容会长得像这样:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts.avail<br />
<br />
/usr/share/fonts.avail/otf-heuristica<br />
/usr/share/fonts.avail/ttf-liberation<br />
/usr/share/fonts.avail/ttf-ms-arial<br />
...<br />
</nowiki>}}<br />
<br />
* 我们不会涉及到 TeX Live 的字体目录,以避免 LaTeX 软件发生任何问题。既然我们可以使用多个位置,我们将在 {{ic|/usr/share/fonts}} 创建软链接,让应用程序可以访问特定的字体集:<br />
<br />
{{bc|<nowiki><br />
# cd /usr/share/fonts<br />
# ln -s ../fonts.avail/otf-heuristica .<br />
# ln -s /opt/texlive/texmf-dist/fonts/truetype/public/opensans ttf-texlive-open.sans<br />
</nowiki>}}<br />
<br />
结果如下:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts<br />
<br />
ttf-liberation -> ..fonts.avail/ttf-liberation<br />
ttf-ms-arial -> ..fonts.avail/ttf-ms-arial<br />
otf-heuristica -> ..fonts.avail/otf-heuristica<br />
otf-texlive-tex.gyre -> /opt/texlive/texmf-dist/fonts/opentype/public/tex-gyre<br />
ttf-texlive-open.sans -> /opt/texlive/texmf-dist/fonts/truetype/public/opensans<br />
...<br />
</nowiki>}}<br />
<br />
最后,依照惯例执行:<br />
<br />
{{bc|<nowiki><br />
# fc-cache && mkfontscale && mkfontdir<br />
</nowiki>}}<br />
<br />
[[TeXLive (简体中文)|TeX Live]] Wiki 文章内也有一个类似做法,比较简单,但更适用于单一用户的情形,而非全局设置。<br />
<br />
==== 过老的应用程序 ====<br />
<br />
过老而不支持 fontconfig 的应用程序(例如 GTK+ 1.x 应用,及 {{ic|xfontsel}}),需要在字体目录创建索引:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
或在一条命令中包含多个目录:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
或者如果字体被安装在一个不同的子文件夹,比如在 {{ic|/usr/share/fonts}} 下:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
有时候 X server 可能会不能成功加载字体目录,这时你需要重新扫描 {{ic|fonts.dir}} 文件:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
查询字体是否已经生效,可以使用:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{注意|许多软件包会自动配置 Xorg 安装时需要的字体。若这样,便可跳过此步。}}<br />
<br />
为了让 [[Xorg]] 找到并使用你新安装的字体,你必须把字体路径加入到 {{ic|/etc/X11/xorg.conf}}(另一个 X.Org 配置文件或许也可以)。<br />
<br />
这个例子演示了必须加入到 {{ic|/etc/X11/xorg.conf}} 中的代码片断。请根据你的实际需要添加或删除路径。<br />
# 让 X.Org 知道自定义字体目录<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango 警告 ===<br />
当你的系统中安装了[http://www.pango.org/ Pango],它会从 [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] 查找字体来源。<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
如果你看到类似的错误,或在应用程序中看到方块而不是文字,这表示你需要添加字体并更新字体缓存。以下示例使用{{Pkg|ttf-liberation}}字体讲解如何解决这个问题。使用 root 权限运行如下命令可以使字体在系统范围内生效。<br />
<br />
# pacman -S ttf-liberation<br />
-- output abbreviated, assumes installation succeeded -- <br />
<br />
# fc-cache -vfs<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory <br />
fc-cache: succeeded<br />
<br />
你可以这样测试一个正在设置的默认字体:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== 终端字体 ==<br />
<br />
{{注意|这部分是关于 [[Wikipedia:Linux console|Linux console]]。如果您想获取其它的更加丰富的关于终端的解决方案 (完备的 Unicode 字体, 现代的图形化配适器,等等。), 请参照 [[fbterm]], [[KMSCON]] 或者类似的项目.}}<br />
<br />
默认情况下, [[Wikipedia:Virtual console|virtual console]] 使用内核的内置字体,其包含 [[Wikipedia:CP437|CP437]] 字体集,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> 但是这个设置可以非常容易改变.<br />
<br />
[[Wikipedia:Linux console|Linux console]] 默认使用 UTF-8 编码, 但是由于使用的是标准的兼容 VGA 的帧缓存, 终端字体限定为 256 或 512 个字形。如果字体超出了256个字形, 那么颜色的数量就会从 16 减少到 8。为了针对给定的 Unicode z值分配正确的可显示符号,一种特殊的翻译映射,通常叫做 ''unimap'',是必须的。 就目前来看大多数终端字体都具有内置的 ''unimap'', 但是历史上它是需要被单独载入的。<br />
<br />
{{Pkg|kbd}} 包提供了改变虚拟终端字体和字体映射的工具。可以使用的字体存储在 {{ic|/usr/share/kbd/consolefonts/}} 目录下, 那些以 ''.psfu'' 或者 ''.psfu.gz'' 结尾的具有一个内嵌的 Unicode 翻译映射。<br />
<br />
键盘映射 (Keymap) 是按键和计算机使用字符的对应关系表,可以在 {{ic|/usr/share/kbd/keymaps/}} 的子目录下找到,详情请查看 [[Keyboard configuration in console]] 。<br />
<br />
{{注意|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== 预览和测试 ===<br />
<br />
{{提示|这里有一个整理过的预览影像数据库:[http://alexandre.deverteuil.net/pages/consolefonts/ Linux 终端字体截图]。}}<br />
<br />
''showconsolefont'' 指令会以表格形式显示可用字与字符:<br />
<br />
$ showconsolefont<br />
<br />
''setfont'' 工具可以暂时改变字体,让用户可以决定是否要设为永久性设置。只要指定字体名称即可 (这些字体位于 {{ic|/usr/share/kbd/consolefonts/}}),比如:<br />
<br />
$ setfont lat2-16<br />
<br />
如果对新换的字体不满意,可以用以下指令撤消至默认字体 (就算终端显示乱码,这个指令依然可以执行,将指令「盲打」进去即可):<br />
<br />
$ setfont<br />
<br />
{{注意|''setfont'' 只作用于当前正在使用的终端。其它终端无论活跃与否都不受影响。}}<br />
<br />
=== 持久性配置 ===<br />
<br />
{{ic|/etc/vconsole.conf}} 的 {{ic|FONT}} 变量可以用来在启动时设置字体, 对于所有的终端都具有持久性作用。详情请查看 {{ic|man 5 vconsole.conf}} 。<br />
<br />
若要显示 ''Č, ž, đ, š'' 或 ''Ł, ę, ą, ś'' 之类的字符,请使用 {{ic|lat2-16.psfu.gz}} 这个字体:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
<br />
}}<br />
<br />
这代表使用 ISO/IEC 8859 字符的第二部分,尺寸设置为 16。您可以使用其它值更改字体尺寸 (如 {{ic|lat2-08}})。您可以在[[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia的这张表]]查询 8859 规范定义的本地。<br />
<br />
若要为早期的用户空间套用指定字体,请在 {{ic|/etc/mkinitcpio.conf}} 使用 {{ic|consolefont}} 勾子。更多信息请参阅 [[Mkinitcpio (简体中文)#钩子(HOOKS)]]。<br />
<br />
如果开机时字体没有任何变化,或只变化一下就恢复原样,则有可能是因为显卡驱动引导时字体被复位,然后终端被切至帧缓冲 (framebuffer)。提早装入图形驱动可以避免这个问题。若要在套用 {{ic|/etc/vconsole.conf}} 之前将帧缓冲准备好,请参阅[[Kernel mode setting (简体中文)#KMS 早启动|核心模式设置#提早引导 KMS]]、[https://bbs.archlinux.org/viewtopic.php?id=145765] 或其它方式。<br />
<br />
==字体包==<br />
以下是官方源和 [[Arch User Repository (简体中文)|AUR]] 中提供的安装包列表以供参考。支持 Unicode 的字体都标注上了“Unicode”字样。欲知详情请查看具体项目或维基百科。<br />
<br />
Github用户Ternstor编写了一段python脚本,可以通过在 AUR 和官方源中所有字体的 PNG 图像产生 HTML 文件: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== 盲文点字 ===<br />
<br />
*{{Pkg|ttf-ubraille}} - 包含 Unicode '''盲文点字'''符号的字体。<br />
<br />
=== 数学和符号字体===<br />
<br />
*{{Pkg|ttf-symbola}} - 提供许多 Unicode 符号,包括 Emoji<br />
*{{Pkg|font-mathematica}} - Wolfram 公司的 Mathematica 字体<br />
*{{Pkg|texlive-core}}, {{Pkg|texlive-fontsextra}} 包含许多数学字体,如拉丁符号。<br />
*{{Pkg|noto-fonts-emoji}} - Google 的 emoji 字体<br />
*{{AUR|ttf-mathtype}} - MathType 字体<br />
*{{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
*{{AUR|otf-latin-modern}}, {{AUR|otf-latinmodern-math}} -Computer Modern fonts 的改进版本<br />
*{{AUR|otf-xits}} - STIX 字体的 OpenType 实现,以及对从右到左的书写支持。<br />
*{{AUR|emojione-color-font}} -完整、独立、开源的 Emoji 字体集,专心于设计正确<br />
*{{AUR|twemoji-color-font}} - Twitter 的开源 Emoji 字形<br />
<br />
<br />
<br />
=== 非英文使用者 ===<br />
<br />
应用程序与浏览器会根据 fontconfig 设置和 Unicode 文字可用的字体来选择其显示字体。用指令 {{ic|<nowiki>fc-list :lang="双字母的语言代码"</nowiki>}} 枚举系统安装了哪些可对应该语言的字体。例如,枚举已经安装的阿拉伯文字体,以及支持阿拉伯字的字体:<br />
{{hc|$ fc-list :lang&#61;ar &#124; cut -d: -f1|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
若要在多国语言的网站(如Wikipedia、Arch Linux Wiki)中正确显示字形,需要安装下列一项软件包:<br />
* 谷歌的 [http://www.google.com/get/noto/ Noto] 字体家族旨在支持所有语言。请安装 {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} 和 {{Pkg|noto-fonts-emoji}} 软件包。<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== 中日韩越文字 ====<br />
<br />
===== Pan-CJK =====<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Google Noto CJK 字体, 提供简体中文、繁体中文、日文、韩文一致的设计和外观。它是基于 {{Pkg|adobe-source-han-sans-otc-fonts}} 重贴的商标。<br />
*{{Pkg|adobe-source-han-sans-otc-fonts}} - 思源黑体, 是由 Adobe 与 Google 合资开发的,囊括简体中文、繁体中文、日文、韩文字形和来自 Source Sans 字体家族的拉丁文、希腊文和西里尔文字形的高质量无衬线 OpenType 字体。<br />
<br />
===== 中文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-cn-fonts}} - 思源黑体简体中文部分<br />
*{{Pkg|adobe-source-han-sans-tw-fonts}} - 思源黑体繁体中文部分<br />
*{{Pkg|wqy-microhei}} - 文泉驿微米黑,无衬线形式的高质量中日韩越 (CJKV) 轮廓字体。<br />
*{{Pkg|wqy-zenhei}} - 文泉驿正黑,黑体 (无衬线) 的中文轮廓字体,附带文泉驿点阵宋体 (也支持部分日韩字符)。<br />
*{{Pkg|ttf-arphic-ukai}} - '''楷书''' (带有笔触) Unicode 字体 (推荐启用反锯齿)<br />
*{{Pkg|ttf-arphic-uming}} - '''明体''' (印刷) Unicode 字体<br />
*{{Pkg|opendesktop-fonts}} - '''新宋'''字体,之前为 ttf-fireflysung<br />
*{{Pkg|wqy-bitmapfont}} - 文泉驿点阵宋体 (衬线) 中文字体<br />
*{{Pkg|ttf-hannom}} - 中文、越南文 TrueType 字体<br />
*{{AUR|ttf-tw}} - (繁体)台湾教育部发行的标准楷书、宋体字体<br />
<br />
===== 日文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-jp-fonts}} - 思源黑体日文部分<br />
*{{Pkg|otf-ipafont}} - 正式的日文哥特体(无衬线)与明朝体 (衬线)字形集,高质量的开源字体之一,openSUSE-ja 的默认字形。<br />
*{{Pkg|ttf-hanazono}} - 一款免费的日文汉字字体,Mincho(衬线)风格。<br />
*{{Pkg|ttf-sazanami}} - 自由的日文 TrueType 字体。已经过期无人维护,但在某些环境下可当作备用字体使用。<br />
*{{AUR|ttf-vlgothic}} - 日文哥特体字形。Debian/Fedora/Vine Linux 的默认字体<br />
*{{AUR|ttf-mplus}} - 现代哥特体的日文轮廓字体。包含所有日文平假名/片假名、Basic Latin、Latin-1 Supplement、Latin Extended-A、IPA Extensions。另外还有大部分日文汉字、希腊字母、西里尔字与越南文字,可以 7 磅 (等比例) 或 5 磅 (等宽) 字重显示。<br />
*{{AUR|ttf-monapo}} - 日文字体,可正确显示 [[wikipedia:2channel_Shift_JIS_art|2ch 的 Shift JIS 艺术创作]]。<br />
<br />
===== 韩文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-kr-fonts}} - 思源黑体韩文部分<br />
*{{Pkg|ttf-baekmuk}} - 韩文 TrueType 字体集合<br />
*{{AUR|ttf-nanum}} - Nanum 系列 TrueType 字体<br />
*{{AUR|ttf-nanumgothic_coding}} - Nanum 系列 TrueType 等宽字体<br />
*{{AUR|ttf-d2coding}} - 由 Naver 制作的 TrueType 等宽字体<br />
*{{AUR|spoqa-han-sans}} - 由 Spoqa 定制的 Source Han Sans 字体。<br />
<br />
<br />
==== 阿拉伯和乌尔都文字 ====<br />
<br />
*{{AUR|ttf-qurancomplex-fonts}} - 位于麦地那的 King Fahd Glorious Quran Printing Complex 制作的字体<br />
*{{AUR|ttf-amiri}} - 一个典型的阿拉伯文誊抄体 (Naskh) 字体,一开始由 Amiria Press 采用<br />
*{{AUR|ttf-sil-lateef}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-sil-scheherazade}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-arabeyes-fonts}} - 自由的阿拉伯文字体集合<br />
*{{AUR|ttf-urdufonts}} - Urdu 字体<br />
<br />
==== 波斯文字 ====<br />
<br />
*{{AUR|ttf-irfonts}} - 伊朗信息与通信技术高级理事会(SCICT)的官方标准波斯字体集<br />
*{{AUR|ttf-borna}} - Borna Rayaneh 波斯 B 字体系列<br />
*{{AUR|ttf-x2}} - X 系列 2 字体是建立在开源可使用的字体基础上并扩展支持波斯语,阿拉伯语,乌尔都语,普什图语,达里语,乌兹别克语,库尔德语,维吾尔语,老土耳其(奥斯曼)和现代土耳其(罗马).<br />
*{{AUR|ttf-iran-nastaliq}} - 由伊朗信息高级理事会公布的一款 Unicode 书法字体<br />
<br />
==== 缅甸文字 ====<br />
<br />
*{{AUR|ttf-myanmar-fonts}} - 源自myordbok.com的121款字体''(AUR)''<br />
<br />
==== 西里尔文字 ====<br />
<br />
另请参阅[[#等宽字体]]、[[#无衬线字体]]和[[#衬线字体]]<br />
*{{AUR|ttf-paratype}} - ParaType类别的字体: sans, serif, mono, 扩展的西里尔和拉丁文字, OFL 认证<br />
<br />
==== 希腊文字 ====<br />
<br />
几乎所有 Unicode 字体都包含希腊代码集 (也包含多调变音符号),某些额外字体包虽然未包含完整的 Unicode 集,但拥有高质量的希腊字字形 (也包含拉丁字):<br />
*{{AUR|otf-gfs}} - 由 Greek Font Society 选用的 OpenType 字体<br />
*{{AUR|ttf-mgopen}} - 来自 Magenta 的专业 TrueType 字体<br />
<br />
==== 希伯来文字 ====<br />
<br />
*{{AUR|culmus}} - 自由的希伯来文字体集合<br />
<br />
==== 印地文字 ====<br />
<br />
*{{Pkg|ttf-freebanglafont}} - 孟加拉文字体<br />
*{{Pkg|ttf-indic-otf}} - 印地文 OpenType 字体集合 (包含 ttf-freebanglafont)<br />
:(This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - 来自 Fedora 专案的印地文 TrueType 字体 (包含 Oriya 字体以及更多)<br />
* {{AUR|ttf-devanagarifonts}} - 梵文TrueType字体(包含 283 种字体)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF 古吉拉特 fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== 高棉文字 ====<br />
<br />
*{{Pkg|ttf-khmer}} - 涵盖高棉语 (Khmer) 文字的字体<br />
*[https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== 僧伽罗文字 ====<br />
<br />
*{{AUR|ttf-lklug}} - 僧伽罗文 (Sinhala) Unicode 字体<br />
<br />
==== 塔米尔文字 ====<br />
<br />
*{{AUR|ttf-tamil}} - 塔米尔文 (Tamil) Unicode 字体<br />
<br />
==== 藏文字 ====<br />
<br />
*{{Pkg|ttf-tibetan-machine}} - 藏文 (Tibetan) Machine TTFont<br />
<br />
=== Microsoft 字体 ===<br />
<br />
参阅[[Microsoft Fonts (简体中文)|微软字体]]。<br />
<br />
=== Apple OS X 字体 ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType 字体<br />
* {{AUR|ttf-mac}}{{Broken package link|{{aur-mirror|ttf-mac}}}} - Mac OS X TrueType 字体。这个软件包没有内含 ttf 字体 (只有 otf 字体),用户必须自备这些字体。<br />
<br />
=== 等宽字体 ===<br />
<br />
建议:每位用户偏爱的字体不尽不同,如想找到您心目中的理想字体,还请多加尝试。 <br />
如果您没有太多时间,可以阅读 Dan Benjamin 博客的文章:[http://hivelogic.com/articles/top-10-programming-fonts 十大最适合编程的字体](英文)。<br />
<br />
这里内还有 Trevor Lowing 整理的一长串字体清单:http://www.lowing.org/fonts/ (英文)。<br />
<br />
Slant 上的字体图片比较: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts 最好的编程字体是什么?](英文)<br />
<br />
还有 Stack Overflow 上的带一些图片的回答: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming 推荐编程字体](英文)。<br />
<br />
==== TrueType 字体 ====<br />
<br />
* Agave ({{AUR|ttf-agave}}{{Broken package link|{{aur-mirror|ttf-agave}}}})<br />
* [[Wikipedia:zh:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* Anka/Coder ({{AUR|ttf-anka-coder}}{{Broken package link|{{aur-mirror|ttf-anka-coder}}}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{Pkg|ttf-anonymous-pro}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:zh:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:zh:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows 下的编程用字体<br />
* [[Wikipedia:zh:Courier|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Courier New 替换 (metric-compatible)<br />
* [[Wikipedia:zh:DejaVu字体|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:zh:Droid|Droid Sans Mono]] ({{Pkg|ttf-droid}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* Envy Code R ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} 或 {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}) - 极佳的编程用字体<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - 加入一些亲近编程人员的调整<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - 取代 Courier New,基于Cousine (metric-compatible)。<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (包含于 {{AUR|jre}} 软件包)<br />
* [[Wikipedia:zh:Monaco|Monaco]] ({{AUR|ttf-monaco}}) - OSX/Textmate 下知名的编程用字体<br />
* Monofur ({{AUR|ttf-monofur}}) <br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== 点阵字体 ====<br />
*Default 8x16<br />
*Dina ({{Pkg|dina-font}})<br />
*[http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
*Lime ({{Pkg|artwiz-fonts}})<br />
*[[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
*[[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
*Proggy opti cyrillic ({{AUR|proggyopticyr-font}}{{Broken package link|{{aur-mirror|proggyopticyr-font}}}})<br />
*Tamsyn ({{Pkg|tamsyn-font}})<br />
*[http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
*Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== 无衬线字体 ===<br />
<br />
*[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}},包含于 {{AUR|ttf-sil-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
*Arimo ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Arial 替换 (metric-compatible)<br />
*[[Wikipedia:zh:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:zh:Droid|Droid Sans]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}},取代 Arial, 基于 Arimo (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
*[[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - 3 种主要变体:正常、变窄与标题 - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
*[[Wikipedia:zh:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
*[[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Ubuntu-Title|Ubuntu-Title]] ({{AUR|ttf-ubuntu-title}}{{Broken package link|{{aur-mirror|ttf-ubuntu-title}}}})<br />
*[[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
*[[Wikipedia:zh:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 手写体 ===<br />
<br />
*[[Wikipedia:zh:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 衬线字体 ===<br />
*[[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Charis SIL|Charis]] ({{AUR|ttf-charis}}{{Broken package link|{{aur-mirror|ttf-charis}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:Doulos SIL|Doulos]] ({{AUR|doulos-sil}}{{Broken package link|{{aur-mirror|doulos-sil}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:Droid|Droid Serif]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、希腊字、西里尔字、音标字母<br />
*[[Wikipedia:zh:Georgia (字型)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - 取代 Times New Roman,基于Tinos (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode:拉丁字、希腊字、西里尔字、希伯来字<br />
*[[Wikipedia:zh:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
*Tinos ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Times New Roman 替换 (metric-compatible)<br />
<br />
=== 未分类字体 ===<br />
<!--这里的内容应该被分类放入衬线字体,无衬线字体和等宽字体小节内--><br />
*{{AUR|ttf-google-fonts-git}} 与 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} — 一个免费字体的大合集(囊括里 ubuntu、inconsolata、droid 等字体)-注意:如果安装这个包,您的系统内将添加 100 多个字体,这将会使您的字体对话框变得很长。{{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 会从上游网络字体项目中拖下整个 Mercurial 库。{{AUR|ttf-google-fonts-git}}则会从 Git 中拖下一个更小,更精简的非官方库。''(AUR)''<br />
*{{Pkg|ttf-mph-2b-damase}} — Covers full plane 1 and several scripts<br />
*{{Pkg|ttf-symbola}} — 提供了绘文字及其它一些符号。<br />
*{{AUR|ttf-sil-fonts}} — STL 内的 Gentium, Charis, Doulos, Andika and Abyssinica ''(AUR)''<br />
*{{Pkg|font-bh-ttf}} — X.Org Luxi 字体<br />
*{{Pkg|ttf-cheapskate}} — 从 ''dustismo.com'' 收集来的字体库<br />
*{{AUR|ttf-isabella}}{{Broken package link|{{aur-mirror|ttf-isabella}}}} — 一款书法字体,基于 1497 年的 ''Isabella Breviary''<br />
*{{Pkg|ttf-junicode}} — Junius 字体,几乎包括了所有中世纪的拉丁文字形<br />
*arkpandorafonts {{AUR|ttf-arkpandora}}{{Broken package link|{{aur-mirror|ttf-arkpandora}}}} — Arial 与 Times New Roman 字体的一个替代字体 ''(AUR)''<br />
*{{Pkg|xorg-fonts-type1}} — IBM Courier 和 Adobe Utopia 的 [[Wikipedia:PostScript fonts|PostScript 字体]]<br />
<br />
== X11中的字体回滚顺序 ==<br />
Fontconfig 会自动选择一个符合当前场景的字体。也就是说,如果有人正在浏览一个既有英文又有中文的窗口,而默认的字体不支持中文,它会自动切换到另一种字体以便显示中文。<br />
<br />
Fontconfig 让每个用户能够通过{{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}来调整字体被使用的顺序。<br />
如果你想要在最喜欢的Serif字体之后使用某个特定的中文字体,你的配置文件看起来会是这样:<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>你喜欢的拉丁衬线字体名称</family><br />
<family>你的中文衬线字体名称</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
当然你也可以为 Sans-serif和 monospace 字体像上面一样添加一段。更多信息请参考 fontconfig 说明。<br />
<br />
== 字体别名 ==<br />
在 Linux 系统中有几种字体别名,它们实际代表着别的字体,这样以达到让应用程序的字体看起来类似。最常见的别名有:{{ic|serif}} 代表一种[[Wikipedia:zh:衬线体|衬线体]](关于衬线体与非衬线体概念请参考[http://wiki.ubuntu.org.cn/%E5%AD%97%E4%BD%93#.E5.9F.BA.E7.A1.80.E7.9F.A5.E8.AF.86 UbuntuCN:字体#基础知识]——译注)(例如 DejaVu Serif、宋体);{{ic|sans-serif}}代表一种[[Wikipedia:zh:无衬线体|无衬线体]](例如 DejaVu Sans 和各种黑体);而{{ic|monospace}} 则代表[[Wikipedia:zh:等宽字体|等宽字体]](例如 DejaVu Sans Mono)。 然而,这些别名所代表的字体有可能会变化,而且通常 KDE 和其他桌面环境中的字体管理工具不会显示其内在联系。<br />
<br />
如果想通过别名反向查找是哪种字体被展现出来,运行:<br />
$ fc-match monospace<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
<br />
在这种情况下 Monospace 别名展现的是 DejaVuSansMono.ttf 字体。<br />
<br />
== 小提示 ==<br />
<br />
=== 列出已安装字体 ===<br />
你可以使用以下命令来列出当前系统中所有已安装字体的字体:<br />
<br />
$ fc-list<br />
<br />
=== 应用程序专用的字体高速缓冲 ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} 或 {{pkg|python2-matplotlib}}) 使用自己的字体高速缓冲,因此更新字体后记得删除 {{ic|$HOME/.matplotlib/fontList.cache}},{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}} 等文件。这样它才会再一次产生高速缓冲并找到新字体 [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html]。<br />
<br />
<br />
== 参见 ==<br />
<br />
* [http://behdad.org/text/ State of Text Rendering]</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Fonts_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452907Fonts (简体中文)2016-10-04T14:51:59Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Fonts (简体中文)]]<br />
[[Category:Graphics and desktop publishing (简体中文)]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[en:Fonts]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-TW:Fonts]]<br />
{{translateme (简体中文)}}<br />
{{Related articles start (简体中文)}}<br />
{{Related2|Font Configuration (简体中文)|字体设定}}<br />
{{Related2|MS Fonts (简体中文)|微软字体}}<br />
{{Related2|Java Fonts - Sun JRE|Java 环境字体(英文)}}<br />
{{Related2|Infinality (简体中文)|Infinality (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Fonts|2014-05-24|312432}}<br />
引自 [[Wikipedia:zh:计算机字体|维基百科]]:<br />
:「'''计算机字体'''(computer font),简称'''字体'''(font),是包含有一套字形与字符的电子数据文件。」<br />
<br />
注意,部分字体在许可协议中规定了使用时的法律限制。<br />
<br />
== 字体类型 ==<br />
<br />
现今计算机使用的绝大多数字体,都是属于'''点阵字体'''或者'''轮廓字体'''二者之一。<br />
;点阵字体: 每种字形的每种形式和每种尺寸的图像都由点或者像素组成的矩阵构成。由于位图的原故,点阵字体很难进行缩放,特定的点阵字体只能清晰地显示在相应的字号下。但对于 12-16 px 的小号汉字来说,点阵字体往往比其它类型的字体在屏幕上有更好的显示效果。<br />
;轮廓字体或称矢量字体: 使用贝塞尔曲线、绘图指令和数学公式来描述每种字形,使得字体可以适应各种尺寸。<br />
<br />
=== 常见格式 ===<br />
<br />
* {{ic|bdf}} 与 {{ic|bdf.gz}} – 点阵字体,'''b'''itmap '''d'''istribution '''f'''ormat(位图布局格式)的缩写,后者表示以 gzip 压缩的 {{ic|bdf}}。<br />
* {{ic|pcf}} 与 {{ic|pcf.gz}} – 点阵字体, '''p'''ortable '''c'''ompiled '''f'''ont(可移植编译字体)的缩写,后者表示以 gzip 压缩的 {{ic|pcf}}。<br />
* {{ic|psf}},{{ic|psfu}}与{{ic|psf.gz}},{{ic|psfu.gz}} – 点阵字体,前两者分别是 '''P'''C '''s'''creen '''f'''ont(电脑屏幕字体)与 '''P'''C '''s'''creen '''f'''ont '''U'''nicode(Unicode 电脑屏幕字体)的缩写。两者分别表示用 gzip 压缩的 {{ic|psf}} 与 {{ic|psfu}(不适用于 X.Org)。<br />
* {{ic|pfa}} 与 {{ic|pfb}} – 矢量字体,分别是 '''P'''ostScript '''f'''ont '''A'''SCII 与 '''P'''ostScript '''f'''ont '''b'''inary 的缩写。PostScript 字体内带有打印指令。<br />
* {{ic|ttf}} – outline,'''T'''rue'''T'''ype 字体。作为 PostScript 字体的替代。<br />
* {{ic|otf}} – outline,'''O'''pen'''T'''ype 字体。带有 PostScript 打印指令的 TrueType 字体。<br />
<br />
在多数情况下,TrueType 和 OpenType 的技术差异可以忽略,一些带有 {{ic|ttf}} 扩展的字体实际上是 OpenType 字体。<br />
<br />
=== 其它格式 ===<br />
<br />
排版程序 '''TeX''' 和配套的字体软件 '''Metafont''' 用它们自己的方法渲染字体。部分用于这两个程序的字体的文件后缀有 {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} 与 {{ic|vf}}。<br />
<br />
'''FontForge''',一个字体编辑程序,可以用自己的格式来储存字体,例如 {{ic|sfd}} (''s''pline ''f''ont ''d''atabase)。<br />
<br />
[http://www.w3.org/TR/SVG/fonts.html SVG] 格式也有自己的字体描述方法。<br />
<br />
== 安装 ==<br />
<br />
你可以使用多种方法安装字体。<br />
<br />
=== Pacman ===<br />
<br />
有效的源中的字体和字体集可以使用 [[pacman]] 来安装。 可以使用以下方式查找字体:<br />
$ pacman -Ss font<br />
或者也可以只查找 {{ic|ttf}} 字体:<br />
$ pacman -Ss ttf<br />
<br />
=== 创建字体包 ===<br />
<br />
如果您想用 pacman 来管理你自己的字体,可以创建一个 Arch 软件包。这些包也可以在 [[Arch User Repository (简体中文)|AUR]] 中与社区成员分享。下面是一个创建软件包的基本样例。您还可以参考 [[PKGBUILD (简体中文)|PKGBUILD]] 来获取更多有关创建软件包的资料。<br />
<br />
{{bc|<nowiki><br />
pkgname=ttf-fontname<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="custom fonts"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -d "$pkgdir/usr/share/fonts/TTF"<br />
install -m644 "$srcdir/$pkgname/"*.ttf "$pkgdir/usr/share/fonts/TTF/"<br />
}<br />
</nowiki>}}<br />
<br />
PKGBUILD 推断这些字体是 TrueType 字体。需要创建一个安装文件 ({{ic|ttf-fontname.install}}) 以便更新字体缓存:<br />
<br />
{{bc|<nowiki><br />
post_install() {<br />
echo -n "Updating font cache... "<br />
fc-cache >/dev/null -f<br />
mkfontscale /usr/share/fonts/TTF<br />
mkfontdir /usr/share/fonts/TTF<br />
echo done<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
如果想更方便地从TTFs创建自己的包,可以使用 [[Arch User Repository (简体中文)|AUR]] 中的 {{AUR|makefontpkg}}。<br />
<br />
=== 手动安装字体 ===<br />
<br />
要安装不在源中的字体,推荐的方法请参考[[#创建字体包]]。这样使得 pacman 在以后能够更新或者移除它们。当然字体也可以通过手工方式安装。<br />
<br />
要在系统范围内(对所有用户有效)安装字体,请将文件夹移动到 {{ic|/usr/share/fonts/}} 目录。这些文件需要对每个用户而言都是可读的,使用 [[chmod]] 来设置合理的权限 (比如,文件至少为 {{ic|0444}} ,而目录至少为 {{ic|0555}})。要为单个用户安装字体,请使用 {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} 现在已经过时了)。<br />
要让 Xserver 能直接载入字体(而不使用某些'''字体服务'''),就需要将新增字体的目录加入到 FontPath 中。它位于[[Xorg#Configuration|您的 Xorg 设置目录]]中(例如 {{ic|/etc/X11/xorg.conf}} 或 {{ic|/etc/xorg.conf}}) 中。更多详细内容请查阅[[#X.Org 中的字体]]{{Broken section link}}<br />
<br />
然后更新 fontconfig 的字体缓存:<br />
<br />
$ fc-cache -vf<br />
<br />
==== 手动安装:高级模式 ====<br />
<br />
如果您有特殊的字体收集需求,例如使用商业字体、使用不同格式的字体、安装/删除字体相当频繁,或只是希望可以更能够控制访问自己的字体资源,那就相当适合用手动的方式来安装维护字体。采用这种方案会获得很多好处:<br />
<br />
* 避免重复安装不同版本、格式的同一种字体集 (经常容易导致渲染问题)。<br />
* 字体可使用多个非标准的实体来源 (例如额外的硬盘、分区)。<br />
* 避免依赖隐晦又占体积的本地字体来源(例如 TeX Live & {{ic|09-texlive-fonts.conf}},或是 AUR 中的某个字体包);使用这些字体来源时,您可能只需要其中的 5 种字体,却必须连带安装其它 55 种不需要的字体。<br />
* 避免字体渲染问题,在您的 fontconfig 配置文件已被修改成与安装在系统的那份不同的格式。<br />
* 只要观察主字体目录下的内容,就能够确定系统上有哪种格式的字体集可供应用程序使用。您不需要复杂、占用大量资源的字体管理程序;{{Pkg|gtk2fontsel}} 和基本的指令工具 (如 {{Pkg|fontconfig}} 软件包下的 {{ic|fc-query}}) 就可以将这件差事办得又快又好。<br />
* 当您安装或升级单一字体,所有应用程序都可以使用新版本字体,包括 LaTeX 相关软件。<br />
* 有必要的话,可以快速启用 / 停用某个字体集,因为您知道它们在哪个目录下(调试时很好用)。<br />
* 不需担心有任何多余的 {{ic|/etc/fonts/conf.avail/nn-foo.conf}} fontconfig 文件会可能与您的渲染设置起冲突 (特别是当您使用[[Font configuration (简体中文)#补丁包|自定的字体设置与修补过的函式库]]时)。<br />
* 长远来看,可以省下那些因软件包管理器的失误,解决问题和清除冲突所浪费的宝贵时间。<br />
<br />
实际操作上有几种方式,有必要的话可任由软件包管理员采用。以下所举出的操作方式相当有效率,即使字体数目众多也相当安全。<br />
<br />
* 我们要将字体来源位置 (例如 {{ic|/usr/share/fonts.avail}}:这是我们要存放字体的位置) 和包含字体集软链接的目录 ({{ic|/usr/share/fonts}}) 给分隔开来。<br />
<br />
* 将每个字体集分别放在一个明确命名的子目录下。命名规则必须一致且明确,例如这样:<br />
<br />
{{bc|<nowiki><br />
<ttf|otf|t1>-<字体作者或组织(选用)>-<字体集名称><br />
</nowiki>}}<br />
<br />
字体来源目录的内容会长得像这样:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts.avail<br />
<br />
/usr/share/fonts.avail/otf-heuristica<br />
/usr/share/fonts.avail/ttf-liberation<br />
/usr/share/fonts.avail/ttf-ms-arial<br />
...<br />
</nowiki>}}<br />
<br />
* 我们不会涉及到 TeX Live 的字体目录,以避免 LaTeX 软件发生任何问题。既然我们可以使用多个位置,我们将在 {{ic|/usr/share/fonts}} 创建软链接,让应用程序可以访问特定的字体集:<br />
<br />
{{bc|<nowiki><br />
# cd /usr/share/fonts<br />
# ln -s ../fonts.avail/otf-heuristica .<br />
# ln -s /opt/texlive/texmf-dist/fonts/truetype/public/opensans ttf-texlive-open.sans<br />
</nowiki>}}<br />
<br />
结果如下:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts<br />
<br />
ttf-liberation -> ..fonts.avail/ttf-liberation<br />
ttf-ms-arial -> ..fonts.avail/ttf-ms-arial<br />
otf-heuristica -> ..fonts.avail/otf-heuristica<br />
otf-texlive-tex.gyre -> /opt/texlive/texmf-dist/fonts/opentype/public/tex-gyre<br />
ttf-texlive-open.sans -> /opt/texlive/texmf-dist/fonts/truetype/public/opensans<br />
...<br />
</nowiki>}}<br />
<br />
最后,依照惯例执行:<br />
<br />
{{bc|<nowiki><br />
# fc-cache && mkfontscale && mkfontdir<br />
</nowiki>}}<br />
<br />
[[TeXLive (简体中文)|TeX Live]] Wiki 文章内也有一个类似做法,比较简单,但更适用于单一用户的情形,而非全局设置。<br />
<br />
==== 过老的应用程序 ====<br />
<br />
过老而不支持 fontconfig 的应用程序(例如 GTK+ 1.x 应用,及 {{ic|xfontsel}}),需要在字体目录创建索引:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
或在一条命令中包含多个目录:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
或者如果字体被安装在一个不同的子文件夹,比如在 {{ic|/usr/share/fonts}} 下:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
有时候 X server 可能会不能成功加载字体目录,这时你需要重新扫描 {{ic|fonts.dir}} 文件:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
查询字体是否已经生效,可以使用:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{注意|许多软件包会自动配置 Xorg 安装时需要的字体。若这样,便可跳过此步。}}<br />
<br />
为了让 [[Xorg]] 找到并使用你新安装的字体,你必须把字体路径加入到 {{ic|/etc/X11/xorg.conf}}(另一个 X.Org 配置文件或许也可以)。<br />
<br />
这个例子演示了必须加入到 {{ic|/etc/X11/xorg.conf}} 中的代码片断。请根据你的实际需要添加或删除路径。<br />
# 让 X.Org 知道自定义字体目录<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango 警告 ===<br />
当你的系统中安装了[http://www.pango.org/ Pango],它会从 [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] 查找字体来源。<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
如果你看到类似的错误,或在应用程序中看到方块而不是文字,这表示你需要添加字体并更新字体缓存。以下示例使用{{Pkg|ttf-liberation}}字体讲解如何解决这个问题。使用 root 权限运行如下命令可以使字体在系统范围内生效。<br />
<br />
# pacman -S ttf-liberation<br />
-- output abbreviated, assumes installation succeeded -- <br />
<br />
# fc-cache -vfs<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory <br />
fc-cache: succeeded<br />
<br />
你可以这样测试一个正在设置的默认字体:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== 终端字体 ==<br />
<br />
{{注意|这部分是关于 [[Wikipedia:Linux console|Linux console]]。如果您想获取其它的更加丰富的关于终端的解决方案 (完备的 Unicode 字体, 现代的图形化配适器,等等。), 请参照 [[fbterm]], [[KMSCON]] 或者类似的项目.}}<br />
<br />
默认情况下, [[Wikipedia:Virtual console|virtual console]] 使用内核的内置字体,其包含 [[Wikipedia:CP437|CP437]] 字体集,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> 但是这个设置可以非常容易改变.<br />
<br />
[[Wikipedia:Linux console|Linux console]] 默认使用 UTF-8 编码, 但是由于使用的是标准的兼容 VGA 的帧缓存, 终端字体限定为 256 或 512 个字形。如果字体超出了256个字形, 那么颜色的数量就会从 16 减少到 8。为了针对给定的 Unicode z值分配正确的可显示符号,一种特殊的翻译映射,通常叫做 ''unimap'',是必须的。 就目前来看大多数终端字体都具有内置的 ''unimap'', 但是历史上它是需要被单独载入的。<br />
<br />
{{Pkg|kbd}} 包提供了改变虚拟终端字体和字体映射的工具。可以使用的字体存储在 {{ic|/usr/share/kbd/consolefonts/}} 目录下, 那些以 ''.psfu'' 或者 ''.psfu.gz'' 结尾的具有一个内嵌的 Unicode 翻译映射。<br />
<br />
键盘映射 (Keymap) 是按键和计算机使用字符的对应关系表,可以在 {{ic|/usr/share/kbd/keymaps/}} 的子目录下找到,详情请查看 [[Keyboard configuration in console]] 。<br />
<br />
{{注意|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== 预览和测试 ===<br />
<br />
{{提示|这里有一个整理过的预览影像数据库:[http://alexandre.deverteuil.net/pages/consolefonts/ Linux 终端字体截图]。}}<br />
<br />
''showconsolefont'' 指令会以表格形式显示可用字与字符:<br />
<br />
$ showconsolefont<br />
<br />
''setfont'' 工具可以暂时改变字体,让用户可以决定是否要设为永久性设置。只要指定字体名称即可 (这些字体位于 {{ic|/usr/share/kbd/consolefonts/}}),比如:<br />
<br />
$ setfont lat2-16<br />
<br />
如果对新换的字体不满意,可以用以下指令撤消至默认字体 (就算终端显示乱码,这个指令依然可以执行,将指令「盲打」进去即可):<br />
<br />
$ setfont<br />
<br />
{{注意|''setfont'' 只作用于当前正在使用的终端。其它终端无论活跃与否都不受影响。}}<br />
<br />
=== 持久性配置 ===<br />
<br />
{{ic|/etc/vconsole.conf}} 的 {{ic|FONT}} 变量可以用来在启动时设置字体, 对于所有的终端都具有持久性作用。详情请查看 {{ic|man 5 vconsole.conf}} 。<br />
<br />
若要显示 ''Č, ž, đ, š'' 或 ''Ł, ę, ą, ś'' 之类的字符,请使用 {{ic|lat2-16.psfu.gz}} 这个字体:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
<br />
}}<br />
<br />
这代表使用 ISO/IEC 8859 字符的第二部分,尺寸设置为 16。您可以使用其它值更改字体尺寸 (如 {{ic|lat2-08}})。您可以在[[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia的这张表]]查询 8859 规范定义的本地。<br />
<br />
若要为早期的用户空间套用指定字体,请在 {{ic|/etc/mkinitcpio.conf}} 使用 {{ic|consolefont}} 勾子。更多信息请参阅 [[Mkinitcpio (简体中文)#钩子(HOOKS)]]。<br />
<br />
如果开机时字体没有任何变化,或只变化一下就恢复原样,则有可能是因为显卡驱动引导时字体被复位,然后终端被切至帧缓冲 (framebuffer)。提早装入图形驱动可以避免这个问题。若要在套用 {{ic|/etc/vconsole.conf}} 之前将帧缓冲准备好,请参阅[[Kernel mode setting (简体中文)#KMS 早启动|核心模式设置#提早引导 KMS]]、[https://bbs.archlinux.org/viewtopic.php?id=145765] 或其它方式。<br />
<br />
==字体包==<br />
以下是官方源和 [[Arch User Repository (简体中文)|AUR]] 中提供的安装包列表以供参考。支持 Unicode 的字体都标注上了“Unicode”字样。欲知详情请查看具体项目或维基百科。<br />
<br />
Github用户Ternstor编写了一段python脚本,可以通过在 AUR 和官方源中所有字体的 PNG 图像产生 HTML 文件: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== 盲文点字 ===<br />
<br />
*{{Pkg|ttf-ubraille}} - 包含 Unicode '''盲文点字'''符号的字体。<br />
<br />
=== 数学和符号字体===<br />
<br />
*{{Pkg|ttf-symbola}} - 提供许多 Unicode 符号,包括 Emoji<br />
*{{Pkg|font-mathematica}} - Wolfram 公司的 Mathematica 字体<br />
*{{Pkg|texlive-core}}, {{Pkg|texlive-fontsextra}} 包含许多数学字体,如拉丁符号。<br />
*{{Pkg|noto-fonts-emoji}} - Google 的 emoji 字体<br />
*{{AUR|ttf-mathtype}} - MathType 字体<br />
*{{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
*{{AUR|otf-latin-modern}}, {{AUR|otf-latinmodern-math}} -Computer Modern fonts 的改进版本<br />
*{{AUR|otf-xits}} - STIX 字体的 OpenType 实现,以及对从右到左的书写支持。<br />
*{{AUR|emojione-color-font}} -完整、独立、开源的 Emoji 字体集,专心于设计正确<br />
*{{AUR|twemoji-color-font}} - Twitter 的开源 Emoji 字形<br />
<br />
<br />
<br />
=== 非英文使用者 ===<br />
<br />
应用程序与浏览器会根据 fontconfig 设置和 Unicode 文字可用的字体来选择其显示字体。用指令 {{ic|<nowiki>fc-list :lang="双字母的语言代码"</nowiki>}} 枚举系统安装了哪些可对应该语言的字体。例如,枚举已经安装的阿拉伯文字体,以及支持阿拉伯字的字体:<br />
{{hc|$ fc-list :lang&#61;ar &#124; cut -d: -f1|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
若要在多国语言的网站(如Wikipedia、Arch Linux Wiki)中正确显示字形,需要安装下列一项软件包:<br />
* 谷歌的 [http://www.google.com/get/noto/ Noto] 字体家族旨在支持所有语言。请安装 {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} 和 {{Pkg|noto-fonts-emoji}} 软件包。<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== 中日韩越文字 ====<br />
<br />
===== Pan-CJK =====<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Google Noto CJK 字体, 提供简体中文、繁体中文、日文、韩文一致的设计和外观。它是基于 {{Pkg|adobe-source-han-sans-otc-fonts}} 重贴的商标。<br />
*{{Pkg|adobe-source-han-sans-otc-fonts}} - 思源黑体, 是由 Adobe 与 Google 合资开发的,囊括简体中文、繁体中文、日文、韩文字形和来自 Source Sans 字体家族的拉丁文、希腊文和西里尔文字形的高质量无衬线 OpenType 字体。<br />
<br />
===== 中文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-cn-fonts}} - 思源黑体简体中文部分<br />
*{{Pkg|adobe-source-han-sans-tw-fonts}} - 思源黑体繁体中文部分<br />
*{{Pkg|wqy-microhei}} - 文泉驿微米黑,无衬线形式的高质量中日韩越 (CJKV) 轮廓字体。<br />
*{{Pkg|wqy-zenhei}} - 文泉驿正黑,黑体 (无衬线) 的中文轮廓字体,附带文泉驿点阵宋体 (也支持部分日韩字符)。<br />
*{{Pkg|ttf-arphic-ukai}} - '''楷书''' (带有笔触) Unicode 字体 (推荐启用反锯齿)<br />
*{{Pkg|ttf-arphic-uming}} - '''明体''' (印刷) Unicode 字体<br />
*{{Pkg|opendesktop-fonts}} - '''新宋'''字体,之前为 ttf-fireflysung<br />
*{{Pkg|wqy-bitmapfont}} - 文泉驿点阵宋体 (衬线) 中文字体<br />
*{{Pkg|ttf-hannom}} - 中文、越南文 TrueType 字体<br />
*{{AUR|ttf-tw}} - (繁体)台湾教育部发行的标准楷书、宋体字体<br />
<br />
===== 日文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-jp-fonts}} - 思源黑体日文部分<br />
*{{Pkg|otf-ipafont}} - 正式的日文哥特体(无衬线)与明朝体 (衬线)字形集,高质量的开源字体之一,openSUSE-ja 的默认字形。<br />
*{{Pkg|ttf-hanazono}} - 一款免费的日文汉字字体,Mincho(衬线)风格。<br />
*{{Pkg|ttf-sazanami}} - 自由的日文 TrueType 字体。已经过期无人维护,但在某些环境下可当作备用字体使用。<br />
*{{AUR|ttf-vlgothic}} - 日文哥特体字形。Debian/Fedora/Vine Linux 的默认字体<br />
*{{AUR|ttf-mplus}} - 现代哥特体的日文轮廓字体。包含所有日文平假名/片假名、Basic Latin、Latin-1 Supplement、Latin Extended-A、IPA Extensions。另外还有大部分日文汉字、希腊字母、西里尔字与越南文字,可以 7 磅 (等比例) 或 5 磅 (等宽) 字重显示。<br />
*{{AUR|ttf-monapo}} - 日文字体,可正确显示 [[wikipedia:2channel_Shift_JIS_art|2ch 的 Shift JIS 艺术创作]]。<br />
<br />
===== 韩文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-kr-fonts}} - 思源黑体韩文部分<br />
*{{Pkg|ttf-baekmuk}} - 韩文 TrueType 字体集合<br />
*{{AUR|ttf-nanum}} - Nanum 系列 TrueType 字体<br />
*{{AUR|ttf-nanumgothic_coding}} - Nanum 系列 TrueType 等宽字体<br />
*{{AUR|ttf-d2coding}} - 由 Naver 制作的 TrueType 等宽字体<br />
*{{AUR|spoqa-han-sans}} - 由 Spoqa 定制的 Source Han Sans 字体。<br />
<br />
<br />
==== 阿拉伯和乌尔都文字 ====<br />
<br />
*{{AUR|ttf-qurancomplex-fonts}} - 位于麦地那的 King Fahd Glorious Quran Printing Complex 制作的字体<br />
*{{AUR|ttf-amiri}} - 一个典型的阿拉伯文誊抄体 (Naskh) 字体,一开始由 Amiria Press 采用<br />
*{{AUR|ttf-sil-lateef}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-sil-scheherazade}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-arabeyes-fonts}} - 自由的阿拉伯文字体集合<br />
*{{AUR|ttf-urdufonts}} - Urdu 字体<br />
<br />
==== 波斯文字 ====<br />
<br />
*{{AUR|ttf-irfonts}} - 伊朗信息与通信技术高级理事会(SCICT)的官方标准波斯字体集<br />
*{{AUR|ttf-borna}} - Borna Rayaneh 波斯 B 字体系列<br />
*{{AUR|ttf-x2}} - X 系列 2 字体是建立在开源可使用的字体基础上并扩展支持波斯语,阿拉伯语,乌尔都语,普什图语,达里语,乌兹别克语,库尔德语,维吾尔语,老土耳其(奥斯曼)和现代土耳其(罗马).<br />
*{{AUR|ttf-iran-nastaliq}} - 由伊朗信息高级理事会公布的一款 Unicode 书法字体<br />
<br />
==== 缅甸文字 ====<br />
<br />
*{{AUR|ttf-myanmar-fonts}} - 源自myordbok.com的121款字体''(AUR)''<br />
<br />
==== 西里尔文字 ====<br />
<br />
另请参阅[[#等宽字体]]、[[#无衬线字体]]和[[#衬线字体]]<br />
*{{AUR|ttf-paratype}} - ParaType类别的字体: sans, serif, mono, 扩展的西里尔和拉丁文字, OFL 认证<br />
<br />
==== 希腊文字 ====<br />
<br />
几乎所有 Unicode 字体都包含希腊代码集 (也包含多调变音符号),某些额外字体包虽然未包含完整的 Unicode 集,但拥有高质量的希腊字字形 (也包含拉丁字):<br />
*{{AUR|otf-gfs}} - 由 Greek Font Society 选用的 OpenType 字体<br />
*{{AUR|ttf-mgopen}} - 来自 Magenta 的专业 TrueType 字体<br />
<br />
==== 希伯来文字 ====<br />
<br />
*{{AUR|culmus}} - 自由的希伯来文字体集合<br />
<br />
==== 印地文字 ====<br />
<br />
*{{Pkg|ttf-freebanglafont}} - 孟加拉文字体<br />
*{{Pkg|ttf-indic-otf}} - 印地文 OpenType 字体集合 (包含 ttf-freebanglafont)<br />
:(This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - 来自 Fedora 专案的印地文 TrueType 字体 (包含 Oriya 字体以及更多)<br />
* {{AUR|ttf-devanagarifonts}} - 梵文TrueType字体(包含 283 种字体)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF 古吉拉特 fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== 高棉文字 ====<br />
<br />
*{{Pkg|ttf-khmer}} - 涵盖高棉语 (Khmer) 文字的字体<br />
*[https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== 僧伽罗文字 ====<br />
<br />
*{{AUR|ttf-lklug}} - 僧伽罗文 (Sinhala) Unicode 字体<br />
<br />
==== 塔米尔文字 ====<br />
<br />
*{{AUR|ttf-tamil}} - 塔米尔文 (Tamil) Unicode 字体<br />
<br />
==== 藏文字 ====<br />
<br />
*{{Pkg|ttf-tibetan-machine}} - 藏文 (Tibetan) Machine TTFont<br />
<br />
=== Microsoft 字体 ===<br />
<br />
参阅[[Microsoft Fonts (简体中文)|微软字体]]。<br />
<br />
=== Apple OS X 字体 ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType 字体<br />
* {{AUR|ttf-mac}}{{Broken package link|{{aur-mirror|ttf-mac}}}} - Mac OS X TrueType 字体。这个软件包没有内含 ttf 字体 (只有 otf 字体),用户必须自备这些字体。<br />
<br />
=== 等宽字体 ===<br />
<br />
建议:每位用户偏爱的字体不尽不同,如想找到您心目中的理想字体,还请多加尝试。 <br />
如果您没有太多时间,可以阅读 Dan Benjamin 博客的文章:[http://hivelogic.com/articles/top-10-programming-fonts 十大最适合编程的字体](英文)。<br />
<br />
这里内还有 Trevor Lowing 整理的一长串字体清单:http://www.lowing.org/fonts/ (英文)。<br />
<br />
Slant 上的字体图片比较: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts 最好的编程字体是什么?](英文)<br />
<br />
还有 Stack Overflow 上的带一些图片的回答: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming 推荐编程字体](英文)。<br />
<br />
==== TrueType 字体 ====<br />
<br />
* Agave ({{AUR|ttf-agave}}{{Broken package link|{{aur-mirror|ttf-agave}}}})<br />
* [[Wikipedia:zh:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* Anka/Coder ({{AUR|ttf-anka-coder}}{{Broken package link|{{aur-mirror|ttf-anka-coder}}}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{Pkg|ttf-anonymous-pro}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:zh:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:zh:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows 下的编程用字体<br />
* [[Wikipedia:zh:Courier|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Courier New 替换 (metric-compatible)<br />
* [[Wikipedia:zh:DejaVu字体|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:zh:Droid|Droid Sans Mono]] ({{Pkg|ttf-droid}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* Envy Code R ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} 或 {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}) - 极佳的编程用字体<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - 加入一些亲近编程人员的调整<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - 取代 Courier New,基于Cousine (metric-compatible)。<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (包含于 {{AUR|jre}} 软件包)<br />
* [[Wikipedia:zh:Monaco|Monaco]] ({{AUR|ttf-monaco}}) - OSX/Textmate 下知名的编程用字体<br />
* Monofur ({{AUR|ttf-monofur}}) <br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== 点阵字体 ====<br />
*Default 8x16<br />
*Dina ({{Pkg|dina-font}})<br />
*[http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
*Lime ({{Pkg|artwiz-fonts}})<br />
*[[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
*[[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
*Proggy opti cyrillic ({{AUR|proggyopticyr-font}}{{Broken package link|{{aur-mirror|proggyopticyr-font}}}})<br />
*Tamsyn ({{Pkg|tamsyn-font}})<br />
*[http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
*Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== 无衬线字体 ===<br />
<br />
*[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}},包含于 {{AUR|ttf-sil-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
*Arimo ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Arial 替换 (metric-compatible)<br />
*[[Wikipedia:zh:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:zh:Droid|Droid Sans]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}},取代 Arial, 基于 Arimo (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
*[[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - 3 种主要变体:正常、变窄与标题 - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
*[[Wikipedia:zh:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
*[[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Ubuntu-Title|Ubuntu-Title]] ({{AUR|ttf-ubuntu-title}}{{Broken package link|{{aur-mirror|ttf-ubuntu-title}}}})<br />
*[[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
*[[Wikipedia:zh:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 手写体 ===<br />
<br />
*[[Wikipedia:zh:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 衬线字体 ===<br />
*[[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Charis SIL|Charis]] ({{AUR|ttf-charis}}{{Broken package link|{{aur-mirror|ttf-charis}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:Doulos SIL|Doulos]] ({{AUR|doulos-sil}}{{Broken package link|{{aur-mirror|doulos-sil}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:Droid|Droid Serif]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、希腊字、西里尔字、音标字母<br />
*[[Wikipedia:zh:Georgia (字型)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - 取代 Times New Roman,基于Tinos (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode:拉丁字、希腊字、西里尔字、希伯来字<br />
*[[Wikipedia:zh:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
*Tinos ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Times New Roman 替换 (metric-compatible)<br />
<br />
=== 未分类字体 ===<br />
<!--这里的内容应该被分类放入衬线字体,无衬线字体和等宽字体小节内--><br />
*{{AUR|ttf-google-fonts-git}} 与 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} — 一个免费字体的大合集(囊括里 ubuntu、inconsolata、droid 等字体)-注意:如果安装这个包,您的系统内将添加 100 多个字体,这将会使您的字体对话框变得很长。{{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 会从上游网络字体项目中拖下整个 Mercurial 库。{{AUR|ttf-google-fonts-git}}则会从 Git 中拖下一个更小,更精简的非官方库。''(AUR)''<br />
*{{Pkg|ttf-mph-2b-damase}} — Covers full plane 1 and several scripts<br />
*{{Pkg|ttf-symbola}} — 提供了绘文字及其它一些符号。<br />
*{{AUR|ttf-sil-fonts}} — STL 内的 Gentium, Charis, Doulos, Andika and Abyssinica ''(AUR)''<br />
*{{Pkg|font-bh-ttf}} — X.Org Luxi 字体<br />
*{{Pkg|ttf-cheapskate}} — 从 ''dustismo.com'' 收集来的字体库<br />
*{{AUR|ttf-isabella}}{{Broken package link|{{aur-mirror|ttf-isabella}}}} — 一款书法字体,基于 1497 年的 ''Isabella Breviary''<br />
*{{Pkg|ttf-junicode}} — Junius 字体,几乎包括了所有中世纪的拉丁文字形<br />
*arkpandorafonts {{AUR|ttf-arkpandora}}{{Broken package link|{{aur-mirror|ttf-arkpandora}}}} — Arial 与 Times New Roman 字体的一个替代字体 ''(AUR)''<br />
*{{Pkg|xorg-fonts-type1}} — IBM Courier 和 Adobe Utopia 的 [[Wikipedia:PostScript fonts|PostScript 字体]]<br />
<br />
== X11中的字体回滚顺序 ==<br />
Fontconfig 会自动选择一个符合当前场景的字体。也就是说,如果有人正在浏览一个既有英文又有中文的窗口,而默认的字体不支持中文,它会自动切换到另一种字体以便显示中文。<br />
<br />
Fontconfig 让每个用户能够通过{{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}来调整字体被使用的顺序。<br />
如果你想要在最喜欢的Serif字体之后使用某个特定的中文字体,你的配置文件看起来会是这样:<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>你喜欢的拉丁衬线字体名称</family><br />
<family>你的中文衬线字体名称</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
当然你也可以为 Sans-serif和 monospace 字体像上面一样添加一段。更多信息请参考 fontconfig 说明。<br />
<br />
== 字体别名 ==<br />
在 Linux 系统中有几种字体别名,它们实际代表着别的字体,这样以达到让应用程序的字体看起来类似。最常见的别名有:{{ic|serif}} 代表一种[[Wikipedia:zh:衬线体|衬线体]](关于衬线体与非衬线体概念请参考[http://wiki.ubuntu.org.cn/%E5%AD%97%E4%BD%93#.E5.9F.BA.E7.A1.80.E7.9F.A5.E8.AF.86 UbuntuCN:字体#基础知识]——译注)(例如 DejaVu Serif、宋体);{{ic|sans-serif}}代表一种[[Wikipedia:zh:无衬线体|无衬线体]](例如 DejaVu Sans 和各种黑体);而{{ic|monospace}} 则代表[[Wikipedia:zh:等宽字体|等宽字体]](例如 DejaVu Sans Mono)。 然而,这些别名所代表的字体有可能会变化,而且通常 KDE 和其他桌面环境中的字体管理工具不会显示其内在联系。<br />
<br />
如果想通过别名反向查找是哪种字体被展现出来,运行:<br />
$ fc-match monospace<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
<br />
在这种情况下 Monospace 别名展现的是 DejaVuSansMono.ttf 字体。<br />
<br />
== 小提示 ==<br />
<br />
=== 列出已安装字体 ===<br />
你可以使用以下命令来列出当前系统中所有已安装字体的字体:<br />
<br />
$ fc-list<br />
<br />
=== 应用程序专用的字体高速缓冲 ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} 或 {{pkg|python2-matplotlib}}) 使用自己的字体高速缓冲,因此更新字体后记得删除 {{ic|$HOME/.matplotlib/fontList.cache}},{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}} 等文件。这样它才会再一次产生高速缓冲并找到新字体 [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html]。</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Fonts_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452906Fonts (简体中文)2016-10-04T14:51:17Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:简体中文]]<br />
[[Category:Fonts (简体中文)]]<br />
[[Category:Graphics and desktop publishing (简体中文)]]<br />
[[cs:Fonts]]<br />
[[de:Schriftarten]]<br />
[[en:Fonts]]<br />
[[es:Fonts]]<br />
[[it:Fonts]]<br />
[[ja:フォント]]<br />
[[ru:Fonts]]<br />
[[tr:Yazıtipleri]]<br />
[[zh-TW:Fonts]]<br />
{{translateme (简体中文)}}<br />
{{Related articles start (简体中文)}}<br />
{{Related2|Font Configuration (简体中文)|字体设定}}<br />
{{Related2|MS Fonts (简体中文)|微软字体}}<br />
{{Related2|Java Fonts - Sun JRE|Java 环境字体(英文)}}<br />
{{Related2|Infinality|Infinality (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Fonts|2014-05-24|312432}}<br />
引自 [[Wikipedia:zh:计算机字体|维基百科]]:<br />
:「'''计算机字体'''(computer font),简称'''字体'''(font),是包含有一套字形与字符的电子数据文件。」<br />
<br />
注意,部分字体在许可协议中规定了使用时的法律限制。<br />
<br />
== 字体类型 ==<br />
<br />
现今计算机使用的绝大多数字体,都是属于'''点阵字体'''或者'''轮廓字体'''二者之一。<br />
;点阵字体: 每种字形的每种形式和每种尺寸的图像都由点或者像素组成的矩阵构成。由于位图的原故,点阵字体很难进行缩放,特定的点阵字体只能清晰地显示在相应的字号下。但对于 12-16 px 的小号汉字来说,点阵字体往往比其它类型的字体在屏幕上有更好的显示效果。<br />
;轮廓字体或称矢量字体: 使用贝塞尔曲线、绘图指令和数学公式来描述每种字形,使得字体可以适应各种尺寸。<br />
<br />
=== 常见格式 ===<br />
<br />
* {{ic|bdf}} 与 {{ic|bdf.gz}} – 点阵字体,'''b'''itmap '''d'''istribution '''f'''ormat(位图布局格式)的缩写,后者表示以 gzip 压缩的 {{ic|bdf}}。<br />
* {{ic|pcf}} 与 {{ic|pcf.gz}} – 点阵字体, '''p'''ortable '''c'''ompiled '''f'''ont(可移植编译字体)的缩写,后者表示以 gzip 压缩的 {{ic|pcf}}。<br />
* {{ic|psf}},{{ic|psfu}}与{{ic|psf.gz}},{{ic|psfu.gz}} – 点阵字体,前两者分别是 '''P'''C '''s'''creen '''f'''ont(电脑屏幕字体)与 '''P'''C '''s'''creen '''f'''ont '''U'''nicode(Unicode 电脑屏幕字体)的缩写。两者分别表示用 gzip 压缩的 {{ic|psf}} 与 {{ic|psfu}(不适用于 X.Org)。<br />
* {{ic|pfa}} 与 {{ic|pfb}} – 矢量字体,分别是 '''P'''ostScript '''f'''ont '''A'''SCII 与 '''P'''ostScript '''f'''ont '''b'''inary 的缩写。PostScript 字体内带有打印指令。<br />
* {{ic|ttf}} – outline,'''T'''rue'''T'''ype 字体。作为 PostScript 字体的替代。<br />
* {{ic|otf}} – outline,'''O'''pen'''T'''ype 字体。带有 PostScript 打印指令的 TrueType 字体。<br />
<br />
在多数情况下,TrueType 和 OpenType 的技术差异可以忽略,一些带有 {{ic|ttf}} 扩展的字体实际上是 OpenType 字体。<br />
<br />
=== 其它格式 ===<br />
<br />
排版程序 '''TeX''' 和配套的字体软件 '''Metafont''' 用它们自己的方法渲染字体。部分用于这两个程序的字体的文件后缀有 {{ic|*pk}}, {{ic|*gf}}, {{ic|mf}} 与 {{ic|vf}}。<br />
<br />
'''FontForge''',一个字体编辑程序,可以用自己的格式来储存字体,例如 {{ic|sfd}} (''s''pline ''f''ont ''d''atabase)。<br />
<br />
[http://www.w3.org/TR/SVG/fonts.html SVG] 格式也有自己的字体描述方法。<br />
<br />
== 安装 ==<br />
<br />
你可以使用多种方法安装字体。<br />
<br />
=== Pacman ===<br />
<br />
有效的源中的字体和字体集可以使用 [[pacman]] 来安装。 可以使用以下方式查找字体:<br />
$ pacman -Ss font<br />
或者也可以只查找 {{ic|ttf}} 字体:<br />
$ pacman -Ss ttf<br />
<br />
=== 创建字体包 ===<br />
<br />
如果您想用 pacman 来管理你自己的字体,可以创建一个 Arch 软件包。这些包也可以在 [[Arch User Repository (简体中文)|AUR]] 中与社区成员分享。下面是一个创建软件包的基本样例。您还可以参考 [[PKGBUILD (简体中文)|PKGBUILD]] 来获取更多有关创建软件包的资料。<br />
<br />
{{bc|<nowiki><br />
pkgname=ttf-fontname<br />
pkgver=1.0<br />
pkgrel=1<br />
pkgdesc="custom fonts"<br />
arch=(any)<br />
depends=(fontconfig xorg-font-utils)<br />
source=("http://someurl.org/$pkgname.tar.bz2")<br />
install=$pkgname.install<br />
<br />
package() {<br />
install -d "$pkgdir/usr/share/fonts/TTF"<br />
install -m644 "$srcdir/$pkgname/"*.ttf "$pkgdir/usr/share/fonts/TTF/"<br />
}<br />
</nowiki>}}<br />
<br />
PKGBUILD 推断这些字体是 TrueType 字体。需要创建一个安装文件 ({{ic|ttf-fontname.install}}) 以便更新字体缓存:<br />
<br />
{{bc|<nowiki><br />
post_install() {<br />
echo -n "Updating font cache... "<br />
fc-cache >/dev/null -f<br />
mkfontscale /usr/share/fonts/TTF<br />
mkfontdir /usr/share/fonts/TTF<br />
echo done<br />
}<br />
<br />
post_upgrade() {<br />
post_install<br />
}<br />
<br />
post_remove() {<br />
post_install<br />
}<br />
</nowiki>}}<br />
<br />
如果想更方便地从TTFs创建自己的包,可以使用 [[Arch User Repository (简体中文)|AUR]] 中的 {{AUR|makefontpkg}}。<br />
<br />
=== 手动安装字体 ===<br />
<br />
要安装不在源中的字体,推荐的方法请参考[[#创建字体包]]。这样使得 pacman 在以后能够更新或者移除它们。当然字体也可以通过手工方式安装。<br />
<br />
要在系统范围内(对所有用户有效)安装字体,请将文件夹移动到 {{ic|/usr/share/fonts/}} 目录。这些文件需要对每个用户而言都是可读的,使用 [[chmod]] 来设置合理的权限 (比如,文件至少为 {{ic|0444}} ,而目录至少为 {{ic|0555}})。要为单个用户安装字体,请使用 {{ic|~/.local/share/fonts}} ({{ic|~/.fonts/}} 现在已经过时了)。<br />
要让 Xserver 能直接载入字体(而不使用某些'''字体服务'''),就需要将新增字体的目录加入到 FontPath 中。它位于[[Xorg#Configuration|您的 Xorg 设置目录]]中(例如 {{ic|/etc/X11/xorg.conf}} 或 {{ic|/etc/xorg.conf}}) 中。更多详细内容请查阅[[#X.Org 中的字体]]{{Broken section link}}<br />
<br />
然后更新 fontconfig 的字体缓存:<br />
<br />
$ fc-cache -vf<br />
<br />
==== 手动安装:高级模式 ====<br />
<br />
如果您有特殊的字体收集需求,例如使用商业字体、使用不同格式的字体、安装/删除字体相当频繁,或只是希望可以更能够控制访问自己的字体资源,那就相当适合用手动的方式来安装维护字体。采用这种方案会获得很多好处:<br />
<br />
* 避免重复安装不同版本、格式的同一种字体集 (经常容易导致渲染问题)。<br />
* 字体可使用多个非标准的实体来源 (例如额外的硬盘、分区)。<br />
* 避免依赖隐晦又占体积的本地字体来源(例如 TeX Live & {{ic|09-texlive-fonts.conf}},或是 AUR 中的某个字体包);使用这些字体来源时,您可能只需要其中的 5 种字体,却必须连带安装其它 55 种不需要的字体。<br />
* 避免字体渲染问题,在您的 fontconfig 配置文件已被修改成与安装在系统的那份不同的格式。<br />
* 只要观察主字体目录下的内容,就能够确定系统上有哪种格式的字体集可供应用程序使用。您不需要复杂、占用大量资源的字体管理程序;{{Pkg|gtk2fontsel}} 和基本的指令工具 (如 {{Pkg|fontconfig}} 软件包下的 {{ic|fc-query}}) 就可以将这件差事办得又快又好。<br />
* 当您安装或升级单一字体,所有应用程序都可以使用新版本字体,包括 LaTeX 相关软件。<br />
* 有必要的话,可以快速启用 / 停用某个字体集,因为您知道它们在哪个目录下(调试时很好用)。<br />
* 不需担心有任何多余的 {{ic|/etc/fonts/conf.avail/nn-foo.conf}} fontconfig 文件会可能与您的渲染设置起冲突 (特别是当您使用[[Font configuration (简体中文)#补丁包|自定的字体设置与修补过的函式库]]时)。<br />
* 长远来看,可以省下那些因软件包管理器的失误,解决问题和清除冲突所浪费的宝贵时间。<br />
<br />
实际操作上有几种方式,有必要的话可任由软件包管理员采用。以下所举出的操作方式相当有效率,即使字体数目众多也相当安全。<br />
<br />
* 我们要将字体来源位置 (例如 {{ic|/usr/share/fonts.avail}}:这是我们要存放字体的位置) 和包含字体集软链接的目录 ({{ic|/usr/share/fonts}}) 给分隔开来。<br />
<br />
* 将每个字体集分别放在一个明确命名的子目录下。命名规则必须一致且明确,例如这样:<br />
<br />
{{bc|<nowiki><br />
<ttf|otf|t1>-<字体作者或组织(选用)>-<字体集名称><br />
</nowiki>}}<br />
<br />
字体来源目录的内容会长得像这样:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts.avail<br />
<br />
/usr/share/fonts.avail/otf-heuristica<br />
/usr/share/fonts.avail/ttf-liberation<br />
/usr/share/fonts.avail/ttf-ms-arial<br />
...<br />
</nowiki>}}<br />
<br />
* 我们不会涉及到 TeX Live 的字体目录,以避免 LaTeX 软件发生任何问题。既然我们可以使用多个位置,我们将在 {{ic|/usr/share/fonts}} 创建软链接,让应用程序可以访问特定的字体集:<br />
<br />
{{bc|<nowiki><br />
# cd /usr/share/fonts<br />
# ln -s ../fonts.avail/otf-heuristica .<br />
# ln -s /opt/texlive/texmf-dist/fonts/truetype/public/opensans ttf-texlive-open.sans<br />
</nowiki>}}<br />
<br />
结果如下:<br />
<br />
{{bc|<nowiki><br />
$ ls /usr/share/fonts<br />
<br />
ttf-liberation -> ..fonts.avail/ttf-liberation<br />
ttf-ms-arial -> ..fonts.avail/ttf-ms-arial<br />
otf-heuristica -> ..fonts.avail/otf-heuristica<br />
otf-texlive-tex.gyre -> /opt/texlive/texmf-dist/fonts/opentype/public/tex-gyre<br />
ttf-texlive-open.sans -> /opt/texlive/texmf-dist/fonts/truetype/public/opensans<br />
...<br />
</nowiki>}}<br />
<br />
最后,依照惯例执行:<br />
<br />
{{bc|<nowiki><br />
# fc-cache && mkfontscale && mkfontdir<br />
</nowiki>}}<br />
<br />
[[TeXLive (简体中文)|TeX Live]] Wiki 文章内也有一个类似做法,比较简单,但更适用于单一用户的情形,而非全局设置。<br />
<br />
==== 过老的应用程序 ====<br />
<br />
过老而不支持 fontconfig 的应用程序(例如 GTK+ 1.x 应用,及 {{ic|xfontsel}}),需要在字体目录创建索引:<br />
<br />
$ mkfontscale<br />
$ mkfontdir<br />
<br />
或在一条命令中包含多个目录:<br />
<br />
$ for dir in /font/dir1/ /font/dir2/; do xset +fp $dir; done && xset fp rehash<br />
<br />
或者如果字体被安装在一个不同的子文件夹,比如在 {{ic|/usr/share/fonts}} 下:<br />
<br />
$ for dir in * ; do if [ -d "$dir" ]; then cd "$dir";xset +fp "$PWD" ;mkfontscale; mkfontdir;cd .. ;fi; done && xset fp rehash<br />
<br />
有时候 X server 可能会不能成功加载字体目录,这时你需要重新扫描 {{ic|fonts.dir}} 文件:<br />
<br />
# xset +fp /usr/share/fonts/misc # Inform the X server of new directories<br />
# xset fp rehash # Forces a new rescan<br />
<br />
查询字体是否已经生效,可以使用:<br />
<br />
$ xlsfonts | grep fontname<br />
<br />
{{注意|许多软件包会自动配置 Xorg 安装时需要的字体。若这样,便可跳过此步。}}<br />
<br />
为了让 [[Xorg]] 找到并使用你新安装的字体,你必须把字体路径加入到 {{ic|/etc/X11/xorg.conf}}(另一个 X.Org 配置文件或许也可以)。<br />
<br />
这个例子演示了必须加入到 {{ic|/etc/X11/xorg.conf}} 中的代码片断。请根据你的实际需要添加或删除路径。<br />
# 让 X.Org 知道自定义字体目录<br />
Section "Files"<br />
FontPath "/usr/share/fonts/100dpi"<br />
FontPath "/usr/share/fonts/75dpi"<br />
FontPath "/usr/share/fonts/cantarell"<br />
FontPath "/usr/share/fonts/cyrillic"<br />
FontPath "/usr/share/fonts/encodings"<br />
FontPath "/usr/share/fonts/local"<br />
FontPath "/usr/share/fonts/misc"<br />
FontPath "/usr/share/fonts/truetype"<br />
FontPath "/usr/share/fonts/TTF"<br />
FontPath "/usr/share/fonts/util"<br />
EndSection<br />
<br />
=== Pango 警告 ===<br />
当你的系统中安装了[http://www.pango.org/ Pango],它会从 [http://www.freedesktop.org/wiki/Software/fontconfig fontconfig] 查找字体来源。<br />
<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='common'<br />
(process:5741): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderFc', script='latin'<br />
<br />
如果你看到类似的错误,或在应用程序中看到方块而不是文字,这表示你需要添加字体并更新字体缓存。以下示例使用{{Pkg|ttf-liberation}}字体讲解如何解决这个问题。使用 root 权限运行如下命令可以使字体在系统范围内生效。<br />
<br />
# pacman -S ttf-liberation<br />
-- output abbreviated, assumes installation succeeded -- <br />
<br />
# fc-cache -vfs<br />
/usr/share/fonts: caching, new cache contents: 0 fonts, 3 dirs<br />
/usr/share/fonts/TTF: caching, new cache contents: 16 fonts, 0 dirs<br />
/usr/share/fonts/encodings: caching, new cache contents: 0 fonts, 1 dirs<br />
/usr/share/fonts/encodings/large: caching, new cache contents: 0 fonts, 0 dirs<br />
/usr/share/fonts/util: caching, new cache contents: 0 fonts, 0 dirs<br />
/var/cache/fontconfig: cleaning cache directory <br />
fc-cache: succeeded<br />
<br />
你可以这样测试一个正在设置的默认字体:<br />
<br />
# fc-match<br />
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"<br />
<br />
== 终端字体 ==<br />
<br />
{{注意|这部分是关于 [[Wikipedia:Linux console|Linux console]]。如果您想获取其它的更加丰富的关于终端的解决方案 (完备的 Unicode 字体, 现代的图形化配适器,等等。), 请参照 [[fbterm]], [[KMSCON]] 或者类似的项目.}}<br />
<br />
默认情况下, [[Wikipedia:Virtual console|virtual console]] 使用内核的内置字体,其包含 [[Wikipedia:CP437|CP437]] 字体集,<sup>[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/vt/Makefile#n4]</sup> 但是这个设置可以非常容易改变.<br />
<br />
[[Wikipedia:Linux console|Linux console]] 默认使用 UTF-8 编码, 但是由于使用的是标准的兼容 VGA 的帧缓存, 终端字体限定为 256 或 512 个字形。如果字体超出了256个字形, 那么颜色的数量就会从 16 减少到 8。为了针对给定的 Unicode z值分配正确的可显示符号,一种特殊的翻译映射,通常叫做 ''unimap'',是必须的。 就目前来看大多数终端字体都具有内置的 ''unimap'', 但是历史上它是需要被单独载入的。<br />
<br />
{{Pkg|kbd}} 包提供了改变虚拟终端字体和字体映射的工具。可以使用的字体存储在 {{ic|/usr/share/kbd/consolefonts/}} 目录下, 那些以 ''.psfu'' 或者 ''.psfu.gz'' 结尾的具有一个内嵌的 Unicode 翻译映射。<br />
<br />
键盘映射 (Keymap) 是按键和计算机使用字符的对应关系表,可以在 {{ic|/usr/share/kbd/keymaps/}} 的子目录下找到,详情请查看 [[Keyboard configuration in console]] 。<br />
<br />
{{注意|Replacing the font can cause issues with programs that expect a standard VGA-style font, such as those using line drawing graphics.}}<br />
<br />
=== 预览和测试 ===<br />
<br />
{{提示|这里有一个整理过的预览影像数据库:[http://alexandre.deverteuil.net/pages/consolefonts/ Linux 终端字体截图]。}}<br />
<br />
''showconsolefont'' 指令会以表格形式显示可用字与字符:<br />
<br />
$ showconsolefont<br />
<br />
''setfont'' 工具可以暂时改变字体,让用户可以决定是否要设为永久性设置。只要指定字体名称即可 (这些字体位于 {{ic|/usr/share/kbd/consolefonts/}}),比如:<br />
<br />
$ setfont lat2-16<br />
<br />
如果对新换的字体不满意,可以用以下指令撤消至默认字体 (就算终端显示乱码,这个指令依然可以执行,将指令「盲打」进去即可):<br />
<br />
$ setfont<br />
<br />
{{注意|''setfont'' 只作用于当前正在使用的终端。其它终端无论活跃与否都不受影响。}}<br />
<br />
=== 持久性配置 ===<br />
<br />
{{ic|/etc/vconsole.conf}} 的 {{ic|FONT}} 变量可以用来在启动时设置字体, 对于所有的终端都具有持久性作用。详情请查看 {{ic|man 5 vconsole.conf}} 。<br />
<br />
若要显示 ''Č, ž, đ, š'' 或 ''Ł, ę, ą, ś'' 之类的字符,请使用 {{ic|lat2-16.psfu.gz}} 这个字体:<br />
<br />
{{hc|/etc/vconsole.conf|2=<br />
...<br />
FONT=lat2-16<br />
<br />
}}<br />
<br />
这代表使用 ISO/IEC 8859 字符的第二部分,尺寸设置为 16。您可以使用其它值更改字体尺寸 (如 {{ic|lat2-08}})。您可以在[[wikipedia:ISO/IEC_8859#The_Parts_of_ISO.2FIEC_8859|Wikipedia的这张表]]查询 8859 规范定义的本地。<br />
<br />
若要为早期的用户空间套用指定字体,请在 {{ic|/etc/mkinitcpio.conf}} 使用 {{ic|consolefont}} 勾子。更多信息请参阅 [[Mkinitcpio (简体中文)#钩子(HOOKS)]]。<br />
<br />
如果开机时字体没有任何变化,或只变化一下就恢复原样,则有可能是因为显卡驱动引导时字体被复位,然后终端被切至帧缓冲 (framebuffer)。提早装入图形驱动可以避免这个问题。若要在套用 {{ic|/etc/vconsole.conf}} 之前将帧缓冲准备好,请参阅[[Kernel mode setting (简体中文)#KMS 早启动|核心模式设置#提早引导 KMS]]、[https://bbs.archlinux.org/viewtopic.php?id=145765] 或其它方式。<br />
<br />
==字体包==<br />
以下是官方源和 [[Arch User Repository (简体中文)|AUR]] 中提供的安装包列表以供参考。支持 Unicode 的字体都标注上了“Unicode”字样。欲知详情请查看具体项目或维基百科。<br />
<br />
Github用户Ternstor编写了一段python脚本,可以通过在 AUR 和官方源中所有字体的 PNG 图像产生 HTML 文件: [https://github.com/ternstor/distrofonts/blob/master/archfonts.py].<br />
<br />
=== 盲文点字 ===<br />
<br />
*{{Pkg|ttf-ubraille}} - 包含 Unicode '''盲文点字'''符号的字体。<br />
<br />
=== 数学和符号字体===<br />
<br />
*{{Pkg|ttf-symbola}} - 提供许多 Unicode 符号,包括 Emoji<br />
*{{Pkg|font-mathematica}} - Wolfram 公司的 Mathematica 字体<br />
*{{Pkg|texlive-core}}, {{Pkg|texlive-fontsextra}} 包含许多数学字体,如拉丁符号。<br />
*{{Pkg|noto-fonts-emoji}} - Google 的 emoji 字体<br />
*{{AUR|ttf-mathtype}} - MathType 字体<br />
*{{AUR|ttf-computer-modern-fonts}}, {{AUR|otf-cm-unicode}} - [[wikipedia:Computer Modern|Computer Modern]] (of TeX fame)<br />
*{{AUR|otf-latin-modern}}, {{AUR|otf-latinmodern-math}} -Computer Modern fonts 的改进版本<br />
*{{AUR|otf-xits}} - STIX 字体的 OpenType 实现,以及对从右到左的书写支持。<br />
*{{AUR|emojione-color-font}} -完整、独立、开源的 Emoji 字体集,专心于设计正确<br />
*{{AUR|twemoji-color-font}} - Twitter 的开源 Emoji 字形<br />
<br />
<br />
<br />
=== 非英文使用者 ===<br />
<br />
应用程序与浏览器会根据 fontconfig 设置和 Unicode 文字可用的字体来选择其显示字体。用指令 {{ic|<nowiki>fc-list :lang="双字母的语言代码"</nowiki>}} 枚举系统安装了哪些可对应该语言的字体。例如,枚举已经安装的阿拉伯文字体,以及支持阿拉伯字的字体:<br />
{{hc|$ fc-list :lang&#61;ar &#124; cut -d: -f1|2=<br />
<nowiki><br />
/usr/share/fonts/TTF/FreeMono.ttf<br />
/usr/share/fonts/TTF/DejaVuSansCondensed.ttf<br />
/usr/share/fonts/truetype/custom/DroidKufi-Bold.ttf<br />
/usr/share/fonts/TTF/DejaVuSansMono.ttf<br />
/usr/share/fonts/TTF/FreeSerif.ttf<br />
</nowiki><br />
}}<br />
<br />
若要在多国语言的网站(如Wikipedia、Arch Linux Wiki)中正确显示字形,需要安装下列一项软件包:<br />
* 谷歌的 [http://www.google.com/get/noto/ Noto] 字体家族旨在支持所有语言。请安装 {{Pkg|noto-fonts}}, {{Pkg|noto-fonts-cjk}} 和 {{Pkg|noto-fonts-emoji}} 软件包。<br />
* An alternative set of fonts which has a good coverage of languages is {{Pkg|ttf-freefont}} with {{Pkg|ttf-arphic-uming}} and {{Pkg|ttf-baekmuk}}.<br />
<br />
==== 中日韩越文字 ====<br />
<br />
===== Pan-CJK =====<br />
<br />
*{{Pkg|noto-fonts-cjk}} - Google Noto CJK 字体, 提供简体中文、繁体中文、日文、韩文一致的设计和外观。它是基于 {{Pkg|adobe-source-han-sans-otc-fonts}} 重贴的商标。<br />
*{{Pkg|adobe-source-han-sans-otc-fonts}} - 思源黑体, 是由 Adobe 与 Google 合资开发的,囊括简体中文、繁体中文、日文、韩文字形和来自 Source Sans 字体家族的拉丁文、希腊文和西里尔文字形的高质量无衬线 OpenType 字体。<br />
<br />
===== 中文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-cn-fonts}} - 思源黑体简体中文部分<br />
*{{Pkg|adobe-source-han-sans-tw-fonts}} - 思源黑体繁体中文部分<br />
*{{Pkg|wqy-microhei}} - 文泉驿微米黑,无衬线形式的高质量中日韩越 (CJKV) 轮廓字体。<br />
*{{Pkg|wqy-zenhei}} - 文泉驿正黑,黑体 (无衬线) 的中文轮廓字体,附带文泉驿点阵宋体 (也支持部分日韩字符)。<br />
*{{Pkg|ttf-arphic-ukai}} - '''楷书''' (带有笔触) Unicode 字体 (推荐启用反锯齿)<br />
*{{Pkg|ttf-arphic-uming}} - '''明体''' (印刷) Unicode 字体<br />
*{{Pkg|opendesktop-fonts}} - '''新宋'''字体,之前为 ttf-fireflysung<br />
*{{Pkg|wqy-bitmapfont}} - 文泉驿点阵宋体 (衬线) 中文字体<br />
*{{Pkg|ttf-hannom}} - 中文、越南文 TrueType 字体<br />
*{{AUR|ttf-tw}} - (繁体)台湾教育部发行的标准楷书、宋体字体<br />
<br />
===== 日文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-jp-fonts}} - 思源黑体日文部分<br />
*{{Pkg|otf-ipafont}} - 正式的日文哥特体(无衬线)与明朝体 (衬线)字形集,高质量的开源字体之一,openSUSE-ja 的默认字形。<br />
*{{Pkg|ttf-hanazono}} - 一款免费的日文汉字字体,Mincho(衬线)风格。<br />
*{{Pkg|ttf-sazanami}} - 自由的日文 TrueType 字体。已经过期无人维护,但在某些环境下可当作备用字体使用。<br />
*{{AUR|ttf-vlgothic}} - 日文哥特体字形。Debian/Fedora/Vine Linux 的默认字体<br />
*{{AUR|ttf-mplus}} - 现代哥特体的日文轮廓字体。包含所有日文平假名/片假名、Basic Latin、Latin-1 Supplement、Latin Extended-A、IPA Extensions。另外还有大部分日文汉字、希腊字母、西里尔字与越南文字,可以 7 磅 (等比例) 或 5 磅 (等宽) 字重显示。<br />
*{{AUR|ttf-monapo}} - 日文字体,可正确显示 [[wikipedia:2channel_Shift_JIS_art|2ch 的 Shift JIS 艺术创作]]。<br />
<br />
===== 韩文字 =====<br />
<br />
*{{Pkg|adobe-source-han-sans-kr-fonts}} - 思源黑体韩文部分<br />
*{{Pkg|ttf-baekmuk}} - 韩文 TrueType 字体集合<br />
*{{AUR|ttf-nanum}} - Nanum 系列 TrueType 字体<br />
*{{AUR|ttf-nanumgothic_coding}} - Nanum 系列 TrueType 等宽字体<br />
*{{AUR|ttf-d2coding}} - 由 Naver 制作的 TrueType 等宽字体<br />
*{{AUR|spoqa-han-sans}} - 由 Spoqa 定制的 Source Han Sans 字体。<br />
<br />
<br />
==== 阿拉伯和乌尔都文字 ====<br />
<br />
*{{AUR|ttf-qurancomplex-fonts}} - 位于麦地那的 King Fahd Glorious Quran Printing Complex 制作的字体<br />
*{{AUR|ttf-amiri}} - 一个典型的阿拉伯文誊抄体 (Naskh) 字体,一开始由 Amiria Press 采用<br />
*{{AUR|ttf-sil-lateef}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-sil-scheherazade}} - 来自 SIL 的 Unicode 阿拉伯文字体<br />
*{{AUR|ttf-arabeyes-fonts}} - 自由的阿拉伯文字体集合<br />
*{{AUR|ttf-urdufonts}} - Urdu 字体<br />
<br />
==== 波斯文字 ====<br />
<br />
*{{AUR|ttf-irfonts}} - 伊朗信息与通信技术高级理事会(SCICT)的官方标准波斯字体集<br />
*{{AUR|ttf-borna}} - Borna Rayaneh 波斯 B 字体系列<br />
*{{AUR|ttf-x2}} - X 系列 2 字体是建立在开源可使用的字体基础上并扩展支持波斯语,阿拉伯语,乌尔都语,普什图语,达里语,乌兹别克语,库尔德语,维吾尔语,老土耳其(奥斯曼)和现代土耳其(罗马).<br />
*{{AUR|ttf-iran-nastaliq}} - 由伊朗信息高级理事会公布的一款 Unicode 书法字体<br />
<br />
==== 缅甸文字 ====<br />
<br />
*{{AUR|ttf-myanmar-fonts}} - 源自myordbok.com的121款字体''(AUR)''<br />
<br />
==== 西里尔文字 ====<br />
<br />
另请参阅[[#等宽字体]]、[[#无衬线字体]]和[[#衬线字体]]<br />
*{{AUR|ttf-paratype}} - ParaType类别的字体: sans, serif, mono, 扩展的西里尔和拉丁文字, OFL 认证<br />
<br />
==== 希腊文字 ====<br />
<br />
几乎所有 Unicode 字体都包含希腊代码集 (也包含多调变音符号),某些额外字体包虽然未包含完整的 Unicode 集,但拥有高质量的希腊字字形 (也包含拉丁字):<br />
*{{AUR|otf-gfs}} - 由 Greek Font Society 选用的 OpenType 字体<br />
*{{AUR|ttf-mgopen}} - 来自 Magenta 的专业 TrueType 字体<br />
<br />
==== 希伯来文字 ====<br />
<br />
*{{AUR|culmus}} - 自由的希伯来文字体集合<br />
<br />
==== 印地文字 ====<br />
<br />
*{{Pkg|ttf-freebanglafont}} - 孟加拉文字体<br />
*{{Pkg|ttf-indic-otf}} - 印地文 OpenType 字体集合 (包含 ttf-freebanglafont)<br />
:(This one contains a "look of disapproval" that might be more to your liking than the {{Pkg|bdf-unifont}} one mentioned elsewhere in this document)<br />
* {{AUR|lohit-fonts}} - 来自 Fedora 专案的印地文 TrueType 字体 (包含 Oriya 字体以及更多)<br />
* {{AUR|ttf-devanagarifonts}} - 梵文TrueType字体(包含 283 种字体)<br />
* {{AUR|ttf-gujrati-fonts}} - TTF 古吉拉特 fonts (Avantika,Gopika,Shree768)<br />
* {{AUR|ttf-gurmukhi-fonts_sikhnet}} - TrueType Gurmukhi fonts (gurbaniwebthick,prabhki)<br />
* {{AUR|ttf-gurmukhi_punjabi}} - TTF Gurmukhi / Punjabi (contains 252 fonts)<br />
* {{AUR|ttf-kannada-font}} - Kannada, the language of Karnataka state in India<br />
* {{AUR|ttf-tamil}} - Tamil Unicode fonts<br />
<br />
==== 高棉文字 ====<br />
<br />
*{{Pkg|ttf-khmer}} - 涵盖高棉语 (Khmer) 文字的字体<br />
*[https://www.google.com/fonts/specimen/Hanuman Hanuman] ({{AUR|ttf-google-fonts-git}})<br />
<br />
==== 僧伽罗文字 ====<br />
<br />
*{{AUR|ttf-lklug}} - 僧伽罗文 (Sinhala) Unicode 字体<br />
<br />
==== 塔米尔文字 ====<br />
<br />
*{{AUR|ttf-tamil}} - 塔米尔文 (Tamil) Unicode 字体<br />
<br />
==== 藏文字 ====<br />
<br />
*{{Pkg|ttf-tibetan-machine}} - 藏文 (Tibetan) Machine TTFont<br />
<br />
=== Microsoft 字体 ===<br />
<br />
参阅[[Microsoft Fonts (简体中文)|微软字体]]。<br />
<br />
=== Apple OS X 字体 ===<br />
<br />
* {{AUR|ttf-mac-fonts}} - Mac OS X TrueType 字体<br />
* {{AUR|ttf-mac}}{{Broken package link|{{aur-mirror|ttf-mac}}}} - Mac OS X TrueType 字体。这个软件包没有内含 ttf 字体 (只有 otf 字体),用户必须自备这些字体。<br />
<br />
=== 等宽字体 ===<br />
<br />
建议:每位用户偏爱的字体不尽不同,如想找到您心目中的理想字体,还请多加尝试。 <br />
如果您没有太多时间,可以阅读 Dan Benjamin 博客的文章:[http://hivelogic.com/articles/top-10-programming-fonts 十大最适合编程的字体](英文)。<br />
<br />
这里内还有 Trevor Lowing 整理的一长串字体清单:http://www.lowing.org/fonts/ (英文)。<br />
<br />
Slant 上的字体图片比较: [http://www.slant.co/topics/67/~what-are-the-best-programming-fonts 最好的编程字体是什么?](英文)<br />
<br />
还有 Stack Overflow 上的带一些图片的回答: [http://stackoverflow.com/questions/4689/recommended-fonts-for-programming 推荐编程字体](英文)。<br />
<br />
==== TrueType 字体 ====<br />
<br />
* Agave ({{AUR|ttf-agave}}{{Broken package link|{{aur-mirror|ttf-agave}}}})<br />
* [[Wikipedia:zh:Andalé Mono|Andalé Mono]] ({{AUR|ttf-ms-fonts}})<br />
* Anka/Coder ({{AUR|ttf-anka-coder}}{{Broken package link|{{aur-mirror|ttf-anka-coder}}}})<br />
* [http://www.marksimonson.com/fonts/view/anonymous-pro Anonymous Pro] ({{Pkg|ttf-anonymous-pro}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* [[Wikipedia:zh:Bitstream Vera|Bitstream Vera Mono]] ({{Pkg|ttf-bitstream-vera}})<br />
* [[Wikipedia:zh:Consolas|Consolas]] ({{AUR|ttf-vista-fonts}}) - Windows 下的编程用字体<br />
* [[Wikipedia:zh:Courier|Courier New]] ({{AUR|ttf-ms-fonts}})<br />
* Cousine ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Courier New 替换 (metric-compatible)<br />
* [[Wikipedia:zh:DejaVu字体|DejaVu Sans Mono]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
* [[Wikipedia:zh:Droid|Droid Sans Mono]] ({{Pkg|ttf-droid}},也包含在 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
* Envy Code R ({{AUR|ttf-envy-code-r}})<br />
* Fantasque Sans Mono ({{AUR|ttf-fantasque-sans}} 或 {{AUR|ttf-fantasque-sans-git}})<br />
* [[Wikipedia:GNU FreeFont|FreeMono]] ({{Pkg|ttf-freefont}}) - Unicode<br />
* [[Wikipedia:Inconsolata|Inconsolata]] ({{Pkg|ttf-inconsolata}}) - 极佳的编程用字体<br />
* [[Wikipedia:Inconsolata|Inconsolata-g]] ({{AUR|ttf-inconsolata-g}}) - 加入一些亲近编程人员的调整<br />
* [[Wikipedia:Liberation fonts|Liberation Mono]] ({{Pkg|ttf-liberation}}) - 取代 Courier New,基于Cousine (metric-compatible)。<br />
* [[Wikipedia:Lucida Typewriter|Lucida Typewriter]] (包含于 {{AUR|jre}} 软件包)<br />
* [[Wikipedia:zh:Monaco|Monaco]] ({{AUR|ttf-monaco}}) - OSX/Textmate 下知名的编程用字体<br />
* Monofur ({{AUR|ttf-monofur}}) <br />
* [[Wikipedia:Source_Code_Pro|Source Code Pro]] ({{pkg|adobe-source-code-pro-fonts}})<br />
<br />
==== 点阵字体 ====<br />
*Default 8x16<br />
*Dina ({{Pkg|dina-font}})<br />
*[http://font.gohu.org/ Gohu] ({{AUR|gohufont}})<br />
*Lime ({{Pkg|artwiz-fonts}})<br />
*[[Wikipedia:ProFont|ProFont]] ({{Pkg|profont}})<br />
*[[Wikipedia:Proggy Programming Fonts|Proggy Programming Fonts]] ({{AUR|proggyfonts}})<br />
*Proggy opti cyrillic ({{AUR|proggyopticyr-font}}{{Broken package link|{{aur-mirror|proggyopticyr-font}}}})<br />
*Tamsyn ({{Pkg|tamsyn-font}})<br />
*[http://terminus-font.sourceforge.net/ Terminus] ({{Pkg|terminus-font}})<br />
*Unifont (glyphs like (look of disapproval)) ({{Pkg|bdf-unifont}})<br />
<br />
=== 无衬线字体 ===<br />
<br />
*[http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=andika Andika] ({{AUR|ttf-andika}},包含于 {{AUR|ttf-sil-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:zh:Arial|Arial Black]] ({{AUR|ttf-ms-fonts}})<br />
*Arimo ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Arial 替换 (metric-compatible)<br />
*[[Wikipedia:zh:Calibri|Calibri]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:Candara|Candara]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Constantia (typeface)|Constantia]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Corbel (typeface)|Corbel]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Sans]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:zh:Droid|Droid Sans]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSans]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Impact (typeface)|Impact]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Sans]] ({{Pkg|ttf-liberation}},取代 Arial, 基于 Arimo (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Biolinum]] ({{Pkg|ttf-linux-libertine}})<br />
*[[Wikipedia:Lucida Sans|Lucida Sans]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Microsoft Sans Serif|Microsoft Sans Serif]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:PT Sans|PT Sans]] ({{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - 3 种主要变体:正常、变窄与标题 - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:Source Sans Pro|Source Sans Pro]] ({{pkg|adobe-source-sans-pro-fonts}})<br />
*[[Wikipedia:zh:Tahoma (typeface)|Tahoma]] ({{AUR|ttf-tahoma}})<br />
*[[Wikipedia:Trebuchet MS|Trebuchet]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Ubuntu-Title|Ubuntu-Title]] ({{AUR|ttf-ubuntu-title}}{{Broken package link|{{aur-mirror|ttf-ubuntu-title}}}})<br />
*[[Wikipedia:Ubuntu Font Family|Ubuntu Font Family]] ({{Pkg|ttf-ubuntu-font-family}})<br />
*[[Wikipedia:zh:Verdana|Verdana]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 手写体 ===<br />
<br />
*[[Wikipedia:zh:Comic Sans|Comic Sans]] ({{AUR|ttf-ms-fonts}})<br />
<br />
=== 衬线字体 ===<br />
*[[Wikipedia:Cambria (typeface)|Cambria]] ({{AUR|ttf-vista-fonts}})<br />
*[[Wikipedia:Charis SIL|Charis]] ({{AUR|ttf-charis}}{{Broken package link|{{aur-mirror|ttf-charis}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:DejaVu字体|DejaVu Serif]] ({{Pkg|ttf-dejavu}}) - Unicode<br />
*[[Wikipedia:Doulos SIL|Doulos]] ({{AUR|doulos-sil}}{{Broken package link|{{aur-mirror|doulos-sil}}}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、西里尔字<br />
*[[Wikipedia:zh:Droid|Droid Serif]] ({{Pkg|ttf-droid}},包含于 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 和 {{AUR|ttf-google-fonts-git}})<br />
*[[Wikipedia:GNU FreeFont|FreeSerif]] ({{Pkg|ttf-freefont}}) - Unicode<br />
*[[Wikipedia:Gentium|Gentium]] ({{Pkg|ttf-gentium}},包含于 {{AUR|ttf-sil-fonts}}) - Unicode:拉丁字、希腊字、西里尔字、音标字母<br />
*[[Wikipedia:zh:Georgia (字型)|Georgia]] ({{AUR|ttf-ms-fonts}})<br />
*[[Wikipedia:Liberation fonts|Liberation Serif]] ({{Pkg|ttf-liberation}}) - 取代 Times New Roman,基于Tinos (metric-compatible)<br />
*[[Wikipedia:Linux Libertine|Linux Libertine]] ({{Pkg|ttf-linux-libertine}}) - Unicode:拉丁字、希腊字、西里尔字、希伯来字<br />
*[[Wikipedia:zh:Times New Roman|Times New Roman]] ({{AUR|ttf-ms-fonts}})<br />
*Tinos ({{AUR|ttf-chromeos-fonts}} 或 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 或 {{AUR|ttf-google-fonts-git}}) - Chrome/Chromium OS 的 Times New Roman 替换 (metric-compatible)<br />
<br />
=== 未分类字体 ===<br />
<!--这里的内容应该被分类放入衬线字体,无衬线字体和等宽字体小节内--><br />
*{{AUR|ttf-google-fonts-git}} 与 {{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} — 一个免费字体的大合集(囊括里 ubuntu、inconsolata、droid 等字体)-注意:如果安装这个包,您的系统内将添加 100 多个字体,这将会使您的字体对话框变得很长。{{AUR|ttf-google-fonts-hg}}{{Broken package link|{{aur-mirror|ttf-google-fonts-hg}}}} 会从上游网络字体项目中拖下整个 Mercurial 库。{{AUR|ttf-google-fonts-git}}则会从 Git 中拖下一个更小,更精简的非官方库。''(AUR)''<br />
*{{Pkg|ttf-mph-2b-damase}} — Covers full plane 1 and several scripts<br />
*{{Pkg|ttf-symbola}} — 提供了绘文字及其它一些符号。<br />
*{{AUR|ttf-sil-fonts}} — STL 内的 Gentium, Charis, Doulos, Andika and Abyssinica ''(AUR)''<br />
*{{Pkg|font-bh-ttf}} — X.Org Luxi 字体<br />
*{{Pkg|ttf-cheapskate}} — 从 ''dustismo.com'' 收集来的字体库<br />
*{{AUR|ttf-isabella}}{{Broken package link|{{aur-mirror|ttf-isabella}}}} — 一款书法字体,基于 1497 年的 ''Isabella Breviary''<br />
*{{Pkg|ttf-junicode}} — Junius 字体,几乎包括了所有中世纪的拉丁文字形<br />
*arkpandorafonts {{AUR|ttf-arkpandora}}{{Broken package link|{{aur-mirror|ttf-arkpandora}}}} — Arial 与 Times New Roman 字体的一个替代字体 ''(AUR)''<br />
*{{Pkg|xorg-fonts-type1}} — IBM Courier 和 Adobe Utopia 的 [[Wikipedia:PostScript fonts|PostScript 字体]]<br />
<br />
== X11中的字体回滚顺序 ==<br />
Fontconfig 会自动选择一个符合当前场景的字体。也就是说,如果有人正在浏览一个既有英文又有中文的窗口,而默认的字体不支持中文,它会自动切换到另一种字体以便显示中文。<br />
<br />
Fontconfig 让每个用户能够通过{{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}}来调整字体被使用的顺序。<br />
如果你想要在最喜欢的Serif字体之后使用某个特定的中文字体,你的配置文件看起来会是这样:<br />
<?xml version="1.0"?><br />
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"><br />
<fontconfig><br />
<alias><br />
<family>serif</family><br />
<prefer><br />
<family>你喜欢的拉丁衬线字体名称</family><br />
<family>你的中文衬线字体名称</family><br />
</prefer><br />
</alias><br />
</fontconfig><br />
<br />
当然你也可以为 Sans-serif和 monospace 字体像上面一样添加一段。更多信息请参考 fontconfig 说明。<br />
<br />
== 字体别名 ==<br />
在 Linux 系统中有几种字体别名,它们实际代表着别的字体,这样以达到让应用程序的字体看起来类似。最常见的别名有:{{ic|serif}} 代表一种[[Wikipedia:zh:衬线体|衬线体]](关于衬线体与非衬线体概念请参考[http://wiki.ubuntu.org.cn/%E5%AD%97%E4%BD%93#.E5.9F.BA.E7.A1.80.E7.9F.A5.E8.AF.86 UbuntuCN:字体#基础知识]——译注)(例如 DejaVu Serif、宋体);{{ic|sans-serif}}代表一种[[Wikipedia:zh:无衬线体|无衬线体]](例如 DejaVu Sans 和各种黑体);而{{ic|monospace}} 则代表[[Wikipedia:zh:等宽字体|等宽字体]](例如 DejaVu Sans Mono)。 然而,这些别名所代表的字体有可能会变化,而且通常 KDE 和其他桌面环境中的字体管理工具不会显示其内在联系。<br />
<br />
如果想通过别名反向查找是哪种字体被展现出来,运行:<br />
$ fc-match monospace<br />
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"<br />
<br />
在这种情况下 Monospace 别名展现的是 DejaVuSansMono.ttf 字体。<br />
<br />
== 小提示 ==<br />
<br />
=== 列出已安装字体 ===<br />
你可以使用以下命令来列出当前系统中所有已安装字体的字体:<br />
<br />
$ fc-list<br />
<br />
=== 应用程序专用的字体高速缓冲 ===<br />
<br />
Matplotlib ({{pkg|python-matplotlib}} 或 {{pkg|python2-matplotlib}}) 使用自己的字体高速缓冲,因此更新字体后记得删除 {{ic|$HOME/.matplotlib/fontList.cache}},{{ic|$HOME/.cache/matplotlib/fontList.cache}}, {{ic|$HOME/.sage/matplotlib-1.2.1/fontList.cache}} 等文件。这样它才会再一次产生高速缓冲并找到新字体 [http://matplotlib.1069221.n5.nabble.com/getting-matplotlib-to-recognize-a-new-font-td40500.html]。</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452905Infinality (简体中文)2016-10-04T14:46:52Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|Microsoft fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452904Infinality (简体中文)2016-10-04T14:46:20Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts (简体中文)}}<br />
{{Related|Font configuration (简体中文)}}<br />
{{Related|MS fonts (简体中文)}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452903Infinality (简体中文)2016-10-04T14:45:34Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[en:Infinality]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts}}<br />
{{Related|Font configuration}}<br />
{{Related|MS fonts}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Infinality|2016-09-22|451547}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452902Infinality (简体中文)2016-10-04T14:40:16Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts (简体中文)]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
[[zh-CN:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts}}<br />
{{Related|Font configuration}}<br />
{{Related|MS fonts}}<br />
{{Related articles end}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452900Infinality (简体中文)2016-10-04T14:38:50Z<p>Echizenryoma: Created page with "Category:Fonts ja:Infinality ru:Infinality zh-CN:Infinality {{Related articles start}} {{Related|Fonts}} {{Related|Font configuration}} {{Related|MS fonts}} {{..."</p>
<hr />
<div>[[Category:Fonts]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
[[zh-CN:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts}}<br />
{{Related|Font configuration}}<br />
{{Related|MS fonts}}<br />
{{Related articles end}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Infinality&diff=452899Infinality2016-10-04T14:38:00Z<p>Echizenryoma: </p>
<hr />
<div>[[Category:Fonts]]<br />
[[ja:Infinality]]<br />
[[ru:Infinality]]<br />
[[zh-CN:Infinality]]<br />
{{Related articles start}}<br />
{{Related|Fonts}}<br />
{{Related|Font configuration}}<br />
{{Related|MS fonts}}<br />
{{Related articles end}}<br />
The [http://www.infinality.net/ infinality] patchset aims to greatly improve font rendering in freetype2 and friends. It adds multiple new capabilities.<br />
<br />
Infinality's settings are configurable at runtime via environment variables and include the following:<br />
<br />
*'''Emboldening Enhancement''': Disables Y emboldening, which may improve results on fonts without bold versions (native TT hinter, autohinter).<br />
*'''Auto-Autohint''': Automatically forces autohint on fonts that contain no TT instructions.<br />
*'''Autohint Enhancement''': Makes autohint snap horizontal stems to pixels. Gives a result that appears like a well-hinted truetype font.<br />
*'''Customized FIR Filter''': Select [http://www.infinality.net/forum/viewtopic.php?f=2&t=19 filter values] at run-time (native TT hinter, auto-hinter).<br />
*'''Stem Alignment''': Aligns bitmap glyphs to pixel boundaries. Works on native TT hinter and autohinter.<br />
*'''Pseudo Gamma Correction''': Lighten and darken glyphs at a given value, below a given size (native TT hinter, autohinter).<br />
*'''Embolden Thin Fonts''': Embolden thin or light fonts so that they are more visible (autohinter).<br />
*'''Force Slight Hinting''': Force slight hinting even when programs want full hinting.<br />
*'''ChromeOS Style Sharpening''': ChromeOS uses a patch to sharpen the look of fonts. This is now included in the infinality patchset.<br />
<br />
See the [http://www.infinality.net/forum/viewtopic.php?f=2&t=18 README] for details.<br />
<br />
{{Accuracy|Upstream and Bohoomil have different ideas for the config paths. Upstream seems to be gone and in the Bohoomil's ''infinality-bundle'', [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/generic_settings/infinality-settings.sh upstream config] is available at {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic}} and {{ic|/usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh}} is intended to be copied to {{ic|/etc/X11/xinit/xinitrc.d/}}.}}<br />
<br />
A number of presets are included and can be used by setting the USE_STYLE variable in {{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}.<br />
<br />
Variables should be set in {{ic|/etc/profile.d/infinality-settings.sh}}. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/freetype/infinality-settings.sh infinality-settings.sh] for a template.<br />
<br />
== Installation ==<br />
<br />
{{Warning|Upstream infinality patches are intended for the older 2.4x freetype2 branch. Users are advised to use the [[#Infinality-bundle|infinality-bundle]] by ''bohoomil''.}}<br />
<br />
{{Accuracy|Not clear from this section what bohoomil's bundle '''does'''. How are the patches different from stock infinality, apart from working with newer freetype versions? "presets" etc.}}<br />
<br />
=== Infinality-bundle ===<br />
<br />
'''Infinality-bundle''' is a collection of software aiming to improve text rendering in Arch Linux by bohoomil.<br />
<br />
Currently, the bundle comprises:<br />
<br />
* ''freetype2-infinality-ultimate'' &ndash; {{Pkg|freetype2}} built with [http://www.infinality.net/blog/ Infinality] and additional patches.<br />
* ''fontconfig-infinality-ultimate'' &ndash; {{Pkg|fontconfig}} optimized for use with ''freetype2-infinality-ultimate'', including separate configuration presets for free (default), MS and custom font collections. See [https://github.com/bohoomil/fontconfig-ultimate/blob/master/fontconfig_patches/CHANGELOG CHANGELOG] for a list of changes.<br />
* ''cairo-infinality-ultimate'' &ndash; {{Pkg|cairo}} built with Ubuntu and additional patches.<br />
* ''jdk8-openjdk-infinality'' &ndash; {{Pkg|jdk8-openjdk}} with infinality patch applied.<br />
<br />
A complementary repository ''infinality-bundle-fonts'' is available, offering a selection of typefaces needed to create and reproduce hypertext documents. All fonts are fully freely available and licensed under GPL, OFL, Apache or compatible, non-restrictive licenses.<br />
<br />
By default, no additional configuration is required. To customize bundle settings, see [[#Configuration]].<br />
<br />
The installation consists of adding the selected repositories to {{ic|pacman.conf}} and [[installing]] the packages from the relevant groups or meta packages. Remember to restart the X server after the installation to see the changes.<br />
<br />
* The [[Unofficial user repositories#infinality-bundle|infinality-bundle]] repository contains core packages gathered into the ''infinality-bundle'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-multilib|infinality-bundle-multilib]] repository contains optional multilib libraries for the x86_64 architecture gathered in the ''infinality-bundle-multilib'' group.<br />
* The [[Unofficial user repositories#infinality-bundle-fonts|infinality-bundle-fonts]] repository contains a comprehensive collection of free fonts gathered in the ''ibfonts-meta-base'', ''ibfonts-meta-extended'' and ''ibfonts-meta-extended-lt'' meta packages.<br />
<br />
{{Note|<br />
* Do not forget to add key ID 962DDE58 to your pacman keyring. See [[Pacman-key#Adding unofficial keys]] to detailed instructions.<br />
* When pacman resolves dependencies and encounters a conflicting package, e.g.: {{bc|<nowiki><br />
resolving dependencies...<br />
looking for inter-conflicts...<br />
:: freetype2-infinality-ultimate and freetype2 are in conflict. Remove freetype2? [y/N]<br />
</nowiki>}} answer {{ic|yes}}.<br />
}}<br />
<br />
==== Additional fonts ====<br />
<br />
If you want to install even more fonts, there is an additional ''infinality-bundle-fonts-extra'' collection. Run<br />
<br />
$ pacman -Ss infinality-bundle-fonts-extra<br />
<br />
to list available packages.<br />
<br />
{{Warning|'''Do not''' attempt to install the entire ''infinality-bundle-fonts'' or ''infinality-bundle-fonts-extra'' group. Unless you know for sure you need any of the fonts available there, you will only unnecessarily clutter your hard drive and decrease performance of the font cache. ''ibfonts-meta-extended'' should suffice in most, even very complex, use scenarios. Besides, several font families are available in multiple formats (T1, TTF, OTF): trying to install all font packages will lead to unresolvable package conflicts. If this is the case, you should always use only '''one''' format per family.<br />
}}<br />
{{Tip|Before you install any third party font from either [[official repositories]] or the [[AUR]], always check if it is available in the ''infinality-bundle-fonts'' collection.<br />
}}<br />
<br />
{{Note|When '''reporting bugs''', please report all code-related issues (incorrect rendering, fontconfig problems, etc.) at GitHub [https://github.com/bohoomil/fontconfig-ultimate/issues Issues * bohoomil/fontconfig-ultimate] and Arch specific, including problems regarding maintenance, packaging and general questions, in dedicated threads at Arch Forums. Before filing a report, make sure that [infinality-bundle] packages were correctly installed and customized.<br />
}}<br />
<br />
=== AUR ===<br />
<br />
As of 2016-04, the following AUR packages containing (mainly Bohoomil's) Infinality patches are available:<br />
<br />
* {{AUR|freetype2-infinality}}<br />
* {{AUR|fontconfig-infinality}}<br />
* {{AUR|cairo-infinality}}<br />
* {{AUR|jdk8-openjdk-infinality}}<br />
** In {{AUR|jdk7-openjdk-infinality}} (IcedTea JDK7), the Infinality patch is already included, so all the maintainer did was setting <tt>--enable-infinality=yes</tt>.<br />
<br />
Although these packages are using the same source of patches as Bohoomil's repo does, they often target a specific commit in Bohoomil's repo and can be lagging behind. The packagers may also have their own ideas on what patches to apply.<br />
<br />
Besides {{AUR|freetype2-infinality}}, it is recommended to also install {{AUR|fontconfig-infinality}} to enable selection of predefined font substitution styles and antialiasing settings, apart from the rendering settings of the engine itself.<br />
<br />
== Configuration ==<br />
<br />
=== Fonts with restricted licenses ===<br />
<br />
Below you will find a list of fonts that cannot be freely redistributed and thus could not be included in the ''infinality-bundle-fonts'' collection as binary packages. However, they can still be installed and used free of charge under specified conditions. Source packages can be found in the [[AUR]]. Please, read the EULAs for details before you use the fonts!<br />
<br />
*{{AUR|ttf-brill}}<br />
*{{AUR|otf-neris}}<br />
*{{AUR|ttf-aller}}<br />
*{{AUR|ttf-envy-code-r}}<br />
<br />
=== Xft and FreeType settings ===<br />
<br />
Settings should duplicate those found in the [[Font configuration#Applications without fontconfig support|Xft]] configuration file ({{ic|/etc/X11/xinit/xinitrc.d/xft-settings.sh}}):<br />
<br />
{{bc|<br />
Xft.antialias: 1<br />
Xft.autohint: 0<br />
Xft.dpi: 96<br />
Xft.hinting: 1<br />
Xft.hintstyle: hintfull<br />
Xft.lcdfilter: lcddefault<br />
Xft.rgba: rgb<br />
}}<br />
<br />
Aside from these values you can modify {{ic|INFINALITY_FT}} [[environment variable]]s. For example:<br />
<br />
{{bc|<nowiki><br />
# Makes fonts darker and thicker<br />
export INFINALITY_FT_BRIGHTNESS="-10"<br />
<br />
# Not too sharp, not too smooth<br />
export INFINALITY_FT_FILTER_PARAMS="16 20 28 20 16"</nowiki><br />
}}<br />
<br />
{{Note|Customisations will be saved in a {{ic|.pacsave}} file on an update of the infinality package.}}<br />
<br />
=== Fontconfig settings ===<br />
<br />
Infinality-patched [[fontconfig]] provides a different set of example/avail and default configurations. There are also multiple presets available. Run {{ic|fc-presets help}} for more information.<br />
<br />
For example, it is possible to skip installation of ''infinality-bundle-fonts'' if you want to use Microsoft proprietary font collection instead. If this is the case, you have to activate fontconfig MS preset to ensure the correct set of fonts is selected. To do so, issue<br />
<br />
{{hc|# fc-presets set|<br />
1) combi<br />
2) free<br />
3) ms<br />
4) reset<br />
5) quit<br />
Enter your choice...<br />
}}<br />
<br />
and select {{ic|3}}.<br />
<br />
If you would rather use a custom font collection, there is a {{ic|combi}} preset available that should let you adjust fontconfig parameters accordingly. When you activate the {{ic|combi}} preset, the content of 'custom' configuration files ({{ic|/etc/fonts/conf.avail.infinality/combi}}) can be freely modified. When you are done, do not forget to create a backup copy of the 'combi' directory.<br />
<br />
{{Note|<br />
* Install {{AUR|grip-git}} from the AUR to have a realtime font preview.<br />
* The {{ic|README}} for {{AUR|fontconfig-infinality}} says that {{ic|/etc/fonts/local.conf}} should either not exist, or have no infinality-related configurations in it. The {{ic|local.conf}} is now obsolete and completely replaced by this configuration.<br />
}}<br />
<br />
==== Font substitutions ====<br />
<br />
To override default font substitutions set in {{ic|/etc/fonts/conf.d/37-repl-global-''preset''.conf}} or add new ones, use {{ic|/etc/fonts/conf.d/35-repl-custom.conf}} to do so. You will need to duplicate the template (16 lines of code) for each font family to be replaced and provide appropriate font names.<br />
<br />
== Troubleshooting ==<br />
<br />
See also [[Font configuration#Troubleshooting]].<br />
<br />
=== Spotify ===<br />
<br />
When experiencing font rendering issues with Spotify [http://i.imgur.com/E51vt2b.jpg], try the following font settings: <br />
<br />
{{bc|<nowiki><br />
USE_STYLE="2"<br />
export INFINALITY_FT_FRINGE_FILTER_STRENGTH="50"<br />
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"<br />
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH="20"<br />
export INFINALITY_FT_GAMMA_CORRECTION="30 80"<br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="25"<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH="25"<br />
</nowiki>}}<br />
<br />
=== Google Chrome ===<br />
<br />
To solve rendering issues in Google Chrome [https://bbs.archlinux.org/viewtopic.php?pid=1344172#p1344172], edit {{ic|/etc/fonts/fonts.conf}} file and uncomment the following entry:<br />
<br />
{{bc|<nowiki><!--match target="pattern"><br />
<edit name="dpi" mode="assign"><br />
<double>72</double><br />
</edit><br />
</match--></nowiki>}}<br />
<br />
=== Emacs ===<br />
<br />
{{Merge|Emacs|This issue does not seem related to infinality, but rather a general font issue with Emacs}}<br />
<br />
Emacs users have reported issues with Noto Sans as the default sans-serif font. This will affect any font face that specifies "Sans Serif" as the font family including the variable-pitch face that is used in Emacs Info mode. <br />
<br />
Noto Sans is a collection of many individual language specific font files. Emacs does not find the correct version when it tries to render the font and displays glyphs instead. <br />
<br />
To get around the issue you need to either specify a different default Sans Serif font for all applications or modify the font family for any faces that specify "Sans Serif" within Emacs.<br />
<br />
To change the default font for all applications place the following:<br />
<br />
{{bc|<br />
<alias><br />
<family>sans-serif</family><br />
<prefer><br />
<family>Liberation Sans</family><br />
</prefer><br />
</alias><br />
}}<br />
<br />
in either {{ic|/etc/fonts/conf.avail.infinality/35-repl-custom.conf}} for global effect or {{ic|$XDG_CONFIG_HOME/fontconfig/fonts.conf}} or {{ic|$XDG_CONFIG_HOME/fontconfig/conf.d/60-latin.conf}} for a single user. For `combi` users, {{ic|60-latin-combi.conf}} should be modified accordingly.<br />
<br />
The default font can be any but Noto Sans.<br />
<br />
To change the font in Emacs only:<br />
<br />
If you prefer Noto Sans for other applications and just want to fix Emacs specifically then you can specify a new Font Family for the variable pitch face. This could be done via customize (M-x customize-face RET variable-pitch RET) or by placing the following code in {{ic|$HOME/.emacs}} or {{ic|$HOME/emacs.d/init.el}}.<br />
<br />
{{bc|<br />
(custom-set-faces<br />
'(variable-pitch ((t (:family "Liberation Sans")))))<br />
}}<br />
<br />
Note that there may be other faces either in default Emacs or specified by themes that also use the default Sans Serif font and would have to be modified in the same way. Changing the system wide default to something like Liberation Sans is therefore a more universal fix.<br />
<br />
=== GIMP ===<br />
<br />
GIMP users have reported issues with the subpixel rendering of text in images (see for example [http://www.infinality.net/forum/viewtopic.php?f=2&t=229 this topic]). The best course of action is to disable subpixel rendering completely for GIMP. Add a file {{ic|/etc/gimp/2.0/fonts.conf}} (or {{ic|~/.gimp-2.8/fonts.conf}} for a single user) with the following content:<br />
<br />
{{hc|/etc/gimp/2.0/fonts.conf|<nowiki><br />
<fontconfig><br />
<match target="font"><br />
<edit name="rgba" mode="assign"><br />
<const>none</const><br />
</edit><br />
</match><br />
</fontconfig><br />
</nowiki>}}<br />
<br />
=== Language specifics diacritics / glyphs ===<br />
<br />
Some language specifics diacritics / glyphs are displayed inconsistently using default font.<br />
<br />
This is usually the case with websites (notably blogs) utilizing predefined CSS templates that make use of web fonts missing support for extended Latin scripts (most often A and B). Even though this is not a problem with any of the infinality-bundle components and thus should be fixed by the author / maintainer of the problematic site, it can still be got round by creating a relevant font replacement rule in fontconfig. If you want to use this option, activate {{ic|36-repl-missing-glyphs.conf}} first:<br />
<br />
$ cd /etc/fonts/conf.d<br />
$ ln -s ../conf.avail.infinality/36-repl-missing-glyphs.conf .<br />
<br />
and then edit the file accordingly following the provided example.<br />
<br />
{{Note|Default fonts for non-Latin scripts are set in {{ic|65-non-latin-''preset''.conf}} (default settings).}}<br />
<br />
Overriding default replacement rules and adding custom ones is possible with {{ic|35-repl-custom.conf}}. The file is activated by default, so all you need to do is edit if you want to use it.<br />
<br />
=== Firefox/Chrome browsers rendering monospaced with proportional font ===<br />
<br />
You can check which font the browser is using with the {{ic|fc-match}} tool. If for {{ic|"monospace"}} you get a proportional font like Arial<br />
<br />
# fc-match "monospace"<br />
monospace: arial.ttf: "Arial" "Normal"<br />
<br />
you probably should run <br />
<br />
# fc-presets set<br />
<br />
=== CJK character distortion ===<br />
<br />
Some CJK characters like "的" "照" "吧" are likely to deform under certain sizes[https://github.com/bohoomil/fontconfig-ultimate/issues/182]. Disabling certain aspects of the autohinter can help:<br />
<br />
{{bc|<nowiki><br />
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=0<br />
export INFINALITY_FT_STEM_FITTING_STRENGTH=0<br />
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=0<br />
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=0<br />
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=0<br />
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false<br />
</nowiki>}}<br />
<br />
=== General problems with fonts ===<br />
<br />
{{merge|Font configuration|not specific to infinality}}<br />
<br />
If you experience general problems with fonts (e.g. certain glyphs are not loaded in PDF documents, while a font family providing them has been correctly installed), start troubleshooting by issuing<br />
<br />
# fc-cache -fr<br />
<br />
This will remove the entire font cache and recreate it from scratch.<br />
<br />
== See also ==<br />
<br />
* [http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html Short article about infinality (contains screenshots)]<br />
* [http://bohoomil.com Infinality bundle and fonts] - Home page of the infinality bundle<br />
* [https://github.com/bohoomil/fontconfig-ultimate fontconfig-ultimate] - git repository providing all patches, configuration files and build scripts for the entire ''infinality-bundle+fonts'' collection in separate branches <br />
* [https://bbs.archlinux.org/viewtopic.php?id=162098 infinality-bundle: good looking fonts made (even) easier] - ''infinality-bundle'' support thread in the Arch Linux Forums<br />
* [https://bbs.archlinux.org/viewtopic.php?id=170976 infinality-bundle-fonts: a free multilingual font collection for Arch] - ''infinality-bundle-fonts'' support thread in the Arch Linux Forums</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452897Cinnamon (简体中文)2016-10-04T14:29:28Z<p>Echizenryoma: /* Disable the NetworkManager applet */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon 通过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}}和{{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:<br />
<br />
$ gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== 禁用''网络管理''小程序 ===<br />
<br />
即使你不使用[[NetworkManager]]或者从默认面板删除''网络管理''小程序,Cinnamon依然会载入''nm-applet'' 并显示在系统托盘上。你'''不能'''卸载[[NetworkManager]],因为[[NetworkManager]]被{{Pkg|cinnamon}}和{{Pkg|cinnamon-control-center}}需要,但是你可以很容易将其禁用。首先,你应该把自启动文件从{{ic|/etc/xdg/autostart/nm-applet.desktop}}复制到{{ic|~/.config/autostart/nm-applet.desktop}}。然后用你喜欢的文本编辑器打开,并在最后加上{{ic|1=X-GNOME-Autostart-enabled=false}}。<br />
<br />
另外,你也可以通过创建以下符号链接来禁用:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452893Cinnamon (简体中文)2016-10-04T13:47:02Z<p>Echizenryoma: /* 安装 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon 通过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}}和{{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:<br />
<br />
$ gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452891Cinnamon (简体中文)2016-10-04T13:45:14Z<p>Echizenryoma: /* 调整窗口的大小 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}}和{{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:<br />
<br />
$ gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452890Cinnamon (简体中文)2016-10-04T13:43:54Z<p>Echizenryoma: /* 调整窗口的大小 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}}和{{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:<br />
<br />
gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452889Cinnamon (简体中文)2016-10-04T13:42:39Z<p>Echizenryoma: /* 图标和主题 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}}和{{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452888Cinnamon (简体中文)2016-10-04T13:41:23Z<p>Echizenryoma: /* 音效 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 声音效果 ===<br />
<br />
Cinnamon没有附带那些Linux Mint默认使用的像桌面启动之类声音事件。这些声音效果可与安装{{AUR|cinnamon-sound-effects}}和{{AUR|mint-sounds}}。声音事件可以在{{ic|Settings → Sound → Sound Effects}}编辑。<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452887Cinnamon (简体中文)2016-10-04T13:32:42Z<p>Echizenryoma: /* 按下电源按钮睡眠 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}'''系统设置''',点击'''电源管理'''。更改'''按下电源按钮时'''选项,选择你所希望使用的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452886Cinnamon (简体中文)2016-10-04T13:28:37Z<p>Echizenryoma: /* Cinnamon系统设置 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'':<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}}<br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}”系统设置“,点击“电源管理”选项。更改“按下电源按钮时”选项,选择你希望的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452882Cinnamon (简体中文)2016-10-04T13:22:49Z<p>Echizenryoma: /* 按下电源按钮睡眠 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'' 、<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}} <br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。如需更改,打开{{ic|cinnamon-settings}}”系统设置“,点击“电源管理”选项。更改“按下电源按钮时”选项,选择你希望的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452880Cinnamon (简体中文)2016-10-04T13:20:36Z<p>Echizenryoma: /* Menu editor */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'' 、<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}} <br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。更改设置,打开{{ic|cinnamon-settings}}设置面板,点击“电源管理”选项。更改“当按下电源按钮”选项,选择你希望的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== 菜单编辑器 ===<br />
<br />
菜单小程序支持自定义命令。右键单击"菜单"小程序,然后点击"配置...",然后点击“打开菜单编辑器”。选择一个子菜单(或者创建一个新的子菜单),然后选择“新建项目”。填好名称、命令和备注。如果需要在终端运行,选中“在终端运行”复选框,图形化应用程序不选中“在终端运行”复选框。然后点击”确定“并关闭菜单编辑器。启动器就添加到了菜单。<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452753Cinnamon (简体中文)2016-10-03T05:15:00Z<p>Echizenryoma: /* 配置 */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'' 、<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}} <br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
===按下电源按钮睡眠===<br />
<br />
这是电源按钮默认的操作。更改设置,打开{{ic|cinnamon-settings}}设置面板,点击“电源管理”选项。更改“当按下电源按钮”选项,选择你希望的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== Menu editor ===<br />
<br />
The Menu applet supports launching custom commands. Right click on the applet, click on ''Configure...'' and then ''Open the menu editor''. Select a sub-menu (or create a new one) and select ''New Item''. Set ''Name'', ''Command'' and ''Comment''. Check the launch in terminal checkbox if needed. Leave unchecked for graphical applications. Click ''OK'' and close the menu editor afterwards. The launcher is added to the menu.<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryomahttps://wiki.archlinux.org/index.php?title=Cinnamon_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)&diff=452752Cinnamon (简体中文)2016-10-03T05:14:28Z<p>Echizenryoma: /* Pressing power buttons suspend the system */</p>
<hr />
<div>[[Category:Desktop environments (简体中文)]]<br />
[[en:Cinnamon]]<br />
[[ja:Cinnamon]]<br />
[[ru:Cinnamon]]<br />
[[tr:Cinnamon Masaüstü Ortamı]]<br />
{{Related articles start (简体中文)}}<br />
{{Related|Nemo}}<br />
{{Related|GNOME}}<br />
{{Related|MATE}}<br />
{{Related|Desktop environment}}<br />
{{Related|Display manager}}<br />
{{Related articles end}}<br />
{{TranslationStatus (简体中文)|Cinnamon|2016-09-12|436684}}<br />
[http://cinnamon.linuxmint.com/ Cinnamon] 是一个提供先进创新的特点和传统的用户体验的Linux桌面。然而,底层的技术是基于 [[GNOME]] 的分支. 在Cinnamon 2.2版本中,Cinnamon已经是一个完整的桌面环境,不仅仅是一个GNOME的前端。<br />
<br />
== 安装 ==<br />
<br />
Cinnamon通 过包 {{Pkg|cinnamon}} 进行 [[安装]].<br />
<br />
== 启动 Cinnamon ==<br />
<br />
=== 图形化登录 ===<br />
<br />
在你喜欢的 [[display manager]] 选择 ''Cinnamon'' 或者是 ''Cinnamon (Software Rendering)'' 。Cinnamon选项是3D加速的版本,一般使用这个。如果你的显卡驱动出现问题,试试“'cinnamon(软件渲染)”,这个禁用了3D加速。<br />
<br />
=== 手动启动Cinnamon ===<br />
<br />
如果你喜欢控制台启动Cinnamon, 添加以下行到 [[Xinitrc]]:<br />
<br />
{{hc|~/.xinitrc|<br />
exec cinnamon-session<br />
}}<br />
<br />
如果你想用 ''Cinnamon (Software Rendering)'' , 用 {{ic|cinnamon-session-cinnamon2d}} 代替 {{ic|cinnamon-session}}.<br />
<br />
== 配置 ==<br />
<br />
Cinnamon很容易配置,大部分的配置都是在图形化界面下完成。更多详情可查看以下网站[http://cinnamon-spices.linuxmint.com/applets applets]/ [http://cinnamon-spices.linuxmint.com/extensions extensions]/[http://cinnamon-spices.linuxmint.com/themes theming]. <br />
<br />
=== Cinnamon系统设置 ===<br />
<br />
启动''cinnamon系统设置'' 、<br />
<br />
$ cinnamon-settings<br />
<br />
查看设置界面的模块:<br />
<br />
$ pacman -Ql cinnamon | awk -F'[_.]' '/cs_.+\.py/ {print $2}'<br />
<br />
打开其中的一个模块 <br />
<br />
$ cinnamon-settings 模块名称<br />
<br />
示例:<br />
<br />
$ cinnamon-settings panel<br />
<br />
;打印机<br />
:安装 {{Pkg|system-config-printer}} 进行打印机配置<br />
;网络<br />
:添加网络模块的支持, 请看 [[NetworkManager#Configuration|Network Manager]].要在 Network manager 里面保存 Wifi 密码,需要安装 [[GNOME Keyring]]。<br />
;蓝牙<br />
:安装软件包 {{Pkg|blueberry}} <br />
<br />
=== 应用程序和扩展 ===<br />
<br />
许多cinnamon的应用程序和扩展可以在 [[AUR]], ([https://aur.archlinux.org/packages.php?O=0&K=cinnamon-&do_Search=Go package search])找到,也可以在Cinnamon的“小程序”和“拓展”中找到 (''在线获取更多''选项卡中):<br />
<br />
$ cinnamon-settings applets<br />
$ cinnamon-settings extensions<br />
<br />
也可以从 [http://cinnamon-spices.linuxmint.com/ Cinnamon spices]下载并手动安装.<br />
<br />
{{Note|如果你安装后没有发现这些拓展或者是应用程序, 用 {{ic|Alt+F2}} 并在对话框键入 {{ic|r}} 重启 Cinnamon .}}<br />
<br />
=== Pressing power buttons suspend the system ===<br />
<br />
This is the default behaviour. To change the setting open the {{ic|cinnamon-settings}} panel and click on the "Power Management" option. Change the "When the power button is pressed" option to your desired behaviour.<br />
<br />
===按下电源按钮睡眠===<br />
这是电源按钮默认的操作。更改设置,打开{{ic|cinnamon-settings}}设置面板,点击“电源管理”选项。更改“当按下电源按钮”选项,选择你希望的操作。<br />
<br />
=== 管理 Cinnamon 使用的语言 ===<br />
<br />
{{Note|Cinnamon 控制面板从 2.2 版本开始删除了语言配置模块[http://segfault.linuxmint.com/2014/04/cinnamon-2-2/]}}<br />
<br />
* 要添加删除语言,请查看 [[Locale]].<br />
* 要在启用的语言间切换,请安装软件包 {{AUR|mintlocale}}.<br />
* 要修改键盘布局: '''System Settings > Hardware > Keyboard > Layouts'''.<br />
<br />
== 小贴士 ==<br />
<br />
=== 创建自定义应用程序 ===<br />
<br />
关于创建自定义应用程序,可以在 [http://developer.linuxmint.com/reference/2.6/cinnamon-tutorials/write-applet.html 这里]和[http://cinnamon.linuxmint.com/?p=144 这里] 找到教程.<br />
<br />
=== 默认的桌面背景壁纸路径 ===<br />
<br />
当你在Cinnamon设置自定义的路径的壁纸,, Cinnamon 会将其复制到 {{ic|~/.cinnamon/backgrounds}}. 因此, 每一个改变你的壁纸,你都得再次在设置菜单添加你的墙纸到或将其复制到 {{ic|~/.cinnamon/backgrounds}}.<br />
<br />
=== 添加“计算机”“主目录”“回收站”等常用图标与新的启动器 ===<br />
<br />
你可以在“设置”=>“桌面”添加部分常有图标,如“计算机”“主目录”“回收站”等。如要添加其它的启动器,右击桌面并选择“在此创建一个新的启动器”即可。<br />
<br />
=== Menu editor ===<br />
<br />
The Menu applet supports launching custom commands. Right click on the applet, click on ''Configure...'' and then ''Open the menu editor''. Select a sub-menu (or create a new one) and select ''New Item''. Set ''Name'', ''Command'' and ''Comment''. Check the launch in terminal checkbox if needed. Leave unchecked for graphical applications. Click ''OK'' and close the menu editor afterwards. The launcher is added to the menu.<br />
<br />
=== 工作区 ===<br />
<br />
默认情况下,有2个工作区。增加,按Ctrl+ Alt +上键显示所有的工作区。然后点击右边的加号按钮在屏幕添加更多的工作区。<br />
<br />
=== 隐藏桌面图标 ===<br />
<br />
用下面的命令更改设置:<br />
<br />
$ gsettings set org.nemo.desktop show-desktop-icons false<br />
<br />
=== 图标和主题 ===<br />
<br />
Linux Mint风格的主题和图标可以在AUR安装: {{AUR|mint-x-theme}} and {{AUR|mint-x-icons}}. 可以在 {{ic|Settings → Themes → Other settings}}编辑主题.<br />
<br />
Linux Mint Cinnamon 官方主题可以通过 {{AUR|mint-cinnamon-themes}} 软件包进行安装.<br />
<br />
=== 音效 ===<br />
<br />
Cinnamon does not come with sounds used for events like the startup of the desktop that are also used in Linux Mint by default. These sound effects can be installed with the {{AUR|cinnamon-sound-effects}} and {{AUR|mint-sounds}} packages. The sound events can be edited in {{ic|Settings → Sound → Sound Effects}}.<br />
<br />
=== 调整窗口的大小 ===<br />
<br />
用Alt+右键调整窗口的大小,使用gsettings:gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true<br />
<br />
=== 截图 ===<br />
<br />
As explained in [[Taking_a_screenshot#Cinnamon|Taking a screenshot]], installing {{Pkg|gnome-screenshot}} will add this functionality. The default shortcut key is {{ic|Prt Sc}} key. This binding ca be changed in the applet ''Menu > Preferences > Keyboard'' under ''Shortcuts > System > Screenshots and Recording''. The default save directory is {{ic|$HOME/Pictures}}, but can be customized with eg.<br />
<br />
$ gsettings set org.gnome.gnome-screenshot auto-save-directory file:///home/''USER''/''some_path''<br />
<br />
== 故障排除 ==<br />
<br />
=== cinnamon设置无法找到一个特定的模块 ===<br />
<br />
If ''cinnamon-settings'' does not start with the message that it cannot find a certain module, e.g. the Image module, it is likely that it uses outdated compiled files which refer to no longer existing file locations. In this case remove all {{ic|*.pyc}} files in {{ic|/usr/lib/cinnamon-settings}} and its sub-folders. See the [https://github.com/linuxmint/Cinnamon/issues/2495 upstream bug report].<br />
<br />
=== Video tearing ===<br />
<br />
Because {{Pkg|muffin}} is based upon {{Pkg|mutter}}, video tearing fixes for [[GNOME]] should also work in Cinnamon. See [[GNOME/Troubleshooting#Tear-free video with Intel HD Graphics]] for more information.<br />
<br />
=== Disable the NetworkManager applet ===<br />
<br />
Even if you do not use [[NetworkManager]] and remove the ''Network Manager'' applet from the default panel, Cinnamon will still load ''nm-applet'' and display it in the system tray.<br />
You cannot uninstall the package, because it is required by {{Pkg|cinnamon}} and {{Pkg|cinnamon-control-center}}, but you can still easily disable it. To do so copy the autostart file from {{ic|/etc/xdg/autostart/nm-applet.desktop}} to {{ic|~/.config/autostart/nm-applet.desktop}}. Open it with your favorite text editor and add at the end {{ic|1=X-GNOME-Autostart-enabled=false}}.<br />
<br />
Alternatively you can disable it is by creating the following symlink:<br />
<br />
$ ln -s /bin/true /usr/local/bin/nm-applet</div>Echizenryoma