Linux User Group of Mauritius Promoting open source software in our beautiful island

27Oct/140

Beautiful fonts in Linux

Posted by Avinash Meetoo

20141027-beautiful-font

I love Fedora Linux and I love beautiful fonts. And, to be frank, these two do not easily love each other.

I’ve tried learning the complexities of subpixel rendering and bytecode hinting using freetype, I got fonts from our friends in Redmond and dabbed with infinality, which is a set of patches for freetype.

infinality worked really well until I realised that some software, especially Gimp 2.8 which I use on a daily basis at Knowledge Seven, do not work very well with it.

Fortunately, I also love Reddit and I stumbled upon this comment by ununununu:

You don’t need Infinality for pretty text rendering in Fedora. Here’s how to do it.

You may have noticed that fonts appear jagged and generally terrible-looking in Fedora 17 (and possibly in 18) while they appear smooth and lovely in Ubuntu. Both distributions use freetype for their renderer (kind of), though with different default settings.

The first step is to upgrade from the default freetype package to freetype-freeworld from the RPM Fusion repository. This version of freetype makes use of RGBA subpixel rendering which isn’t included in the default package for, uh, licensing reasons maybe?

Next, use gnome-tweak-tool to set Font Hinting to “None” and Font Antialiasing to “Rgba”. But that’s not all! There’s one more setting that Tweak Tool can’t set.

Create a file called .Xresources in your home directory. Its only contents need be Xft.lcdfilter: lcddefault which actually enables the subpixel rendering.

That’s it. I works great and I’m now looking at gorgeous fonts on my Fedora Linux laptop.

I couldn’t install the latest version of the Liberation fonts though because of Wine. I’ll try later.

[Thanks to Cuong, I did it, at the end, by downloading the Liberation 2.0 TrueType files and overwriting the existing Liberation 1.0 files in /usr/share/fonts. Then I changed my default font in Chrome to be Liberation and used the Stylish extension (with this script) to have this gorgeous font in Gmail, Facebook, Twitter, etc.]

[A second update: Some fonts from our friends in Redmond (e.g. Calibri) look crap at small sizes because of the bitmaps embedded in them. To make freetype ignore all these crap bitmaps, put the following in, say, ~/.config/fontconfig/conf.d/10-ignore-embedded-bitmaps.conf:

<match target=”font” >
<edit name=”embeddedbitmap” mode=”assign”>
<bool>false</bool>
</edit>
</match>

Have fun!

27Oct/140

Beautiful fonts in Linux

Posted by Avinash Meetoo

20141027-beautiful-font

I love Fedora Linux and I love beautiful fonts. And, to be frank, these two do not easily love each other.

I’ve tried learning the complexities of subpixel rendering and bytecode hinting using freetype, I got fonts from our friends in Redmond and dabbed with infinality, which is a set of patches for freetype.

infinality worked really well until I realised that some software, especially Gimp 2.8 which I use on a daily basis at Knowledge Seven, do not work very well with it.

Fortunately, I also love Reddit and I stumbled upon this comment by ununununu:

You don’t need Infinality for pretty text rendering in Fedora. Here’s how to do it.

You may have noticed that fonts appear jagged and generally terrible-looking in Fedora 17 (and possibly in 18) while they appear smooth and lovely in Ubuntu. Both distributions use freetype for their renderer (kind of), though with different default settings.

The first step is to upgrade from the default freetype package to freetype-freeworld from the RPM Fusion repository. This version of freetype makes use of RGBA subpixel rendering which isn’t included in the default package for, uh, licensing reasons maybe?

Next, use gnome-tweak-tool to set Font Hinting to “None” and Font Antialiasing to “Rgba”. But that’s not all! There’s one more setting that Tweak Tool can’t set.

Create a file called .Xresources in your home directory. Its only contents need be Xft.lcdfilter: lcddefault which actually enables the subpixel rendering.

That’s it. I works great and I’m now looking at gorgeous fonts on my Fedora Linux laptop.

I couldn’t install the latest version of the Liberation fonts though because of Wine. I’ll try later.

[Thanks to Cuong, I did it, at the end, by downloading the Liberation 2.0 TrueType files and overwriting the existing Liberation 1.0 files in /usr/share/fonts. Then I changed my default font in Chrome to be Liberation and used the Stylish extension (with this script) to have this gorgeous font in Gmail, Facebook, Twitter, etc.]

[A second update: Some fonts from our friends in Redmond (e.g. Calibri) look crap at small sizes because of the bitmaps embedded in them. To make freetype ignore all these crap bitmaps, put the following in, say, ~/.config/fontconfig/conf.d/10-ignore-embedded-bitmaps.conf:

<match target="font" >
 <edit name="embeddedbitmap" mode="assign">
 <bool>false</bool>
 </edit>
</match>

[A third update: Arial is a crap font when rendered onscreen (it’s not bad when printed though — but Helvetica is way better) and it’s a pity that so many websites use that font as their default font. The following freetype configuration (in, say, ~/.config/fontconfig/conf.d/10-replace-arial-by-liberation-sans.conf) replaces Arial by Liberation Sans (which is gorgeous) throughout:

<match target="pattern">
 <test qual="any" name="family">
  <string>Arial</string>
 </test>
 <edit name="family" mode="assign" binding="same">
  <string>Liberation Sans</string>
 </edit>
</match>

Have fun!

25Oct/140

Shellshock: A survival guide

Posted by Ish

It’s been the hot talk since a few weeks. Well, the presentation was finally due today at the University of Mauritius. Scheduled for 13h00, however I reached at noon. Planned to meet Shelly first and explain her a little about Linux (in general) and then show her what’s Bash.… Read more ➡

The post Shellshock: A survival guide appeared first on HACKLOG.

Tagged as: No Comments
18Oct/140

Network connection info with lsof

Posted by Ish

I still recall the line told to me when I started working as a Linux Sysadmin; “in Unix, everything is a file”. This includes socket files as well. Thus, one could use a utility like lsof to get network connection related information from the socket files.… Read more ➡

The post Network connection info with lsof appeared first on HACKLOG.

Tagged as: No Comments
2Oct/140

apt-get: holding back a package

Posted by Ish

acer-notebook-debianWhile setting up Debian on a notebook I kinda had tough time with the “flash player” plugin crashing incessantly in Google Chrome. A work-around has been published here which involves replacing the flash-plugin that is shipped with Google Chrome from a previous version.… Read more ➡

The post apt-get: holding back a package appeared first on HACKLOG.

Tagged as: , No Comments
2Oct/140

apt-get: holding back a package

Posted by Ish

acer-notebook-debianWhile setting up Debian on a notebook I kinda had tough time with the “flash player” plugin crashing incessantly in Google Chrome. A work-around has been published here which involves replacing the flash-plugin that is shipped with Google Chrome from a previous version.… Read more ➡

The post apt-get: holding back a package appeared first on HACKLOG.

Tagged as: , No Comments