Back to Netrunner | Back to Blue Systems

Improving font rendering

I was using Manjaro while Netrunner Rolling was resting and am now back trying out the revived Netrunner Rolling again.

I started out with a fresh home directory to avoid crosstalk between system settings across the two distros.

While Netrunner Rolling is excellent in many respects, the fonts are not rendered as well as in Manjaro. This is painfully apparent in Firefox where black fonts assume shades of blue or some other colour.

I have discovered that KDE Systemsettings on Fonts are different for Manjaro and Netrunner Rolling.

I am writing to ask if it is at all possible to get the same font rendering and behaviour in Netrunner Rolling as it is in Manjaro. If so, what should I do?

Thank you for an excellent distro otherwise.

All we did was set hinting up to use slight hinting and rgb. you could try selecting “use system defaults”.
Turning off the force dpi setting might also help.

Keep in mind that Firefox uses it’s own font system and not the operating systems, or window managers / desktop enviroment.
Firefox will also use the Microsoft font’s when they are installed and available, Netrunner does have these installed by default.

I’ve also seen the same kinds of issue for Firefox in the Manjaro forums.

Thank you for explaining.

I took spectacle screenshots of this page in Firefox with the Manjaro Live USB and with the Netrunner Rolling Live USB to factor out home page configurations and customizations. In the latter case, once with the pre-packaged font settings and then with the changes you suggested above.

I have attached all three screenshots with self-explanatory names. To my eyes, the fonts in the Manjaro version seem the most pleasant to view. I do not know if this is a subjective or an objective assessment!

I realize that this could be subjective given my myopia and astigmatism as explained at http://www.lagom.nl/lcd-test/subpixel.php.

It could also be something linked to Firefox internals as you have suggested.

In any case, I wish that I could replicate what I see in Firefox in Manjaro in NRR as well.

Thanks.

I just wen’t through all of our settings for manjaro and we don’t make any settings for fonts at all.
You could try deleting the Netrunner default .fonts.conf file from your home directory.
You could also try removing the MS fonts package itself, this way firefox will fall back to DejaVu.

I renamed the .fonts.conf file in my home directory.

I removed the package ttf-ms-fonts.

I replicated the content preferences for Firefox in your image on my system.

There is no perceptible improvement in font rendering.

Could it have something to do with this post by philm in the Manjaro Forums:

Obsolete tutorial on Infinality mode

That is very possible actually. However, after looking at all of our Manjaro settings packages and profile used for creating the KDE edition, and comparing them to our Netrunner equivalents, there is no difference between Netrunner, and Manjaro, where font rendering is concerned that I could see, other than those I previously mentioned.

NOTE: I’ll be taking a deeper look into this as time permits.

Thank you very much. :slight_smile:

I wonder if this has anything to do with it?
https://forum.manjaro.org/t/kde-profile-d-scripts-not-loaded-sourced-after-update/30513

I do not know.

What intrigues me is that the last line of the script on my system is commented out. I wonder whether loading it will uncomment it out with an appropriate value.

In case it matters, I am now on Kernel: 4.12.10-1-MANJARO x86_64 (64 bit gcc: 7.1.1) and I do not see any grungy-looking fonts on Firefox on Manjaro.

Also, the Firefox font defaults are no more Deja Vu flavours, but simply serif, sans-serif, and monospace. Is this an alias?

I hope I have not muddied the water rather than clarified it, but I do not know enough to comment sensibly.

By the way, it’s possible to install the infinality Ubuntu package from the infinality ppa a it gives very nice fonts.

https://launchpad.net/~no1wantdthisname/+archive/ubuntu/ppa?field.series_filter=xenial

Just install the package fontconfig-infinality from xenial release without anything else and configure it according to this article:

http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html?m=1

For me it gives very nice fonts.

@rocky7x
There has been an Infinality mode as part of freetype2 for quite some time now, there is no need to install a separate package. You just need enabled this mode by removing the comment mark on the appropriate line of the /etc/profile.d/freetype2.sh file and edit it’s value.

Here is Manjaro default file:

# 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=40"

As you can see Manjaro does not set this value, letting freetype2 use the upstream default.

Ah sorry I didn’t know that, I’ll try it to see if I get the same results… if I do, I’ll uninstall the package. Btw, I’ve also tried the new sub pixel hinting method from freetype 2.7 and it worked fine except for wine programs, which sporadically failed to start, so I stopped using that. But that was on Maui…

If the last line is commented out, how does one know which mode is at play by default? Is the value 40 selected elsewhere?

And, after changing it, is it necessary to reboot to see the changes?

On Manjaro, my kernel is 4.12.10-1-MANJARO x86_64 (64 bit gcc: 7.1.1) and the font rendering I see does not have the colour fringing that I noticed in Netrunner.

It’s right in front of you.
freetype2 version 2.6 uses Classic mode by default
freetype2 version 2.7+ uses Minimal mode by default
You would remove the comment mark on that last line and change this value to what your preference is.
Yes, i believe you will need to reboot.
However, I’m not sure this setting is the issue, you may be experiencing this issue:
https://forum.manjaro.org/t/kde-profile-d-scripts-not-loaded-sourced-after-update/30513

It might just be a need to update the initramfs after freetype2 was updated:

sudo mkinitcpio -p linuxXY

XY being your kernel series (aka 44/49/412/etc.)

Note: For a more detailed explanation of the rendering interpreters.
https://www.freetype.org/freetype2/docs/subpixel-hinting.html

Perhaps you did not understand my question the way I intended it to be. Pardon me if it is a silly question.

If /etc/profile.d/freetype2.sh is the file that configures the system-wide default for for hinting, why is the last line commented out?

How then does the system know what the default hinting is?

If this value is in another file, is there not scope for a conflict?

I realize that defaults can be overridden by user-specific configuration files residing in the user’s home directory, but I am talking about this file in /etc/profile.d

Thanks for the link to the article on hinting from FreeType.

I understood your question just fine. This file is provided as-is by upstream for system configuration, if there is no setting in this file, freetype2 automatically uses it’s encoded default.
https://wiki.archlinux.org/index.php/font_configuration#Subpixel_rendering

@AJSlye: Does the setting with FREETYPE_PROPERTIES=“truetype:interpreter-version=38” also work for Freetype 2.6.3 that is still in Netrunner Debian? Or is this parameter usable only since 2.7?

I was asking where is the encoded default set.

@ chandra
AFAIK, It’s part of it’s code.

@ rocky7x
I do not know, my fonts look perfectly fine to me with the default settings.