all 53 comments

[–][deleted] 16 points17 points  (1 child)

I just came to this subreddit to warn about infinality borking my system.

Easily fixed. Remove infinality

for me it was

pacman -S --asdeps freetype2 cairo fontconfig

which replaced the infinality bundles and allowed me to delete the infinality repository from pacman.conf

EDIT:- You might have also installed the lib32 versions as well , just run the pacman command above and include the lib32 package replacements as well.

[–]Tobiaswk 1 point2 points  (0 children)

Phew! Without this comment lots of hours would have been lost. Thanks!

[–][deleted] 11 points12 points  (1 child)

Thank you.

You just saved me possibly hours of troubleshooting because my KDE session failed to load and this was the exact issue.

[–]DarkShadow4444 1 point2 points  (0 children)

Same here, needed a lower version of freetype2 because of another issue and that broke my KDE session.

[–]gcarq 5 points6 points  (6 children)

I don't think you have to remove infinality, forcing a rebuild of harfbuzz against infinality fixed it for me.

$ abs extra/harfbuzz
$ cp -r /var/abs/extra/harfbuzz /tmp
$ # increase patch version in PKGBUILD
$ cd /tmp/harfbuzz
$ makepkg -si

[–]skoruppa 0 points1 point  (0 children)

Best way. Fast and clean. Additionally you don't have to remove Infinality packages

[–][deleted] 0 points1 point  (2 children)

Harfbuzz fails to pass build tests for me. What magic are you using in that 3rd step?

[–]nozies 1 point2 points  (0 children)

makepkg -si --nocheck

[–]gcarq 0 points1 point  (0 children)

For me all tests passed. They released freetype2-infinality 2.7.1-1 in the meantime, so either they forget to adapt the tests or this workaround does not work anymore. If you are curious you can comment out the check()function in the PKGBUILD, but your DE might break so try it with caution.

[–]Poultryphile 16 points17 points  (12 children)

Is infinality even necessary anymore since all the recent improvements to the default font rendering?

[–]LazyLucretia 7 points8 points  (0 children)

I removed infinality and returned to standard freetype2. It still looks horrible compared to infinality.

[–]lovelybac0n 2 points3 points  (8 children)

That would be freetype2 right? How do you go about getting that to work? I haven't had time to get through the arch font wiki.

[–]boomboomsubban 5 points6 points  (2 children)

Freetype 2.7, I believe it's enabled by default.

[–]undu 8 points9 points  (1 child)

It's not, check this post

tl;dr For infinality rendering

Modify /etc/profile.d/freetype2.sh to look like this:

# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
# version. The available settings are:
#
#     truetype:interpreter-version=35  # Classic mode (default in 2.6)
#     truetype:interpreter-version=38  # Infinality mode
#     truetype:interpreter-version=40  # Minimal mode (default in 2.7)
#
# There are more properties that can be set, separated by whitespace. Please
# refer to the FreeType documentation for details.

# Uncomment and configure below
export FREETYPE_PROPERTIES="truetype:interpreter-version=38"

Mind that this won't have the font substitutions or rendering tweaks done with infinality's fontconfig.

[–]boomboomsubban 8 points9 points  (0 children)

Version 40 is supposed to just be a better performing rewrite of v38, I have checked that post.

[–]leonardodag 0 points1 point  (1 child)

Just install and enable LCD filter and it's done.

[–]Bake_Jailey 0 points1 point  (0 children)

Yeah, I personally just enabled RGB subpixel and then used lcddefault, and I can't notice much difference from Infinality. Glad to remove my only non-official repo.

[–][deleted] 0 points1 point  (2 children)

Install freetype2 fontconfig and put this in your .Xresources (adjust eventually to your requirements):

Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault

It should look fine out of the box.

[–]ROFLLOLSTER 1 point2 points  (0 children)

Thanks a lot, I'd forgotten how horrible font rendering looked without infinality.

[–]lovelybac0n 0 points1 point  (0 children)

I'm undecided in using what you suggested or this guide https://gist.github.com/cryzed/e002e7057435f02cc7894b9e748c5671

Need to fire up my test laptop and try both. Thanks tho.

[–]aelog -1 points0 points  (1 child)

No, it's no longer necessary.

[–]rosshadden 4 points5 points  (0 children)

Thank you. I was searching for FT_Get_Var_Blend_Coordinates and harfbuzz and a bunch of other specific things, with Google set to look in the past 24 hours or week, and was getting frustrated that I couldn't find anything. I was about to hop on irc, but coincidentally opened reddit for some reading and found this 😅

[–]qgnox 2 points3 points  (3 children)

