Author Topic: How to install Ubuntu/Infinality fonts in Manjaro Linux - v3.0  (Read 87564 times)

0 Members and 2 Guests are viewing this topic.

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced

Disclaimer/Warning
: I'm not responsible if you break your Manjaro installation following this tutorial to install new fonts.



I installed Manjaro 0.8.4, everything was good except the font rendering.  I was not happy with the font rendering and started to look out for methods to improve the font rendering.

Since the Ubuntu versions have good font rendering, I installed Ubuntu fonts, added a ".fonts.conf" in the home directory with some basic configuration based on what I found in the internet.  I rebooted the machine and to my surprise, the font rendering was so good.


Note : In my previous guide, I've mentioned that I was not happy with the font rendering even after installing Ubuntu fonts.  Actually the Ubuntu fonts does the job perfectly.  The thing is I made a few mistakes in the steps to install Ubuntu fonts.


So in this v3.0 guide, I'm going to show how to properly install Ubuntu fonts too and also Infinality fonts.


But before we start, I want to let you know that this method involves installing packages "directly from the Arch repository" and the Manjaro Wiki itself warns that

Quote
Warning: Use the AUR at your own risk! Support will not be provided by the Manjaro team for any issues that may arise relating to software installations from the AUR.

So if you're proceeding with this tutorial, please proceed at your own risk.


Before we start, please, back up your /etc/fonts directory so that you can restore it if you want to go back to the stock fonts.


This guide is split into 2 parts.
  • 1st part shows how to install Ubuntu fonts
  • 2nd part shows how to install Infinality fonts.
You can either install Ubuntu fonts or Infinality fonts. You cannot not install both the fonts.


Lets say that you install Ubuntu fonts, configure it and you are not happy with it. Now you want to try Infinality fonts. To do so, first you should revert back to the stock fonts, reboot, make sure nothing is broken in the system and then try installing Infinality fonts.

The command to restore/revert back to the stock fonts is

Code: [Select]
pacman -S --asdeps freetype2 cairo fontconfig

Before we start with installing Ubuntu or Infinality fonts, first lets install MS fonts.
Code: [Select]
yaourt -S ttf-ms-fonts


Update: A new font package called Infinality Bundle is available

Now in addition to Ubuntu & Infinality fonts, an Arch Linux member called "bohoomil" (who previously hosted the infinality-fontconfig-ultimate package in AUR) has rolled out new font package called "infinality bundle".

If you are interested, you can find the steps to install infinality bundle in the official thread in Arch Linux Forum.





Restore stock fonts

The command to restore/revert back to the stock fonts is

Code: [Select]
pacman -S --asdeps freetype2 cairo fontconfig
« Last Edit: 18. April 2014, 22:48:59 by StealthPenguin »

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #1 on: 13. April 2013, 13:10:30 »
Steps to install Ubuntu fonts & configure it in the proper way:

Now lets start installing Ubuntu fonts to get awesome font rendering.

We are going to install 3 packages called as

The first step is to install these package from the Arch repository.  To install package from the Arch repository, we use the command yaourt instead of pacman.
Code: [Select]
yaourt -S freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu

The process will start building the files.  Since we're installing the package from Arch repository, it'll show some warning/options.

Be careful about what you type and press enter, because entering wrong options might mess up the installation.

So make sure you read each prompt properly before entering anything, else you could end up aborting the installation by accident!


Here are a few examples of the warnings that will show up.

Quote
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)

We don't need to edit the PKGBUILD file, so type the letter n & press enter

Quote
==> Edit install.sh ? [Y/n] ("A" to abort)
We don't need  to edit the install script, so type the letter n & press enter

Quote
==> Continue building fontconfig-ubuntu ? [Y/n]
yes, type the letter y & press enter

Quote
:: freetype2-ubuntu and freetype2 are in conflict. Remove freetype2? [y/N]
Yes, we have to remove the packages that are in conflict.  So we have to type the letter y & press enter

Quote
==> Continue installing fontconfig-ubuntu ? [Y/n]
Ofcourse, type the letter y & press enter



Great, we have successfully installed Ubuntu fonts but there are few more steps that we have to do before we reboot the machine.



Now we have to enable/set "lcdfilter" setting to default. To do that, browse to /etc/fonts/conf.d/ and run the following code. If you want to use lcdlegacy or other config, then you have to add the respective symbolic link instead of the following.

Code: [Select]
sudo ln -s ../conf.avail/11-lcdfilter-default.conf

For more information on using preset font configuration, check the font configuration in arch wiki.





Xfce users, go to Settings -> Appearance -> Fonts,

  • Enable anti-aliasing - Tick the checkbox
  • Hinting - Slight
  • Sub-pixel order - RGB





If you are using KDE or other DE that does not have option to configure font settings, the above settings can be configured by creating a file called fonts.conf in the $XDG_CONFIG_HOME path.

Replace USERNAME with your current username and run the following command. You have to do this step for each & every user.

Code: [Select]
mkdir -p /home/USERNAME/.config/fontconfig/;touch /home/USERNAME/.config/fontconfig/fonts.conf
Now browse to /home/USERNAME/.config/fontconfig/fonts.conf and copy paste the following code.

Code: [Select]
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <match target="font" >
    <edit mode="assign" name="hintstyle"> <const>hintslight</const></edit>
    <edit mode="assign" name="antialias"> <bool>true</bool></edit>
    <edit mode="assign" name="rgba">      <const>rgb</const></edit>
  </match>
</fontconfig>





Say Hooray!  All the steps towards installing patched Ubuntu fonts have been done.  Reboot the system and enjoy the awesomeness of the new font rendering.



If you're still not happy with the font rendering, you may want to try installing Infinality fonts.  But before that, you should revert back to the stock fonts, reboot, make sure nothing is broken in the system and then try installing Infinality fonts.



Restore stock fonts

The command to restore/revert back to the stock fonts is

Code: [Select]
pacman -S --asdeps freetype2 cairo fontconfig
« Last Edit: 18. April 2014, 22:49:20 by StealthPenguin »

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #2 on: 13. April 2013, 13:11:17 »
Steps to install Infinality fonts & configure it in the proper way:

Now lets start installing Infinality fonts to get awesome font rendering.

We are going to install 3 packages called as

The first step is to install this package from the Arch repository.  To install package from the Arch repository, we use the command yaourt instead of pacman.
Code: [Select]
yaourt -S  freetype2-infinality  fontconfig-infinality  lib32-freetype2-infinality

The process will start building the files.  Since we're installing the package from Arch repository, it'll show some warning/options.

Be careful about what you type and press enter, because entering wrong options might mess up the installation.

So make sure you read each prompt properly before entering anything, else you could end up aborting the installation by accident!


Here are a few examples of the warnings that will show up.

Quote
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)

We don't need to edit the PKGBUILD file, so type the letter n & press enter

Quote
==> Edit install.sh ? [Y/n] ("A" to abort)
We don't need  to edit the install script, so type the letter n & press enter

Quote
==> Continue building fontconfig-infinality-ultimate ? [Y/n]
yes, type the letter y & press enter

Quote
:: freetype2-infinality and freetype2 are in conflict. Remove freetype2? [y/N]
Yes, we have to remove the packages that are in conflict.  So we have to type the letter y & press enter

Quote
==> Continue installing fontconfig-infinality-ultimate ? [Y/n]
Ofcourse, type the letter y & press enter



Great, we have successfully installed Infinality fonts but there are few more steps that we have to do before we reboot the machine.



Now we have to enable/set "lcdfilter" setting to default. To do that, browse to /etc/fonts/conf.d/ and run the following code. If you want to use lcdlegacy or other config, then you have to add the respective symbolic link instead of the following.

Code: [Select]
sudo ln -s ../conf.avail/11-lcdfilter-default.conf

For more information on using preset font configuration, check the font configuration in arch wiki.





Xfce users, go to Settings -> Appearance -> Fonts,

  • Enable anti-aliasing - Tick the checkbox
  • Hinting - Slight
  • Sub-pixel order - RGB





If you are using KDE or other DE that does not have option to configure font settings, the above settings can be configured by creating a file called fonts.conf in the $XDG_CONFIG_HOME path.

Replace USERNAME with your current username and run the following command. You have to do this step for each & every user.

Code: [Select]
mkdir -p /home/USERNAME/.config/fontconfig/;touch /home/USERNAME/.config/fontconfig/fonts.conf
Now browse to /home/USERNAME/.config/fontconfig/fonts.conf and copy paste the following code.

Code: [Select]
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <match target="font" >
    <edit mode="assign" name="hintstyle"> <const>hintslight</const></edit>
    <edit mode="assign" name="antialias"> <bool>true</bool></edit>
    <edit mode="assign" name="rgba">      <const>rgb</const></edit>
  </match>
</fontconfig>



Configuring Infinality Font:

To configure infinality font, browse to /etc/fonts/infinality/ and run the following command which will show an option to choose the font rendering style.

Code: [Select]
sudo bash infctl.sh setstyle
Quote
    Select a style:
    1) debug 3) linux 5) osx2 7) win98
    2) infinality 4) osx 6) win7 8.) winxp
    #?

I chose 3 (i.e. linux).


Say Hooray!  All the steps towards installing Infinality fonts have been done.  Reboot the system and enjoy the awesomeness of the new font rendering.



Tweaking Infinality Configuration:

After reboot, we can tweak one option in the /etc/profile.d/infinality-settings.sh to get the best possible font rendering.

The following shows the list of possible pre-configured options that can be used.

Quote
#################################################################
########################### EXAMPLES ############################
#################################################################
#
# Set the USE_STYLE variable below to try each example.
# Make sure to set your style in /etc/fonts/infinality.conf too.
#
# Possible options:
#
# DEFAULT                - Use above settings.  A compromise that should please most people.
# OSX                       - Simulate OSX rendering
# IPAD                      - Simulate iPad rendering
# UBUNTU                 - Simulate Ubuntu rendering
# LINUX                    - Generic "Linux" style - no snapping or certain other tweaks
# WINDOWS             - Simulate Windows rendering
# WINDOWS7           - Simulate Windows rendering with normal glyphs
# WINDOWS7LIGHT - Simulate Windows 7 rendering with lighter glyphs
# WINDOWS             - Simulate Windows rendering
# VANILLA                - Just subpixel hinting
# CUSTOM                - Your own choice.  See below
# ----- Infinality styles -----
# CLASSIC                - Infinality rendering circa 2010.  No snapping.
# NUDGE                   - CLASSIC with lightly stem snapping and tweaks
# PUSH                      - CLASSIC with medium stem snapping and tweaks
# SHOVE                    - Full stem snapping and tweaks without sharpening
# SHARPENED           - Full stem snapping, tweaks, and Windows-style sharpening
# INFINALITY             - Settings I use
# DISABLED              - Act as though running without the extra infinality enhancements (just subpixel hinting).

USE_STYLE="INFINALITY"



Open terminal, run the following command and edit the USE_STYLE to your choice from the list of available options.  I've changed it from "DEFAULT" to "INFINALITY".
Code: [Select]
gedit /etc/profile.d/infinality-settings.sh
After saving the file, there is no need to reboot the system.  Just log out & log in to see the new font rendering.



Restore stock fonts

If you're still not happy with the font rendering and want revert back to the stock fonts then run the following command to restore/revert back to the stock fonts and then reboot.

Code: [Select]
pacman -S --asdeps freetype2 cairo fontconfig
« Last Edit: 18. April 2014, 22:49:42 by StealthPenguin »

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #3 on: 19. April 2013, 07:53:48 »
If you're curious about the font settings that I use, then I would like to let you know that I am using Infinality fonts with "UBUNTU" style and I'm totally happy & satisfied with the font rendering.
« Last Edit: 18. April 2014, 20:38:46 by StealthPenguin »

Offline Covert0ne

  • Neuling
  • *
  • Posts: 14
  • Boris Johnson
    • My Website
  • Desktop: XFCE
  • GPU Card: NVIDIA GTX 670
  • GPU driver: non-free
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #4 on: 19. April 2013, 16:11:35 »
This helped me a great deal, thanks for the guide!  8)

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #5 on: 21. April 2013, 10:49:21 »
This helped me a great deal, thanks for the guide! 
You're welcome.  :D

Offline h00ver

  • Neuling
  • *
  • Posts: 25
  • Skill: Intermediate
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #6 on: 21. April 2013, 15:07:53 »
Thanks a lot for this guide. You helped me creating a perfect font-setup for my Thinkpad. 8)

Offline angelheart

  • Neuling
  • *
  • Posts: 3
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #7 on: 22. April 2013, 00:43:20 »
That's a *great* guide. Set up the Ubuntu fonts and it works like a charm. One quick question

I did everything you said in my second PC at home. There are 2 users/accounts in that machine. Mine and my wife's who is the main user. Set everything up on her account, created the .fonts.conf in her /home, restarted X and bingo. Magic !!!

I then logged in to my account to create MY .fonts.conf and guess what. Magic again without the .fonts.conf file. Everything worked already.

As far as I understand your tutorial, the .fonts.conf file is necessary, but I enjoy my ubuntu-fonts and the rest of it without having one set up in my user account.

What do I not get ?

Thanks again for the great guide. 

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #8 on: 22. April 2013, 08:24:08 »
Thanks a lot for this guide. You helped me creating a perfect font-setup for my Thinkpad.
You're welcome.



That's a *great* guide. Set up the Ubuntu fonts and it works like a charm. One quick question

I did everything you said in my second PC at home. There are 2 users/accounts in that machine. Mine and my wife's who is the main user. Set everything up on her account, created the .fonts.conf in her /home, restarted X and bingo. Magic !!!

I then logged in to my account to create MY .fonts.conf and guess what. Magic again without the .fonts.conf file. Everything worked already.

As far as I understand your tutorial, the .fonts.conf file is necessary, but I enjoy my ubuntu-fonts and the rest of it without having one set up in my user account.

What do I not get ?

Thanks again for the great guide.
Installing the Ubuntu font's itself improves the font rendering.  But you get the "Perfect" font rendering only after you create that .fonts.conf file in your home directory.

Add a .fonts.conf in your Home directory.  If you find the rendering better without the fonts.conf file, then remove it.

The .fonts.conf file is not absolutely necessary.  Its just like icing on top of the cake.   :D
« Last Edit: 22. April 2013, 08:26:59 by StealthPenguin »

Offline Sleipnir

  • Neuling
  • *
  • Posts: 30
  • Desktop: XFCE
  • GPU Card: nVidia
  • GPU driver: non free - sad but no video without it
  • Kernel: 3.18.20-1
  • Skill: Intermediate
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #9 on: 22. April 2013, 13:29:41 »
Thanks for the tutorial. I am considering switching from Mint to Manjaro. I am ready to give up Mate since Xfce suits me perfectly as well but I am not ready to give up the great font rendering Manjaro lacks by default. Let's hope that this will be including by the core team, after all Manjaro is supposed to be suitable out-of-the-box.

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #10 on: 22. April 2013, 16:07:24 »
Thanks for the tutorial. I am considering switching from Mint to Manjaro. I am ready to give up Mate since Xfce suits me perfectly as well but I am not ready to give up the great font rendering Manjaro lacks by default. Let's hope that this will be including by the core team, after all Manjaro is supposed to be suitable out-of-the-box.
I don't think this will be included by default because most of the people are happy with the default font rendering.  So if you want Ubuntu fonts in your installation then you may use this tutorial.

Offline TinMar

  • Jr. Mitglied
  • **
  • Posts: 65
  • Branch: Testing
  • Desktop: XFCE
  • GPU Card: nVidia 7100 GS
  • GPU driver: non-free (304.xx)
  • Kernel: linux38-x86
  • Skill: Novice
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #11 on: 22. April 2013, 18:36:32 »
There is also an unofficial fonts repo for Archlinux and work fine for me on Manjaro.
Adding the following  in /etc/pacman.conf after other repos:
Code: [Select]
[arch-fonts]
# Prebuilt packages for font packages found in AUR
# This should be faster than building from source
# as many have download speed of 10KB/s. If you find
# missing font, email to <gmail.com: jesse.jaara>
# Now with pkgfile support.
Server = http://huulivoide.pp.fi/Arch/arch-fonts

See here for other unofficial repos

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #12 on: 23. April 2013, 07:38:58 »
There is also an unofficial fonts repo for Archlinux and work fine for me on Manjaro.
Adding the following  in /etc/pacman.conf after other repos:
Code: [Select]
[arch-fonts]
# Prebuilt packages for font packages found in AUR
# This should be faster than building from source
# as many have download speed of 10KB/s. If you find
# missing font, email to <gmail.com: jesse.jaara>
# Now with pkgfile support.
Server = http://huulivoide.pp.fi/Arch/arch-fonts

See here for other unofficial repos
I think this is different from what is mentioned in the guide.  The link you provided has just fonts.  The packages used in the guide are actually libraries for Ubuntu/Infinality fonts that are patched for LCD rendering.

Offline Sleipnir

  • Neuling
  • *
  • Posts: 30
  • Desktop: XFCE
  • GPU Card: nVidia
  • GPU driver: non free - sad but no video without it
  • Kernel: 3.18.20-1
  • Skill: Intermediate
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #13 on: 24. April 2013, 19:51:31 »
I don't think this will be included by default because most of the people are happy with the default font rendering.  So if you want Ubuntu fonts in your installation then you may use this tutorial.

Well, I could do without if the bar at the top of the screen didn't look so weird. At least we should be given the opportunity to use these libs or not.

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: How to install Ubuntu/Infinality fonts in Manjaro Linux - v2.0
« Reply #14 on: 25. April 2013, 09:44:03 »
Well, I could do without if the bar at the top of the screen didn't look so weird. At least we should be given the opportunity to use these libs or not.
Its upto the core team to decide that.