Font configuration (한국어)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Tango-preferences-desktop-locale.pngThis article or section needs to be translated.Tango-preferences-desktop-locale.png

Notes: A majority of the article is not translated (Discuss in Talk:Font configuration (한국어))

Fontconfig는 어플리케이션에 사용 가능한 폰트의 목록을 제공하는 목적으로 설계된 라이브러리이다. 이외에도, 폰트 렌더링에 관한 설정 기능을 제공하며, FreeType 라이브러리는 이 설정을 반영하여 폰트를 렌더링한다. Arch Linux의 freetype2 폰트 렌더링 패키지는 (특히 LCD 모니터에서의) 향상된 폰트 렌더링을 위해, 활성화된 바이트코드 인터프리터 (bytecode interpreter, BCI)를 포함한다. 이에 관해서는 #Fontconfig 설정Font configuration/Examples를 참고.

Fontconfig는 모던 Unix와 Unix계 운영 체제에서 많이 사용되지만, 일부 어플리케이션에서 폰트 셀렉션(selection)과 표시에 있어서 더 근본적인 솔루션인 X Logical Font Description를 채용하는 경우가 존재한다.

폰트 경로

어플리케이션이 폰트에 접근하여 사용할 수 있도록, 폰트는 특정 경로에 저장되게 된다.

Fontconfig의 초기 폰트 경로 설정은 /usr/share/fonts/, ~/.local/share/fonts (그리고 ~/.fonts/, 현재는 사용되지 않음) 이며, Fontconfig는 이 디렉토리를 탐색하게 되어있다. 설치와 관리의 편의를 위하여, 상기 경로에 폰트를 설치하는 것이 권장된다.

Fontconfig에서 관리되고 있는 폰트의 리스트를 다음 명령어를 통해 출력할 수 있다.

$ fc-list : file

출력 포맷에 관해서는 fc-list(1)을 참조할 것.

Xorg가 인식한 폰트 경로에 관해서는 다음 로그 파일을 참조할 것.

$ grep /fonts ~/.local/share/xorg/Xorg.0.log
도움말:
  • xset q 명령어를 이용하여 Xorg가 인식하고 있는 폰트를 출력하는 것 또한 가능하다.
  • Xorg를 root 권한으로 실행하는 경우에는 /var/log/Xorg.0.log를 대신 실행할 것.

Xorg는 Fontconfig와는 다르게, /usr/share/fonts/ 디렉토리를 재귀적으로 탐색하지 않음에 주의할 것. 경로를 추가하고 싶은 경우에는 전체 경로를 사용하여야 한다:

Section "Files"
    FontPath     "/usr/share/fonts/local/"
EndSection

만약 폰트 경로를 사용자 별로 설정하고 싶다면, 다음과 같은 라인을 ~/.xinitrc에 추가하는 것으로 폰트 경로를 추가하거나 제거할 수 있다.

xset +fp /usr/share/fonts/local/           # 지정한 폰트 경로를 Xorg가 인식하는 폰트 경로 리스트에 추가
xset -fp /usr/share/fonts/sucky_fonts/     # 지정한 폰트 경로를 Xorg가 인식하는 폰트 경로 리스트로부터 제거

Xorg에 인식된 폰트의 리스트는 xorg-xlsfonts 패키지의 xlsfonts 을 이용하여 확인할 수 있다.

Fontconfig 설정

Fontconfig 설정에 관한 매뉴얼은 fonts-conf(5)을 참조할 것.

$XDG_CONFIG_HOME/fontconfig/fonts.conf (보통 $HOME/.config/fontconfig/fonts.conf)을 통해 Fontconfig를 사용자 별로 설정할 수 있다. 또한 광역 설정은 /etc/fonts/local.conf을 통해 가능하다. 사용자 별 설정은 광역 설정보다 높은 적용 우선순위를 지닌다. 두 파일은 같은 문법을 공유한다.

참고: 설정 파일/디렉토리 ~/.fonts.conf/, ~/.fonts.conf.d/, ~/.fontconfig/*.cache-*는 더 이상 사용되지 않으며, 이후 버전의 패키지에서 별도의 설정 없이는 읽어들여지지 않을 것이다. 이에 대응하는 새로운 경로는 각각 $XDG_CONFIG_HOME/fontconfig/fonts.conf, $XDG_CONFIG_HOME/fontconfig/conf.d/NN-name.conf, $XDG_CACHE_HOME/fontconfig/*.cache-*이다. 만약 두 번째 경로를 이용하는 경우에는, 이름이 유효하게 지정되어있는 지 확인할 것. (NN00, 10, 99와 같은 두 자리 숫자.)

Fontconfig gathers all its configurations in a central file (/etc/fonts/fonts.conf). This file is replaced during fontconfig updates and should not be edited. Fontconfig-aware applications source this file to know available fonts and how they get rendered; simply restarting such applications is sufficient to load the new configuration. This file is a conglomeration of rules from the global configuration (/etc/fonts/local.conf), the configured presets in /etc/fonts/conf.d/, and the user configuration file ($XDG_CONFIG_HOME/fontconfig/fonts.conf). fc-cache can be used to rebuild fontconfig's configuration, although changes will only be visible in newly launched applications.

참고: For some desktop environments (such as GNOME and KDE) using the Font Control Panel will automatically create or overwrite the user font configuration file. For these desktop environments, it is best to match your already defined font configurations to get the expected behavior. Also ensure that the desktop locale settings or Regional Settings are supported by the configured fonts, if not the font configuration could be overidden.

Fontconfig configuration files use XML format and need these headers:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <!-- settings go here -->

</fontconfig>

The configuration examples in this article omit these tags.

프리셋

There are presets installed in the directory /etc/fonts/conf.avail. They can be enabled by creating symbolic links to them, both per-user and globally, as described in /etc/fonts/conf.d/README. These presets will override matching settings in their respective configuration files.

For example, to enable sub-pixel RGB rendering globally:

# cd /etc/fonts/conf.d
# ln -s ../conf.avail/10-sub-pixel-rgb.conf

To do the same but instead for a per-user configuration:

$ mkdir $XDG_CONFIG_HOME/fontconfig/conf.d
$ ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf $XDG_CONFIG_HOME/fontconfig/conf.d

안티앨리어싱

Font rasterization converts vector font data to bitmap data so that it can be displayed. The result can appear jagged due to aliasing. The technique known as anti-aliasing can be used to increase the apparent resolution of font edges. Anti-aliasing is enabled by default. To disable it:

  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
참고: Some applications, like GNOME may override default anti-aliasing settings.

힌팅

Font hinting (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid (i.e. the pixel grid of the display). Its intended effect is to make fonts appear more crisp so that they are more readable. Fonts will line up correctly without hinting when displays have around 300 DPI.

Byte-Code 인터프리터 (BCI)

Using BCI hinting, instructions in TrueType fonts are rendered according to FreeTypes's interpreter. BCI hinting works well with fonts with good hinting instructions. Hinting is enabled by default. To disable it:

  <match target="font">
    <edit name="hinting" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
참고: The BCI implementation can be switched in the script /etc/profile.d/freetype2.sh. The interpreter is set by passing the parameter truetype:interpreter-version=NN, NN corresponding to the version chosen, to the FREETYPE_PROPERTIES variable in the script. The most popular values are:
  • 35 for classic mode (emulates Windows 98),
  • 36 for classic Windows ClearType style (before Windows XP),
  • 38 for "Infinality" mode (highly configurable rendering, considered slow and discontinued),
  • 40 for minimal mode[dead link 2021-05-11 ⓘ] (stripped down Infinity, this is the default).
Subpixel rendering should use a subpixel BCI. For details, see [1].

오토힌터

The autohinter attempts to do automatic hinting and disregards any existing hinting information. Originally it was the default because TrueType2 fonts were patent-protected but now that these patents have expired there is very little reason to use it. It does work better with fonts that have broken or no hinting information but it will be strongly sub-optimal for fonts with good hinting information. Generally common fonts are of the later kind so autohinter will not be useful. Autohinter is disabled by default. To enable it:

  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>

힌트스타일

Hintstyle is the amount of font reshaping done to line up to the grid. Hinting values are: hintnone, hintslight, hintmedium, and hintfull. hintslight will make the font more fuzzy to line up to the grid but will be better in retaining font shape (see [2][dead link 2021-05-11 ⓘ]), while hintfull will be a crisp font that aligns well to the pixel grid but will lose a greater amount of font shape. hintslight implicitly uses the autohinter in a vertical-only mode in favor of font-native information for non-CFF (.otf) fonts.

hintslight is the default setting. To change it:

  <match target="font">
    <edit name="hintstyle" mode="assign">
      <const>hintnone</const>
    </edit>
  </match>
참고: Some applications, like GNOME may override default hinting settings.

픽셀정렬

Most monitors manufactured today use the Red, Green, Blue (RGB) specification. Fontconfig will need to know your monitor type to be able to display your fonts correctly. Monitors are either: RGB (most common), BGR, V-RGB (vertical), or V-BGR. A monitor test can be found here.

  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
참고: Without subpixel rendering (see below), freetype will only care about the alignment (vertical or horizontal) of the subpixels. There is no difference between RGB and BGR, for example.

서브픽셀 렌더링

Subpixel rendering is a technique to improve sharpness of font rendering by effectively tripling the horizontal (or vertical) resolution through the use of subpixels. On Windows machines, this technique is called ClearType.

FreeType implements its own LCD-optimized rendering called Harmony. With this FreeType LCD rendering technology, the resulting output does not require additional LCD filtering, unlike Microsoft's patented Cleartype subpixel rendering where an LCD filter is recommended. See section below on how to enable LCD filter and its benefits.

Cleartype subpixel rendering is covered by Microsoft patents and disabled by default on Arch Linux. To enable it, you have to re-compile freetype2 and define the FT_CONFIG_OPTION_SUBPIXEL_RENDERING macro, or use e.g. the AUR package freetype2-cleartypeAUR[broken link: package not found].

LCD 필터

When using Cleartype subpixel rendering, you should enable the LCD filter, which is designed to reduce colour fringing. This is described under LCD filtering in the FreeType 2 API reference. Different options are described under FT_LcdFilter, and are illustrated by this LCD filter test page.

The lcddefault filter will work for most users. Other filters are available that can be used in special situations: lcdlight; a lighter filter ideal for fonts that look too bold or fuzzy, lcdlegacy, the original Cairo filter; and lcdnone to disable it entirely.

  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
  </match>

고급 LCD 필터 설정

If the available built-in LCD filters are not satisfactory, it is possible to tweak the font rendering very specifically by building a custom freetype2 package and modifying the hardcoded filters. The Arch Build System can be used to build and install packages from source. This requires installation of the asp package.

Checkout the freetype2 PKGBUILD and download/extract the build files:

$ asp checkout freetype2
$ cd freetype2/trunk
$ makepkg -o

Enable subpixel rendering by editing the file src/freetype-VERSION/include/freetype/config/ftoption.h and uncommenting the FT_CONFIG_OPTION_SUBPIXEL_RENDERING macro.

Then, edit the file src/freetype-VERSION/src/base/ftlcdfil.c and look up the definition of the constant default_filter[5]:

static const FT_Byte  default_filter[5] =
    { 0x10, 0x40, 0x70, 0x40, 0x10 };

This constant defines a low-pass filter applied to the rendered glyph. Modify it as needed. (reference: freetype list discussion) Save the file, build and install the custom package:

$ makepkg -e
# pacman -Rd freetype2
# pacman -U freetype2-VERSION-ARCH.pkg.tar.xz

Reboot or restart X. The lcddefault filter should now render fonts differently.

Custom settings for certain fonts or font styles

The auto-hinter uses sophisticated methods for font rendering, but often makes bold fonts too wide. Fortunately, a solution can be turning off the autohinter for bold fonts while leaving it on for the rest:

...
<match target="font">
    <test name="weight" compare="more">
        <const>medium</const>
    </test>
    <edit name="autohint" mode="assign">
        <bool>false</bool>
    </edit>
</match>
...

Some fonts may not look good with BCI hinting. It can be disabled for just those fonts:

...
<match target="font">
    <test name="family" qual="any">
        <string>My Font</string>
    </test>
    <edit name="hinting" mode="assign">
        <bool>false</bool>
    </edit>
</match>
...

Replace or set default fonts

The most reliable way to set a default font is to add an XML fragment similar to the one below. Using the "binding" attribute will give you better results, for example, this will cause Ubuntu to be used in place of Georgia:

...
<match target="pattern">
  <test qual="any" name="family"><string>Georgia</string></test>
  <edit name="family" mode="assign" binding="same"><string>Ubuntu</string></edit>
</match>
...

An alternate approach is to set the "preferred" font. Fonts matching the <family> element are edited to prepend the list of <prefer>ed families before the matching <family>. This only works if the original font is not in the system, in which case the one specified will be substituted:

...
<!-- Replace Helvetica with Bitstream Vera Sans Mono -->
<!-- Note, an alias for Helvetica should already exist in default conf files -->
<alias>
    <family>Helvetica</family>
    <prefer>
        <family>Bitstream Vera Sans Mono</family>
    </prefer>
</alias>
...

폰트 화이트리스트 & 블랙리스트

The element <selectfont> is used in conjunction with the <acceptfont> and <rejectfont> elements to selectively whitelist or blacklist fonts from the resolve list and match requests. The simplest and most typical use case it to reject one font that is needed to be installed, however is getting matched for a generic font query that is causing problems within application user interfaces.

First obtain the Family name as listed in the font itself:

$ fc-scan .fonts/lklug.ttf --format='%{family}\n'
LKLUG

Then use that Family name in a <rejectfont> stanza:

<selectfont>
    <rejectfont>
        <pattern>
            <patelt name="family" >
                <string>LKLUG</string>
            </patelt>
        </pattern>
    </rejectfont>
</selectfont>

Typically when both elements are combined, <rejectfont> is first used on a more general matching glob to reject a large group (such as a whole directory), then <acceptfont> is used after it to whitelist individual fonts out of the larger blacklisted group.

<selectfont>
    <rejectfont>
        <glob>/usr/share/fonts/OTF/*</glob>
    </rejectfont>
    <acceptfont>
        <pattern>
            <patelt name="family" >
                <string>Monaco</string>
            </patelt>
        </pattern>
    </acceptfont>
</selectfont>

비트맵 폰트 비활성화

Bitmap fonts are sometimes used as fallbacks for missing fonts, which may cause text to be rendered pixelated or too large. Use the 70-no-bitmaps.conf preset to disable this behavior.

To disable embedded bitmap for all fonts:

~/.config/fontconfig/conf.d/20-no-embedded.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>

To disable embedded bitmap fonts for a specific font:

<match target="font">
  <test qual="any" name="family">
    <string>Monaco</string>
  </test>
  <edit name="embeddedbitmap">
    <bool>false</bool>
  </edit>
</match>

비트맵 폰트의 스케일링 비활성화

To disable scaling of bitmap fonts (which often makes them blurry), remove /etc/fonts/conf.d/10-scale-bitmap-fonts.conf. Note this can break the scaling of emoji fonts such as Segoe UI Emoji, making them huge.

완전하지 않은 폰트의 볼드체와 이탤릭체 생성

FreeType has the ability to automatically create italic and bold styles for fonts that do not have them, but only if explicitly required by the application. Given programs rarely send these requests, this section covers manually forcing generation of missing styles.

Start by editing /usr/share/fonts/fonts.cache-1 as explained below. Store a copy of the modifications on another file, because a font update with fc-cache will overwrite /usr/share/fonts/fonts.cache-1.

Assuming the Dupree font is installed:

"dupree.ttf" 0 "Dupree:style=Regular:slant=0:weight=80:width=100:foundry=unknown:index=0:outline=True:etc...

Duplicate the line, change style=Regular to style=Bold or any other style. Also change slant=0 to slant=100 for italic, weight=80 to weight=200 for bold, or combine them for bold italic:

"dupree.ttf" 0 "Dupree:style=Bold Italic:slant=100:weight=200:width=100:foundry=unknown:index=0:outline=True:etc...

Now add necessary modifications to $XDG_CONFIG_HOME/fontconfig/fonts.conf:

...
<match target="font">
    <test name="family" qual="any">
        <string>Dupree</string>
         <!-- other fonts here .... -->
     </test>
     <test name="weight" compare="more_eq"><int>140</int></test>
     <edit name="embolden" mode="assign"><bool>true</bool></edit>
</match>

<match target="font">
    <test name="family" qual="any">
        <string>Dupree</string>
        <!-- other fonts here .... -->
    </test>
    <test name="slant" compare="more_eq"><int>80</int></test>
    <edit name="matrix" mode="assign">
        <times>
            <name>matrix</name>
                <matrix>
                    <double>1</double><double>0.2</double>
                    <double>0</double><double>1</double>
                </matrix>
        </times>
    </edit>
</match>
...
도움말: Use the value embolden for existing bold fonts in order to make them even bolder.

규칙 우선순위

Fontconfig processes files in /etc/fonts/conf.d in numerical order. Therefore the rules of 01-aaa.conf and 02-bbb.conf will have the same effect as a single 01-aaabbb.conf file containing first the rules of 01-aaa then the ones of 02-bbb.

Usually that means the files with the smaller prefix will have higher precedence. However, the fontconfig syntax is flexible and allows that a new rule takes precedence over an existing rule. Therefore it is recommended to #현재 설정 확인 to test the result of the rule interactions.

Note that the user's rules defined in $XDG_CONFIG_HOME/fontconfig/fonts.conf and in the directory $XDG_CONFIG_HOME/fontconfig/conf.d are loaded via the file /etc/fonts/conf.d/50-user.conf and typically take precedence over the rules defined in files starting with a higher number.

현재 설정 확인

To find out what settings are in effect, use fc-match --verbose. eg.

$ fc-match --verbose Sans
family: "DejaVu Sans"(s)
hintstyle: 3(i)(s)
hinting: True(s)
...

Look up the meaning of the numbers at fonts-conf(5) Eg. 'hintstyle: 3' means 'hintfull'

Applications without fontconfig support

Some applications like URxvt will ignore fontconfig settings. You can work around this by using ~/.Xresources, but it is not as flexible as fontconfig. Example (see #Fontconfig 설정 for explanations of the options):

~/.Xresources
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

Make sure the settings are loaded properly when X starts with xrdb -q (see X resources for more information).

트러블슈팅

이모지(이모티콘) 폰트 강제하기

일부 소프트웨어에서는 이모지 폰트의 fallback 지원이 미비할 수 있다.

참고: Firefox에 관해서는 특별히 Firefox#Font troubleshooting를 참조.

이모지 표시를 강제하기 위해서는 이모지 fallback을 위한 프리셋을 원하는 어플리케이션에서 적용하면 된다. #프리셋를 참고. 아래의 코드에서 applicationNoto Color Emoji를 원하는 어플리케이션과 선호하는 이모지 폰트로 치환하여 적용하면 된다.

/etc/fonts/conf.avail/55-emoji-prepend.conf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match>
    <test name="prgname">
      <string>application</string>
    </test>
    <edit name="family" mode="prepend" binding="weak">
      <string>Noto Color Emoji</string>
    </edit>
  </match>
</fontconfig>

왜곡되어 보이는 폰트

참고: 96 DPI is not a standard. You should use your monitor's actual DPI to get proper font rendering, especially when using subpixel rendering.

If fonts are still unexpectedly large or small, poorly proportioned or simply rendering poorly, fontconfig may be using the incorrect DPI.

Fontconfig should be able to detect DPI parameters as discovered by the Xorg server. You can check the automatically discovered DPI with xdpyinfo (provided by the xorg-xdpyinfo package):

$ xdpyinfo | grep dots
  resolution:    102x102 dots per inch

If the DPI is detected incorrectly (usually due to an incorrect monitor EDID), you can specify it manually in the Xorg configuration, see Xorg#Display size and DPI. This is the recommended solution, but it may not work with buggy drivers.

Fontconfig will default to the Xft.dpi variable if it is set. Xft.dpi is usually set by desktop environments (usually to Xorg's DPI setting) or manually in ~/.Xdefaults or ~/.Xresources. Use xrdb to query for the value:

$ xrdb -query | grep dpi
Xft.dpi:	102

Those still having problems can fall back to manually setting the DPI used by fontconfig:

...
<match target="pattern">
   <edit name="dpi" mode="assign"><double>102</double></edit>
</match>
...

Calibri, Cambria, Monaco, 등이 제대로 렌더링되지 않는 문제

Some scalable fonts have embedded bitmap versions which are rendered instead, mainly at smaller sizes. Using Metric-compatible fonts as replacements can improve the rendering in these cases.

You can also force using scalable fonts at all sizes by disabling embedded bitmap, sacrificing some rendering quality.

어플리케이션이 힌팅을 오버라이드하는 문제

Some applications or desktop environments may override default fontconfig hinting and anti-aliasing settings. This may happen with GNOME 3, for example while you are using Qt applications like vlc or smplayer. Use the specific configuration program for the application in such cases. For GNOME, try gnome-tweaks.

Applications not picking up hinting from GNOME settings

For instance, under GNOME it sometimes happens that Firefox applies full hinting even when it's set to "none" in GNOME's settings, which results in sharp and widened fonts. In this case you would have to add hinting settings to your fonts.conf file:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>	
<fontconfig>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>false</bool>
  </edit>
 </match>
</fontconfig>

In this example, hinting is set to "grayscale".

Incorrect hinting in GTK applications

In some desktop environments, especially outside GNOME and Plasma, some GTK applications could not read font configuration properly. In order to solve this issue, install xsettingsd or xsettingsd-gitAUR and execute it at every system startup. See also Xsettingsd and xsettingsd wiki for more information. It can be configured with the following common configuration:

~/.xsettingsd
Xft/Hinting 1
Xft/HintStyle "hintslight"
Xft/Antialias 1
Xft/RGBA "rgb"

If that is not working in some other applications, you could install xorg-xrdb and provide the following configuration:

~/.Xresources
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.antialias: 1
Xft.rgba: rgb 

Then you can execute the script xrdb -merge ~/.Xresources at every system startup to apply the options. See also X resources and #Applications without fontconfig support.

Helvetica font problem in generated PDFs

If the following command

fc-match helvetica

produces

helvR12-ISO8859-1.pcf.gz: "Helvetica" "Regular"

then the bitmap font provided by xorg-fonts-75dpi is likely to be embedded into PDFs generated by "Print to File" or "Export" in various applications. The bitmap font was probably installed as a consequence of installing the whole xorg group (which is usually NOT recommended). To solve the pixelized font problem, you can uninstall the package. Install gsfonts (Type 1) or tex-gyre-fonts (OpenType) for corresponding free subsitute of Helvetica (and other PostScript/PDF base fonts).

You may also experience similar problem when you open a PDF which requires Helvetica but does not have it embedded for viewing.

FreeType breaking bitmap fonts

Some users are reporting problems (FS#52502) with bitmap fonts having changed names after upgrading freetype2 to version 2.7.1, creating havok in terminal emulators and several other programs such as dwmAUR or dmenu by falling back to another (different) font. This was caused by the changes to the PCF font family format, which is described in their release notes [3]. Users transitioning from the old format might want to create a font alias to remedy the problems, like the solution which is described in [4], given here too:

Assume we want to create an alias for terminus-font, which was renamed from Terminus to xos4 Terminus in the previously described freetype2 update:

  • Create a configuration file in /etc/fonts/conf.avail/ for the font alias:
/etc/fonts/conf.avail/33-TerminusPCFFont.conf
<?xml version="1.0"?>
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
 <fontconfig>
     <alias>
         <family>Terminus</family>
         <prefer><family>xos4 Terminus</family></prefer>
         <default><family>fixed</family></default>
     </alias>
 </fontconfig>
  • Create a symbolic link towards it in the /etc/fonts/conf.d directory. In our example we would link as follows: ln -s /etc/fonts/conf.avail/33-TerminusPCFFont.conf /etc/fonts/conf.d to make the change permanent.

Everything should now work as it did before the update, the font alias should not be in effect, but make sure to either reload .Xresources or restart the display server first so the affected programs can use the alias.

Dejavu Monospace에서 언더스코어(_)가 렌더링되지 않는 문제

Since Pango 1.44, the underscore characters disappear with certain font sizes when using the DejaVu Sans Mono font. A workaround is to use Liberation Mono as the monospace font, see #Replace or set default fonts.

FreeType 폰트 디버깅하기

freetype2-demos provides tools for debugging FreeType font configuration. ftview is a GUI in which you can tweak font rendering settings with a live preview. For example:

$ ftview -e unic -d 1024x768x24 -r 96 10 /usr/share/fonts/noto/NotoSans-Regular.ttf

See also