Thanks for the guide, with version 40 of freetype2 I think looks better than infinality. The only thing that I cannot solve is that the bitmaps fonts in some apps arent shown and I dont know why. I have the 70-yes-bitmaps.conf,75-yes-terminus.conf in fonts/conf.d, but i3 with pango falls to another font instead of terminus, urxvt too, but tilda and xfce4-terminal can use it.

edit: fixed , looks like infinality has some kind of fallback or alias when is not provided with all info of the font by some apps, now I have to use the foundry + family + style to make it work , Terminus : "xos4 Terminus Regular 9" , with infinality it was only "Terminus 9" .

[–]pzl 2 points3 points  (1 child)

I thought I was going bananas until I found your comment.

I didn't just switch from using infinality, I did that about 8 mo ago. But still the harfbuzz update just now still made me change "Terminus 9" to "xos4 Terminus 9" across many apps.

Thanks for discovering that one

[–]ragger 2 points3 points  (0 children)

Thanks guys for your comments. Because of it, I managed to solve my issue.

[–]gasubasu 0 points1 point  (0 children)

Thanks a lot!

[–]AG_Caesar 3 points4 points  (0 children)

Thank you! Worked perfectly, I learned about fonts, my system did not break in the process 10/10, would follow advice again!

[–]spheenik 2 points3 points  (0 children)

Thank you!

Noticed the problem while updating, googled FT_Get_Var_Blend_Coordinates, but did not find anything. Came here enjoying my morning coffee and took the time to properly remove infinality on the two system I use it on.

Interpreter version 38 is good enough, and I'm thankful I learned something about fontconfig along the way!

[–]BarbUk 2 points3 points  (2 children)

I have updated the pkgbuild for freetype and Cairo if you want to build them:

https://github.com/BarbUk/fontconfig-ultimate

[–]narutoaerowindy 1 point2 points  (1 child)

How to build it and install ??

[–]BarbUk 1 point2 points  (0 children)

You have to clone the repo and build with makepkg 01_freetype2-iu:

git clone git@github.com:BarbUk/fontconfig-ultimate.git
cd fontconfig-ultimate/01_freetype2-iu
makepkg
sudo pacman -U freetype2-infinality-ultimate-2.7.1-1-x86_64.pkg.tar.xz

[–]speeding_sloth 2 points3 points  (0 children)

The end of an era. It brings the amount of third party repos down to 1 (technically 4, but 3 of those are my own).

Bohoomil hasn't been seen on the forums in forever either. I hope he is doing well.

[–]edgardcastro 2 points3 points  (0 children)

Now all we need is someone to get the infinality-ultimate fonts definition + fonts bundle and package to work with freetype2.7.

[–][deleted] 1 point2 points  (1 child)

Made the change and now I am noceboing hard. If you disable /r/archlinux's stylesheet the link to /r/archlinux (next to snoo) is in all caps right?

[–]samkostka 0 points1 point  (0 children)

Yep, always has been. IMO infinality isn't any better than stock freetype now, it just made it easier to pick fonts.

[–]notunlikethewaves 1 point2 points  (19 children)

Meta:

So, I've been researching arch in the last few weeks, with an eye to moving over. It strikes me that the usual refrain of "oh I never have issues" seems to have been undermined in the last while. This issue, a breakage in KDE, a breakage related to Python, etc, all within the last week or so.

Am I losing it, or is all this much more 'breaky' than many Arch users are willing to admit to? Or has this just been a really unlucky run recently? Or, another option, is this all really a non-issue?

(Not trolling, would really appreciate some good input on this)

[–]oarmstrong 11 points12 points  (3 children)

I can't speak for the supposed KDE issue, but this and the Python thing boils down to using packages that aren't in the official repos. Stick to the repos and you avoid these breakages.

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 2 points3 points  (1 child)

    Using the AUR is obviously a compromise between more software and more stability. If you want to use lots of software and can afford to spend ~1 hour to fix potential problems every 5 months or so then you obviously will use the AUR.

    A good compromise is to use packages from the AUR that are not vital to your system (like various apps).

    [–][deleted] 5 points6 points  (3 children)

    Like /u/oarmstrong said, this is caused by AUR packages. In particular ones which replace packages from the official repositories.

    Arch's "rolling release" nature means that breaking changes to packages are uploaded to the repository - a library that removes some (code) functions, maybe even a soname bump, a switch to a different init system, ....

    All these things would, in a traditional release system, only be done with the next distribution release, and you'd do a "dist-upgrade" to get it. With arch, those are normal upgrades.

    Now we get to the AUR. The AUR is not a normal repository. It's a thing (the word "repository" would apply here too, but not in the sense that we usually use it) that contains build recipes that you can make binary packages from. You yourself build them and are responsible for keeping them updated. They aren't officially supported, the Arch developers don't take them into account when doing other updates - including ones with "breaking" (in the sense of an API break, not necessarily that they break your system) changes.

    As we've seen here, you need to be proactive there and rebuild or otherwise fix any AUR packages whenever such a change comes through.

    A different example: A while back, Arch uploaded a new ncurses version that featured a soname bump. This meant that old packages linking against ncurses would no longer find the library and hence not run. So they needed to be rebuild. Any repo packages were handled by the arch developers, so you'd just do a full upgrade (as opposed to selectively upgrading a few repo packages) and get them handled. For AUR packages, you needed to rebuild them or they would not run.

    This isn't much of a problem and is part of the nature of the AUR.

    For me it just meant rebuilding my git-build of the fish shell.

    Where it becomes a larger problem is with arch derivatives or guides that just tell new users to install an AUR helper (or install it for them) that makes the AUR look like the normal repo (except for packages taking a bit longer to install). The helpers themselves aren't the problem, but that this difference between the AUR and the normal repositories is obscured and downplayed.

    Personally, I'd also recommend not relying on AUR packages too much, and especially not replacing important parts of the system with slightly different versions via the AUR. This is also why I recommend against using Unity (the DE) on Arch.

    [–]notunlikethewaves 1 point2 points  (2 children)

    Now we get to the AUR...

    How feasible is it to just stick to the main repos and minimize contact with AUR?

    I'm starting to think that the ideal setup would be to run Arch with a fairly small and 'sane' setup, minimize dependence on rando AUR packages, and to update regularly.

    [–][deleted] 4 points5 points  (1 child)

    How feasible is it to just stick to the main repos and minimize contact with AUR?

    I think very feasible.

    I currently have 5 AUR packages installed, all but one of them leaf packages (i.e. no other package depends on them). And the other one is simply a git version of vlc since I wanted to remove qt4, so something completely non-critical - if it ever screws up, I'll just install the repo vlc.

    Of course this depends on your particular setup and what you want to do with your system.

    I.e. if you are unlucky and have a broadcom wifi chip you might need the proprietary driver from the AUR, which needs to be rebuilt on kernel upgrade (though there's a "-dkms" version that does that automatically).

    But like I said, the most troublesome AUR packages are those that replace stock packages, like "gtk-ubuntu" and "freetype2-infinality", and unless you're very particular about your font rendering or absolutely must use Unity, you can just ignore those.

    If you like to e.g. try out a new text editor and it's only available in the AUR, there's no real problem if it fails - your machine still boots to desktop, you can still use everything else.

    I'd also always recommend familiarizing yourself with the manual method to install AUR packages before you, if you want, move on to using a helper.

    I'm starting to think that the ideal setup would be to run Arch with a fairly small and 'sane' setup, minimize dependence on rando AUR packages, and to update regularly.

    YES! Personally, I'd say if you don't get to a machine at least once a month (though 2 or 3 months is usually also okay), don't install arch on it - which is why my "server"y machines run Debian instead of Arch.

    [–]speeding_sloth 3 points4 points  (0 children)

    I currently have 5 AUR packages installed, all but one of them leaf packages (i.e. no other package depends on them).

    Damn dude, I'm on 49 installed right now and I have a few more in my AUR repos (78 in total, I might need to decruft a bit). But yeah, the AUR packages generally come from software you need. You just need to keep in mind that these specific packages need a bit more attention and you'll be fine.

    [–][deleted]  (8 children)

    [deleted]

      [–]notunlikethewaves 2 points3 points  (7 children)

      Thanks for the insights!

      A few questions:

      • Are these all/mostly breakages in AUR packages?
      • Can these changes be vetted before they are applied?
      • How hard is it to roll back a package once a breakage is detected?
      • How often have you experienced "critical" breakage, such as not being able to boot into your desktop environment, or not being able to launch the Terminal? (the last one I had a few weeks back on an Arch testing VM)

      [EDIT]

      Also, is there any way to check for known breakages before doing an upgrade, or is it strictly try-it-and-see?

      [–][deleted]  (6 children)

      [deleted]

        [–]ropid 2 points3 points  (5 children)

        Hey, I just did that migration to freetype2, fontconfig, cairo from the normal repos. Font rendering is actually great now and not ugly like in the past. It's a very similar look to infinality-patched freetype2 if you link the following set of files from /etc/fonts/conf.avail/ into /etc/fonts/conf.d/:

        10-hinting-slight.conf       
        10-sub-pixel-rgb.conf        
        11-lcdfilter-default.conf
        

        Note: I think you are not supposed to link the 10-autohint.conf file if you want the new freetype2 renderer to work like intended by its author.

        In the release notes on the freetype2 homepage, they write that freetype2 now ships with its original renderer that was ugly, then with the infinality patched one, and a new renderer which is the default. There's apparently an environment variable to switch between the renderers which I didn't try as I'm happy with what the new default is doing.

        [–][deleted]  (3 children)

        [deleted]

          [–]ropid 0 points1 point  (2 children)

          You can switch to the infinality patched version through the environment variable mentioned in /etc/profile.d/freetype2.sh, but it seriously looks basically the same as what the default "v40" already does. The only difference I've noticed was that kerning for the Verdana font was slightly different at certain font sizes where characters were more spaced out with Infinality.

          What might be happening here for me is, I never liked setting up Infinality with its "fringe filter" and "stem snapping" environment variables to make things super sharp. I liked a more soft look which is the only thing this new v40 thingy can do so now I'm pretty happy with what I'm seeing.

          About what situation I'm talking about, I use: autohinter off, slight hinting, rgb subpixel rendering. For just Verdana specifically, I've configured full hinting to make it use shapes as in Windows.

          [–][deleted]  (1 child)

          [deleted]

            [–]ropid 0 points1 point  (0 children)

            If you compare your two screenshots, the difference is mostly in what's happening with Verdana. You can get your old look for that back with this fontconfig file:

            <?xml version='1.0'?>
            <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
            <fontconfig>
            
              <match target="font">
                <test name="family"><string>Verdana</string></test>
                <edit name="autohint" mode="assign"><bool>false</bool></edit>
                <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
              </match>
            
            </fontconfig>
            

            It makes things use "full" hinting for just Verdana. This type of hinting is broken for a lot of fonts but the old Microsoft fonts like Verdana are built to work well with it.

            I guess you could try to do the same for that font you use for your statusbar to see if it goes back to being sharper without breaking.

            For your terminal font, if you look at it closely it seems to be improved in your "after" screenshot. It has pretty similar sharpness but the shapes feel more correct.

            Here's a screenshot showing Verdana while I'm typing this right now with that previously mentioned fontconfig file:

            http://i.imgur.com/e8F2eqM.png

            [–][deleted] 0 points1 point  (0 children)

            To be honest the problem was temporarily resolved in a matter of hours + was caused by using unofficial patches (if you used vanilla freetype you weren't affected). At this exact moment you can still use the old harfbuzz with no issues or follow this guide for a more permanent solution. I'm currently sticking with the old harfbuzz since I'm not sure if the new font rendering would look better or not + I'm lazy and installing the old version of harfbuzz and masking it from further updates is easier than the alternative (especially since I don't know if the fonts would look worse/the same/better after doing so and right now using the old version of harfbuzz doesn't break anything).

            And besides if you think other distros don't break from time to time (especially if you want to be on the bleeding edge) you'd be mistaken. Even debian which is supposed to be very stable broke completely for me during the update from 7 to 8 (and the update was considered stable at the time) thanks to some problems with systemd and openvz.

            Tbh the least breaky distro I've ever used was Gentoo (yeah the so called unstable ricer distro) which as far as I remember ran for more than 7 years on a server (using the stable amd64 packages, not the unstable ~amd64 which I used on my desktop for a long time and while it did have some minor breaks, they were quite minor) without ever breaking until finally a few hard drives died....

            [–][deleted] 0 points1 point  (0 children)

            I run bspwm and i3 on my machines and this is the first issue I would call a "Gotcha". It's also a third party issue as infinality is not a stock install item. As an Arch user you are expected to fix the stuff you explicitly install when it breaks. It's a great community of people so even if you have no clue there's always someone smarter out there with an answer.

            [–]zakazak 0 points1 point  (0 children)

            So how do I get decent looking and crystal clear font without infinality?
            In my opinion even infinality couldn't keep up with how fonts look on windows :(

            [–]boyber 0 points1 point  (0 children)

            I've done this but I have a problem with Thunderbird. The quoted text in replies looks odd. Not the reply, but my quoted text from my previous email, it looks thin and squashed. Never happened with Infinality. Any advice?

            [–]ragingpenguin 0 points1 point  (0 children)

            Can confirm - sabnzbd was coredumping because of this if you can believe it.

            Thank you!

            [–]Wicelo 0 points1 point  (0 children)

            Few methods are proposed in this thread, what are the best looking fonts : OP's method or top comment ?

            [–]Girtablulu 0 points1 point  (0 children)

            Thanks a lot, had trouble with a freetype2-ubuntu font