Skip to content

PSA: harfbuzz update + Infinality breaking System

Sorry to do this again, but quite a few people (including me) ran into this issue recently. Since people in here and on IRC kept having problems related to it, I wrote up a small (and amateurish) guide for people who simply installed the infinality-bundle packages and were happy with it (without knowing much more), and suddenly started having issues.

Please pay attention to the disclaimer.

124 points61 comments
Open on Reddit
About this post
Posted
Archived
Score
124 ยท 100% up
Kind
Text
ID
5mphpu

Author

12
posts
60
comments
7
media
View profile

65 comments

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

17 points

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.

3 points

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.

1 points

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

3 points

No, it's no longer necessary.

0 points

I just made the switch from infinality. Fonts still look like ass in vanilla freetype2.

3 points

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.

16 points

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

1 points

Thank you.

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

11 points

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

2 points

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
6 points

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

1 points

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.

1 points

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

1 points
unknown author

Deleted before we saved it.

1 points
unknown author

Deleted before we saved it.

1 points

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 ๐Ÿ˜…

5 points

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

5 points

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

4 points

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

3 points

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

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

3 points

How to build it and install ??

2 points

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
2 points

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!

3 points

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.

3 points

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

3 points

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)

2 points

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.

11 points

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.

7 points

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.

2 points

You're not losing it. Arch is bleeding edge and version upgrades do sometimes break stuff. There's no point in pretending otherwise. It's not because the Arch team sucks or anything, it's just the nature of a rolling release system.

Mind you, when there's an issue, it can almost always be fixed or worked around, but it will require manual intervention. If you're not able to "linux your way out of it" when something breaks, or you're simply not willing to put up with occasional disruptions and troubleshooting sessions, then Arch is not for you.

Copy pasting from another post I made last week, here's a list of issues I've had to deal with over the last year and a half or so:

  • OpenVPN changed the location of its config files, and the names of its services.
  • The private-internet-access-vpn AUR package broke too many times to list
  • An nvidia driver upgrade had a bug that caused a blank screen on boot, had to use a workaround that caused tearing until a fix was released
  • every single gtk+ upgrade broke my themes until a fix was released for them
  • a binary incompatible glibc upgrade broke my AUR packages, had to rebuild them all
  • a binary incompatible ncurses upgrade broke ncmpcpp. Had to wait until a rebuilt version of ncmpcpp was released in the repo.
  • libpng was moved from aur to the official repos, but the version number was reset from -3 to -1 which caused pacman to be very confused.
  • conky upgrade ditched the old syntax, so I had to rewrite my .conkyrc file.
  • A virtualbox upgrade broke the e1000 virtual network adapter causing "tx unit hang" errors in all my VMs. Had to roll back to the old version and wait for a fix.
  • A wine upgrade caused sound to break in some games, I had to hold back the package for several months
  • After sound was fixed in wine, performance was choppy, I had to hold back the package again for months. For now everything works again.
  • bash annoyingly changed ctrl-w handling in vi mode, had to create a .inputrc file to override the behavior.
  • The ls command annoyingly started to add single quotes around long file names, had to create an alias to override the behavior.
  • rxvt-unicode-patched removed the fontwidth patch which broke my terminal. Had to rollback the upgrade and petition the package maintainer to add it again.
  • zdoom and gzdoom started to depend on fmod instead of fmodex, without updating the dependency list, so they failed to build. Had to track down the dependency myself.
  • quakespasm changed the location or format of its config files, so I lost my custom settings.
  • there was some infinality breakage that I don't remember the details of
5 points

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?

3 points

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

1 points

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.

1 points

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?

2 points

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

1 points
unknown author

Deleted before we saved it.

1 points
unknown author

Deleted before we saved it.

1 points

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

1 points

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?

1 points

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

Thank you!

1 points

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

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.