Welcome! Anonymous

How to Enable Infinality Font Rendering (Updated 2013-05-13)

A place to ask questions, or discuss anything related to infinality.net stuff.

How to Enable Infinality Font Rendering (Updated 2013-05-13)

Postby infinality » Mon May 23, 2011 9:00 pm

THIS FIRST POST IS FOR FEDORA USERS. SEE THE SECOND POST FOR OTHER DISTROS.

Here is how to hopefully get this set up relatively quickly on your Fedora system. This will set up a system-wide font configuration that can apply to all users.

1) AS ROOT: Make a directory called /usr/share/fonts/windows/ and put all your Windows fonts in there. This step is strongly recommended. I'd provide you nicely packaged font rpms like I have on my system, but that might be illegal or something. ;) Do likewise for Apple and Google fonts.

2) AS YOU: Use your gnome / KDE configuration area to choose the fonts you want displayed in your desktop environment.

3) AS ROOT: This will install the infinality repository on your system:
Code: Select all
rpm -Uvh http://www.infinality.net/fedora/linux/infinality-repo-1.0-1.noarch.rpm


4) AS ROOT: This installs the infinality patched version of freetype and configurations:
Code: Select all
yum -y install freetype-infinality fontconfig-infinality


5) AS ROOT: This sets fontconfig to use rendering defaults across all users on the system. You can change the settings with /etc/fonts/infinality/infctl.sh and /etc/fonts/infinality/infinality.conf. See the readme file in /etc/fonts/infinality/. Also adjust /etc/profile.d/infinality-settings.sh to your preference.

6) AS YOU: This causes you to use the global font configuration instead of one that only applies to your user:
Code: Select all
mv ~/.fonts.conf ~/fonts.conf.bak

NOTE: You should do this for every user that will be logging in and wanting nice fonts.

7) AS ROOT: If you don't want KDE or something else to go and sabotage you later, make this file immutable. Become root, and do this. Replace "YOURUSER" with your username:

Code: Select all
echo "<?xml version='1.0'?>" > /home/YOURUSER/.fonts.conf
echo "<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>" >> /home/YOURUSER/.fonts.conf
echo "<fontconfig>" >> /home/YOURUSER/.fonts.conf
echo "</fontconfig>" >> /home/YOURUSER/.fonts.conf
chattr +i /home/YOURUSER/.fonts.conf

NOTE: You should do this for every user that will be logging in and wanting nice fonts.

8) Then add/replace this in /etc/X11/Xresources (as root) and ~/.Xresources (as you). This is done AUTOMATICALLY if you use /etc/profile.d/infinality-settings.sh ! :
Code: Select all
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.dpi: 96
Xft.rgba: rgb


9) TIPS
  • Prefer *.ttf fonts over *.otf fonts if you like TT hinting. If you use *.otf versions, fontconfig should then be set to render them with autohint instead.
  • Use *this* version of Inconsolata: http://code.google.com/p/googlefontdire ... consolata/
  • Remove all fonts related to Helvetica because they have extremely poor TT instructions:
    Code: Select all
    find . -iname "*helvetica*" -exec mv {} /tmp/ \;
  • There is TONS of stuff you can adjust in /etc/profile.d/infinality-settings.sh ! Please look at that file!

10) Log out and log in (or reboot your system to be safe).

This should make things work. Keep in mind that you shouldn't modify your fonts via the gnome or KDE GUI interface afterwards, as it will interfere with this or just not work.

:ugeek:
- Linux font rendering has gone from the most reviled to the most renowned.
User avatar
infinality
Site Admin
 
Posts: 736
Joined: Wed Oct 20, 2010 7:57 am
Location: Wisconsin, USA

Re: How to Enable Infinality Font Rendering

Postby infinality » Sat Nov 19, 2011 6:18 pm

THIS SECOND POST IS FOR NON-FEDORA USERS. SEE THE FIRST POST FOR FEDORA. ALSO, YOU MAY ALREADY HAVE A PACKAGE MAINTAINER FOR YOUR DISTRO THAT HAS DONE MOST OF THIS FOR YOU.

