Friday, July 25, 2025

Microsoft fonts on Arch

 

yay -S ttf-ms-fonts ttf-selawik

To achieve Microsoft-level font clarity on Arch Linux after installing Microsoft fonts, you'll need to configure several rendering components:

Font Rendering Configuration

Install necessary packages:

sudo pacman -S freetype2 fontconfig cairo

Enable subpixel rendering (equivalent to ClearType): Edit /etc/fonts/local.conf or ~/.config/fontconfig/fonts.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="lcdfilter" mode="assign">
      <const>lcddefault</const>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintslight</const>
    </edit>
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
</fontconfig>

Enable subpixel rendering in freetype2: Uncomment or add to /etc/profile.d/freetype2.sh:

export FREETYPE_PROPERTIES="truetype:interpreter-version=40"

Set font priorities: Configure fontconfig to prefer Microsoft fonts by adding font substitution rules in your fontconfig file:

<alias>
  <family>sans-serif</family>
  <prefer>
    <family>Segoe UI</family>
    <family>Arial</family>
  </prefer>
</alias>

Desktop Environment settings:

  • Enable subpixel rendering in Tweaks and set font to Selawik semibold and Selawik (for docs)
  • Configure font smoothing/antialiasing in your desktop environment settings
  • Set appropriate DPI scaling if needed

Rebuild font cache:

fc-cache -fv

The key is that Linux's freetype2 + fontconfig combination can achieve similar quality to Windows' font rendering, but requires manual configuration to match Microsoft's defaults.

No comments:

Post a Comment

Microsoft fonts on Arch

  yay -S ttf-ms-fonts ttf-selawik To achieve Microsoft-level font clarity on Arch Linux after installing Microsoft fonts, you'll need to...