Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

How To Fix The Harfbuzz And Infinality Issue In Arch Linux

$
0
0

Few days ago, I have posted a guide VirtualBox Is Not Opening After Updating Harfbuzz In Arch linux . I fixed that error by downgrading Harfbuzz to its lower version. It worked for me, and I have issues so far. Also, I have already written a guide that described how to Install fonts and improve font rendering quality in Arch Linux a while ago. We have done this using infinality-bundle created and developed by bohoomil , who is gone missing/unresponsive for few months now. While searching for an alternative method, I came across a promising guide posted in GitHub by a fellow Linux user cryzed . I tried it, and It really helped me to fix the Harfbuzz and Infinality issue in my Arch Linux. So, I made this guide for those who are struggling with the same issue. The following guide is completely based the article written by cryzed. All credit goes the original author.

Download Free EBook: “Crypto 101 An introductory course on cryptography.”

Fix The Harfbuzz And Infinality Issue In Arch Linux

If you have installed infinality-bundle or , you will be encountered with this error lately.

failed: /usr/lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates

In this guide, I will show you how I fixed it.

First run:

sudo fc-presets set

Enter option number 4 and enter number 5 to quit.

1) combi
2) free
3) ms
4) reset
5) quit
Enter your choice... 4
Removing current preset...
Done. Now select a new preset...
Enter your choice... 5
No preset chosen. Aborting.

Next, install the following packages.

sudo pacman -S freetype2 lib32-freetype2 fontconfig lib32-fontconfig cairo lib32-cairo jdk8-openjdk jre8-openjdk jre8-openjdk-headless

It will ask you to remove the existing infinality packages. Simply type Y to remove and install the above packages.

Sample output: resolving dependencies...
looking for conflicting packages...
:: cairo and cairo-infinality-ultimate are in conflict. Remove cairo-infinality-ultimate? [y/N] y
:: fontconfig and fontconfig-infinality-ultimate are in conflict. Remove fontconfig-infinality-ultimate? [y/N] y
:: freetype2 and freetype2-infinality-ultimate are in conflict. Remove freetype2-infinality-ultimate? [y/N] y
:: lib32-cairo and lib32-cairo-infinality-ultimate are in conflict. Remove lib32-cairo-infinality-ultimate? [y/N] y
:: lib32-fontconfig and lib32-fontconfig-infinality-ultimate are in conflict. Remove lib32-fontconfig-infinality-ultimate? [y/N] y
:: lib32-freetype2 and lib32-freetype2-infinality-ultimate are in conflict. Remove lib32-freetype2-infinality-ultimate? [y/N] y
Packages (17) cairo-infinality-ultimate-1.14.6-2 [removal]
fontconfig-infinality-ultimate-2.11.95-4 [removal]
freetype2-infinality-ultimate-2.6.3-4 [removal]
java-environment-common-2-2 java-runtime-common-2-2
lib32-cairo-infinality-ultimate-1.14.6-2 [removal]
lib32-fontconfig-infinality-ultimate-2.11.95-1 [removal]
lib32-freetype2-infinality-ultimate-2.6.3-3 [removal]
cairo-1.14.8-1 fontconfig-2.12.1-4 freetype2-2.7.1-1
jdk8-openjdk-8.u112-1 jre8-openjdk-8.u112-1
jre8-openjdk-headless-8.u112-1 lib32-cairo-1.14.6-2
lib32-fontconfig-2.12.1-4 lib32-freetype2-2.7.1-1
Total Download Size: 39.09 MiB
Total Installed Size: 146.73 MiB
Net Upgrade Size: 136.01 MiB
:: Proceed with installation? [Y/n] y

If you have installed ibfonts-meta-base andibfonts-meta-extended or similar font groups, you need to remove them as well.

To do so, run:

sudo pacman -Rns ibfonts-meta-base sudo pacman -Rns ibfonts-meta-extended

There still could be some packages are left which are marked as dependencies. Finding and removing them manaually might bit difficult. So, we need to use pkbrowser to find them easily. Run the following command to install pkgbrowser if it is not installed already.

yaourt -S pkgbrowser

Once installed, open it either from Terminal or Menu. Pkgbrowser should look like.

After that you need to install the following font types:

sudo pacman -S gsfonts

If t1-urw-fonts-ib conflicts with gsfonts, answer yes to removet1-urw-fonts-ib.

sudo pacman -S ttf-dejavu

If ttf-dejavu-ib conflicts with ttf-dejavu, answer yes to removettf-dejavu-ib.

sudo pacman -S noto-fonts

Ifttf-noto-fonts-ib conflicts withnoto-fonts answer yes to remove. ttf-noto-fonts-ib.

Then, finally make sure you have removed all infinality-bundle using command:

sudo pacman -Rns infinality-bundle infinality-bundle-multilib infinality-bundle-fonts

Sample output will be:

error: target not found: infinality-bundle
error: target not found: infinality-bundle-multilib
error: target not found: infinality-bundle-fonts

If your output like above, congrats! You have removed infinality-bundle from your Arch system.

Next, Create the following symlinks to instruct freetype2 to use good-looking rendering defaults:

sudo ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d sudo ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d

Then,Modify (or create) /etc/fonts/local.conf file.

sudo nano /etc/fonts/local.conf

Add the contents in this link . Save and close the file.

Next, install fonts-meta-extended-lt package to make sure all necessary fonts are installed.

yaourt -S fonts-meta-extended-lt

This will install necessary and missing fonts. It will take a while.

Then we need to find if there are any missing optional dependencies. To do so, run the following command:

sudo pacman -Qi fonts-meta-base fonts-meta-extended-lt

And note down the packages listed under “Optional Deps” and install them. I had to install the following optional dependencies.

sudo pacman -S t1-cursor-ib ttf-gelasio-ib

Once all optional dependencies installed, edit /etc/profile.d/jre.sh file:

sudo nano /etc/profile.d/jre.sh

and add the following lines to enablefont anti-aliasing for Java applications.

# https://wiki.archlinux.org/index.php/java#Better_font_rendering
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true'

Save and close the file.

Finally, run the following command to update all changes.

sudo gdk-pixbuf-query-loaders --update-cache

Now, remove all infinality-bundle repositories from pacman.conf file and restart your Arch Linux.

This really helped to find the harfbuzz and infinality fonts issue in my Arch Linux desktop. I wouldn’t say it completely gave the font rendering quality like Infinality-bundle did

Viewing all articles
Browse latest Browse all 11063

Trending Articles