Page 1 of 2

[outdated] Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 12:08 am
by ivanovnegro
Jan 26 2013: Added devscripts for our very minimal systems.

Dec 23 2015: This guide is now declared to be too old but still usable, see here.

So, let's see this Infinality thing in action. Everybody talks about it and I wanted to try it out, finally. I read really nice things on their site.

If you are still bored with your default font configuration or not happy with my first part then I have a surprise. I will tell you how to get Infinality debianized properly.

Side note: It will also get rid of the deprecated fonts.conf that the system always complains about when you start apps from the terminal, you can fix this by changing the directories but now let's talk Infinality and forget about my first part. ;)

I assume you have already git installed because we will build it from source. As usual there is no Debian package and won't happen in the near future, guess it, licensing issues.
Though, if you use another distro, grab it from here.

I will use this repository.

First we need the dev packages, I will use sudo here because I have it set up on this machine, adjust for su usage:

Code: Select all

sudo apt-get install build-essential docbook-to-man libx11-dev x11proto-core-dev libz-dev quilt debhelper pdebuild-cross devscripts
Of course that will install a bunch of shit but we do not care, we want sexy and crispy fonts.

Side note: After you finished everything you can remove the dev packages if you are concerned about disk space.

Now clone the git repo:

Code: Select all

git clone https://github.com/chenxiaolong/Debian-Packages.git
Go into the directories:

Code: Select all

cd Debian-Packages/
cd freetype-infinality/
Check all the dependencies:

Code: Select all

dpkg-checkbuilddeps
If everything is ok, go on, it should be:

Code: Select all

cd ../fontconfig-infinality/
dpkg-checkbuilddeps
Let's play:

Code: Select all

cd ../freetype-infinality/
./build.sh
cd ../fontconfig-infinality/
./build.sh
Now we build some nice Debian packages for ourselves. Let's install them:

Code: Select all

cd ..
sudo dpkg -i freetype-infinality/*.deb fontconfig-infinality/*.deb
That's it. It should not complain, but I still had one error, though I just ignored it, nothing big. It is dirty, I know, but it works.

Log out and back in or reboot if you think so. You will be surprised, the fonts are crisp, beautiful and still nice aliased and hinted. They are indeed crispier than with my first method. But that is not all. We will now make some adjustments as described here, I did it my way and am uber happy with the results.

First, remove the fonts thingie from your .Xdefaults, it is not needed anymore or if you have no need for .Xdefaults/.Xresources, get rid of them:

Code: Select all

Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault
Infinality forces already the correct settings, only in exceptional cases you would need the lines or for your own tweaks. I just removed it because I ran this and you should, too:

Code: Select all

sudo bash /etc/fonts/infinality/infctl.sh setstyle
where you can choose which configuration you prefer, I changed from Default (a bit too blurry) to Linux (sharper). There is one thing more you can change when you run this, use editor of your choice:

Code: Select all

sudo -H vi /etc/profile.d/infinality-settings.sh
and change more and more. You will find an explanation for everything. Personally I did not change anything as I like the defaults.

Now one thing you need to have in mind, disable all the GUI configuration settings for fonts from your desktop environment if you use one, they are now useless or will interfere.
If you need more tweaking, look again at the forums post above from Infinality how to adjust fonts in other distros.

I am really pleased with the results and they are globally, no tweakings needed anymore, no special attention for root applications, it is already done.

Of course, if you want the Microsoft or Apple rendering, you would need to have their fonts installed. I did not try this and won't as I have no MS fonts installed.
This guy or woman :) is really a freak. Forget about Ubuntu font rendering, this is even better, your milage may vary but you know me, I am a font fanatic.

Use this how-to at your own risk. I am not responsible for any breakage this procedure could implicate.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 4:22 am
by machinebacon
Million thanks. The blur has gone. I'll play around with the different settings, right now I have it completely 'default' and it is really nice and crisp.

(Side note: the build dependencies can be removed again after installing the deb files)

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 7:10 am
by GekkoP
Thanks for this.
I needed to install devscripts to be able to run build.sh without errors.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 5:56 pm
by ivanovnegro
machinebacon wrote:
(Side note: the build dependencies can be removed again after installing the deb files)
True that. Nice, you are enjoying it.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 6:06 pm
by ivanovnegro
GekkoP wrote:Thanks for this.
I needed to install devscripts to be able to run build.sh without errors.
I had it already installed.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 7:45 pm
by fog
Thank you Black Ivan for the sexiest fonts i ever had :D

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Mon Oct 28, 2013 8:51 pm
by ivanovnegro
You are welcome Fog. It is a wonder I always escaped Infinality, it is so awesome.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Tue Oct 29, 2013 2:20 pm
by beta
Thank you very much.
Enjoy infinality on arch (using repository), but was too lazy to get it rolling on debian.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Fri Nov 01, 2013 1:34 pm
by kiiroitori
Based on Ivanovnegro's past posts, I was afraid he'd despise if he knew I was actualling using infinality, so this thread came as a surprise. Now that I see he is using it too, I don't feel so shameful anymore (there are other pieces of software I am secretly using though and maybe someday I'll have the strength to confess).

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Fri Nov 01, 2013 3:46 pm
by ivanovnegro
Just confess in one of the threads if you want, we always try to find that piece of great obscure software.

I was not considering Infinality in first place because well, I thought it was not needed, I was wrong. :) No problem with that, I admit it. So, people that do not want to install it on Debian can still follow the first part and will have better fonts than the default. We have many options and it prooves that Linux does great on the desktop IMHO. ;)

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Jan 25, 2014 1:42 am
by RandomCharacter
Another happy customer. Thank you, Ivan!

Tim

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Jan 25, 2014 5:44 pm
by johnraff
bookmarked

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sun Jan 26, 2014 3:53 am
by dkeg
I just completed this. Thanks David. And like GP, I also needed devscripts.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sun Jan 26, 2014 8:57 pm
by ivanovnegro
^ Ok, will put it there. I installed it on my "bloated" old machine that already has many things preinstalled.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Oct 04, 2014 4:03 pm
by kexolino
Hey peeps, I noticed a bug with font rendering, and have no idea what it's connected to. What happens is, after I have been logged in for a few minutes, the hinting switches to full by itself, and I have no way of making it go back to slight.

The fonts part of my .Xresources looks like Black Ivan's, and in hopes of it fixing the issue (it didn't), I created a ~/.fonts.conf:

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>

  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>

  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>

  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>

  <edit mode="assign" name="lcdfilter">
    <const>lcddefault</const>
  </edit>
 
 </match>
</fontconfig>
I have infinality installed, using Linux style and Ubuntu style rendering, but it all goes away after the hinting decides to switch to full... Any ideas what could be causing this?

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Oct 04, 2014 4:28 pm
by dkeg
You're XML looks malformatted. I think your syntax is off. EDIT: oh, I think because you're missing opening and closing <match target="font"> tags for each font element. You're missing closing </match> tags for each element. I can't say for certain that is the issue, but could be
http://ix.io/eCr

Code: Select all

<?xml version="1.0"?>
   <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
   <fontconfig>
   <match target="font" >
     <edit mode="assign" name="rgba" >
       <const>rgb</const>
     </edit>
   </match>
   <match target="font" >
     <edit mode="assign" name="hinting" >
       <bool>true</bool>
     </edit>
   </match>
   <match target="font" >
     <edit mode="assign" name="hintstyle" >
       <const>hintslight</const>
     </edit>
   </match>
   <match target="font" >
     <edit mode="assign" name="antialias" >
       <bool>true</bool>
     </edit>
   </match>
   <match target="font">
     <edit mode="assign" name="lcdfilter">
       <const>lcddefault</const>
     </edit>
   </match>
 </fontconfig>

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Oct 04, 2014 5:45 pm
by kexolino
^ That seems to have worked, thanks. (At least hinting is still on slight, and I've been logged in for a while)

edit: nope, still does it. Looks like it happens when I launch a gtk2 application (but Iceweasel doesn't count?). My gtkrc-2.0 looks good though... Whatever, if I can't solve it, I'll open a new thread for it, maybe...

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Sat Oct 04, 2014 9:49 pm
by ivanovnegro
But with Infinality you do not need an .xml. That could also be a problem.
Do you use the buggy LXDE theming thing for Gtk, damn I forgot how it is called?

Better open a new thread.

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Thu May 14, 2015 5:22 pm
by stark
https://github.com/kokoko3k/grip

Sadly it requires qt4 :(

Re: Black Ivan's Font Task Force part II (Infinality)

Posted: Thu May 14, 2015 10:45 pm
by ivanovnegro
Whatever. I am happy with what we have already even though it is not perfect and might be outdated.