Infinality font rendering on KaOS

KaOS_Infinality

(Open image in new tab, save and view in full resolution)

My adventures with KaOS 2016.01 continue. In fact I am spending more of my laptop time with KaOS than Ubuntu. I was missing Infinality font rendering so I gave it a shot. There are no official Infinality packages for KaOS so we need a few hacks to install the necessary packages and customize. The same tricks should apply to Arch based distros with KDE as well.

Note that my architecture is x86_64 and I don’t use multilib.

I am expecting that you have already tinkered with Font Settings on KaOS and set them to optimal.

Download cairo-infinality-ultimate, fontconfig-infinality-ultimate and freetype2-infinality-ultimate packages. The last two packages depend on xorg-xrdb. xrdb is already installed on KaOS but the package name doesn’t match. Force install the packages without bothering about dependencies. Note that this is not safe and the packages are from a different distro. I didn’t face any issues myself but you might. You have been warned!

$ sudo pacman -U cairo-infinality-ultimate-1.14.4-1-x86_64.pkg.tar.xz
$ sudo pacman -U --force -d -d fontconfig-infinality-ultimate-2.11.1-30-x86_64.pkg.tar.xz freetype2-infinality-ultimate-2.6.2-4-x86_64.pkg.tar.xz

Enter y whenever pacman asks.

Create (or edit) /etc/X11/xinit/xinitrc.d/xft-settings.sh. Here are my contents:

#!/bin/bash

XFT_SETTINGS="
Xft.antialias:  1
Xft.autohint:   0
Xft.dpi:        96
Xft.hinting:    1
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcddefault
Xft.rgba:       rgb
"

echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1

USE_STYLE="WINDOWSXPLIGHT"
export INFINALITY_FT_FILTER_PARAMS="06 25 44 25 06"
export INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH=0
export INFINALITY_FT_FRINGE_FILTER_STRENGTH=100
export INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH=10
export INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH=25
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH=65
export INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH=0
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH=15
export INFINALITY_FT_STEM_FITTING_STRENGTH=15
export INFINALITY_FT_GAMMA_CORRECTION="1000 120"
export INFINALITY_FT_BRIGHTNESS="20"
export INFINALITY_FT_CONTRAST="30"
export INFINALITY_FT_USE_VARIOUS_TWEAKS=true
export INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS=false
export INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT=100
export INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE=30
export INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS=true

# vim:ft=sh:

You can change the lines starting from USE_STYLE to the last export. Refer to the complete file from Ubuntu for more pre-configured settings. You can play around a while and experiment till you find the best rendering that suits your monitor.

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s