Here are some basic instructions on how to compile with these patches and do the configurations.

Sources available here: http://www.infinality.net/blog/infinali ... e-patches/

- Download freetype 2.4.12 from freetype.org and unzip it somewhere.
- Download the fontconfig-infinality .tar.bz2 file and unzip into /etc/fonts/.
- Download the freetype-infinality.tar.bz2 file, and unzip it somewhere.
- cd to the freetype-2.4.12 directory from a terminal and run these commands (edit the paths to match where you unzipped):

Code: Select all
patch -p1 < /path/to/your/extracted/files/freetype-entire-infinality-patchset-20130513-01.patch


Code: Select all
./configure
make
sudo mkdir /usr/lib/freetype-infinality/        # change to lib64 if you run 64 bit
sudo find . -name libfreetype.so.6.10.1 -exec mv {} /usr/lib/freetype-infinality/  \;       
cd /usr/lib/freetype-infinality
ln -s libfreetype.so.6.10.1 libfreetype.so.10


- Then look at the README file for instructions on where to put the configuration files.

AS ROOT: Make a directory called /usr/share/fonts/windows/ and put all your Windows fonts in there. This step is strongly recommended. I'd provide you nicely packaged font rpms like I have on my system, but that might be illegal or something. Do likewise for Apple and Google fonts.

AS YOU: Use your gnome / KDE configuration area to choose the fonts you want displayed in your desktop environment.

AS ROOT: This sets fontconfig to use rendering defaults across all users on the system. You can change the settings with /etc/fonts/infinality/infctl.sh and /etc/fonts/infinality/infinality.conf. See the readme file in /etc/fonts/infinality/. Also adjust /etc/profile.d/infinality-settings.sh to your preference.

AS YOU: This causes you to use the global font configuration instead of one that only applies to your user:
Code: Select all
mv ~/.fonts.conf ~/fonts.conf.bak

NOTE: You should do this for every user that will be logging in and wanting nice fonts.

AS ROOT: If you don't want KDE or something else to go and sabotage you later, make this file immutable. Become root, and do this. Replace "YOURUSER" with your username:

Code: Select all
echo "<?xml version='1.0'?>" > /home/YOURUSER/.fonts.conf
echo "<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>" >> /home/YOURUSER/.fonts.conf
echo "<fontconfig>" >> /home/YOURUSER/.fonts.conf
echo "</fontconfig>" >> /home/YOURUSER/.fonts.conf
chattr +i /home/YOURUSER/.fonts.conf

NOTE: You should do this for every user that will be logging in and wanting nice fonts.


Then add/replace this in /etc/X11/Xresources (as root) and ~/.Xresources (as you). This is done AUTOMATICALLY if you use /etc/profile.d/infinality-settings.sh ! :

Code: Select all
Xft.autohint: 0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.dpi: 96
Xft.rgba: rgb



TIPS
- Prefer *.ttf fonts over *.otf fonts if you like TT hinting. If you use *.otf versions, fontconfig should then be set to render them with autohint instead.
- Use *this* version of Inconsolata. You can find it if you do a google search for this: google code directory inconsolata
- Remove all fonts related to Helvetica because they have extremely poor TT instructions:
Code: Select all
find . -iname "*helvetica*" -exec mv {} /tmp/ \;


There is TONS of stuff you can adjust in /etc/profile.d/infinality-settings.sh ! Please look at that file!

Log out and log in (or reboot your system to be safe).

This should make things work. Keep in mind that you shouldn't modify your fonts via the gnome or KDE GUI interface afterwards, as it will interfere with this or just not work.
- Linux font rendering has gone from the most reviled to the most renowned.
User avatar
infinality
Site Admin
 
Posts: 736
Joined: Wed Oct 20, 2010 7:57 am
Location: Wisconsin, USA


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest