Linux Panda

Open Source | Linux | Android | Tech

Monthly Archives: April 2013

How to improve font rendering in Manjaro Linux by installing Infinality fonts

Updated on 1 June 2016.

 

Disclaimer/Warning: I’m not responsible if you break your Manjaro installation following this tutorial.

 

I want to let you know that this tutorial involves installing packages “directly from the Arch User Repository” and the Manjaro Wiki itself warns that

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 methods.

  • 1st method shows how to install Infinality fonts using bohoomil repository.
  • 2nd method shows how to install Infinality fonts using AUR.

 

Steps to install Infinality fonts

Method 1: Using Infinality Repository

The easy way is to use the Infinality fonts from bohoomil repository.

We are going to install 3 packages called as

  1. cairo-infinality-ultimate
  2. fontconfig-infinality-ultimate
  3. freetype2-infinality-ultimate

The first step is to add the bhoomil repository to pacman config file.

Run the following code to open the repository configuration file.
sudo vim /etc/pacman.conf

The above command will probably show an error in your machine since vim is not installed by default.

Replace vim with your preferred text editor, i.e. if you like to use nano, then
sudo nano /etc/pacman.conf

After opening the file, go to the end of the file and add the following lines,

# Infinality Fonts Bundle
[infinality-bundle]
Server = http://bohoomil.com/repo/$arch

Save and close the file.

Next step is to import & sign the keys.

To import the new key, run the following command,
sudo pacman-key -r 962DDE58

To sign the new key, run the following command,
sudo pacman-key --lsign-key 962DDE58

The next step is to update our system to get the information about the available packages in the bhoomil repository.
sudo pacman -Syy

To install infinality fonts, run with the following command,
sudo pacman -S infinality-bundle

Now you’ll be asked whether the system should remove the old fonts and proceeed with the installation. You have to type y (i.e. yes) & press enter.

 

Method 2: Using AUR

The other way (or hard way as I call it) is to install Infinality packages from AUR.

We are going to install 3 packages called as

  1. cairo-infinality
  2. fontconfig-infinality
  3. freetype2-infinality

To install infinality fonts, run with the following command,
yaourt -S cairo-infinality fontconfig-infinality freetype2-infinality

The process will start building the files.  Since we’re installing the package using yaourt from AUR (Arch User Repository), it’ll show some warning/options.

Be careful about what you type and press enter, because entering wrong options may break the installation/system.

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.

( 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.

 

Edit install.sh ? [Y/n] (“A” to abort)

We don’t need  to edit the install script, so type the letter n & press enter.

 

Continue building fontconfig-infinality ? [Y/n]

Type the letter y & press enter to continue the build process.

 

fontconfig-infinality and fontconfig are in conflict. Remove fontconfig? [y/N]

Yes, we have to remove the packages that are in conflict. So we have to type the letter y & press enter.

 

Continue installing fontconfig-infinality ? [Y/n]

Ofcourse, type the letter y & press enter.

 

Steps to configure font rendering

LCD Filter

We have to set “lcdfilter” setting to default for best font rendering.

To do that, browse to /etc/fonts/conf.d/,
cd /etc/fonts/conf.d/

and run the following code.
sudo ln -s ../conf.avail/11-lcdfilter-default.conf

If you want to use lcdlegacy or other config, then you have to add the respective symbolic link instead of the above command.

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

 

Fonts & Hinting

You may choose different font as per your preference and may use “slight or full” hinting depending on your preference.

Xfce

Go to, Settings -> Appearance -> Fonts

Xfce Font Settings

MATE

Go to, System -> Preferences -> Look & Feel -> Appearance

Xfce Font Settings

 

MATE Font Rendering Settings

 

Infinality – Custom Styles (Optional)

Infinality fonts comes with multiple pre-defined styles.

So if you want to choose another style, then you have to copy the “infinality-settings.sh” file available at /usr/share/doc/freetype2-infinality-ultimate/ to /etc/X11/xinit/xinitrc.d/.

To do that, run the following command,
sudo cp /usr/share/doc/freetype2-infinality-ultimate/infinality-settings.sh /etc/X11/xinit/xinitrc.d/

Now lets open the file to set another style,
sudo vim /etc/X11/xinit/xinitrc.d/infinality-settings.sh

In that file you can see that 2 levels of customization are available.

  1. A set of 7 preconfigured styles selectable by name.
  2. You can create your own custom style.

In this tutorial, we are going to see only the first level customization, which is changing the preconfigured styles.

### Available styles:
### ultimate1 <> extra sharp
### ultimate2 <> sharper & lighter ultimate
### ultimate3 <> ultimate: well balanced (default)
### ultimate4 <> darker & smoother
### ultimate5 <> darkest & heaviest (“MacIsh”)
### osx <> Apple OS X
### windowsxp <> MS Windows XP

### If you want to use a style from the list, uncomment the variable below
### and set its name as the value.

#export INFINALITY_FT=”ultimate3″

We have to uncomment the last line, i.e. remove the # symbol before the export INFINALITYFT=”ultimate3″, so that it looks like the following,

### Available styles:
### ultimate1 <> extra sharp
### ultimate2 <> sharper & lighter ultimate
### ultimate3 <> ultimate: well balanced (default)
### ultimate4 <> darker & smoother
### ultimate5 <> darkest & heaviest (“MacIsh”)
### osx <> Apple OS X
### windowsxp <> MS Windows XP

### If you want to use a style from the list, uncomment the variable below
### and set its name as the value.

export INFINALITY_FT=”ultimate3″

Now you can choose either of the styles available which are,

  • ultimate1
  • ultimate2
  • ultimate3
  • ultimate4
  • ultimate5
  • osx
  • windowsxp

so, if you want to use extra sharp fonts, then the export option should look like the following,
export INFINALITY_FT="ultimate1"

Save & close the file.

If you want to create your own custom style (i.e. second level customization), then you can do so by referring to the document available at /usr/share/doc/freetype2-infinality-ultimate/infinality-settings-generic.

 

Reboot to see the new font rendering.

 

Note: Once you have rebooted, you don’t need to reboot again. You just need to logout & login to try the different styles in “infinality-settings.sh” file.

 

Install MS fonts: (Optional)

If you want to install MS fonts, then you can do so by running the following command.

yaourt -S ttf-ms-win10

 

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.

pacman -S --asdeps freetype2 cairo fontconfig

How to add/enable/start Uncomplicated Firewall (UFW) during startup in Linux

Uncomplicated Firewall (UFW) is a simple/basic host-based firewall configuration tool used to manage iptables in an easy way.  UFW supports both IPv4 & IPv6.

Most of the Linux distros comes without a firewall.  Some Linux distros comes with UFW installed in it but UFW is not enabled by default.

If you are not comfortable with configuring UFW using command line then you may install Gufw which is a GUI to manage Ufw.  But using this tool, you can only add rules or enable/disable the firewall.  To add/enable/start UFW during startup, you have to run commands as root or sudo.

gufw

Read more of this post

How to format pen-drive/flash-disks/removable-drives in Linux distros

In a Linux distro, you can format a removable disk (in most of the desktop environments) by right clicking on the disk and choosing format. But its just quick format and you can’t choose the file system or other info. that you want to use for your removable disk. So in order to format removable disk drives in Linux we need some application to do that.

Also in Xfce desktop environment, you cannot format a removable disk directly by right clicking on the disk and choosing format because Xfce (till version 4.10) does not come with such option.

One of the best application for formatting removable disks is Disks.

Features

  • View local and removable storage devices
  • View partitions and filesystems
  • Format disks and media
    • USB keys, card readers, flash media, disk disks
    • Support encryption to keep data private (e.g. LUKS or others)
  • Modify disk partition layouts
    • Create/delete filesystems and partitions
    • Edit filesystems and partitions (resize, change label)
  • Disk images
    • Create/restore disk images for disk/volumes
    • Access disk image files (including ISO files)
  • Edit system configuration
    • Activate specific devices at OS start-up (fstab/crypttab)
  • View hardware problems (SMART)

 

How to Use

1) Open Disks and then choose the external disk that you want to format.

2) Unmount the disk because you can’t format the disks that are mounted.

3) Click the gears like symbol and then select format.

4) A new window will pop up with the options to choose

  • quick format or full format
  • type of file system to be used (FAT is the preferred format for removable disks)
  • name of the removable disk

5) After choosing the options, click format and disks will do the rest of the work.

 

Disks Unmount

 

Disks format menu

 

Disks formatting options

 

Disks formatting the drive

 

 

Download & Install

To install Gnome Disks in your Linux distro, follow these steps

 

Ubuntu / Linux Mint / Elementary OS / Debian

sudo apt-get install gnome-disk-utility

 

Fedora

yum install gnome-disk-utility

 

Arch / Manjaro Linux

You can install it either from the official repository or AUR.

Official Repo:
pacman -S gnome-disk-utility
AUR:
yaourt -S gnome-disk-utility

 

OpenSUSE

zypper install gnome-disk-utility

 

 

Note:

  • In Xfce distros, the disks application may not appear in the main menu and instead its listed in the “Settings Manager”. So go to settings manager and then type “disks” in the search bar and you’ll find disks listed in it.
  • You can also start the application using Terminal. The command to start disks is

gnome-disks

  • You can also use a launcher like Synapse or some other launcher to start Disks.

 

Starting Disks using Synapse

 

List of all time best/top/must-have apps for Linux

%d bloggers like this: