SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am unable to get nice looking fonts in my Current VirtualBox instance. I am using Xfce.
Regardless of my efforts, the fonts are always "blurry" or "fuzzy."
I am a long-time MS core fonts user. I much prefer Arial for my desktop font. I have tried other fonts and prefer Arial. Enough said about that, please.
For more than a decade I have used 120 dpi, anti-aliasing, full hinting, and RGB sub-pixel ordering. I long have used my own /etc/fonts/local.conf for when desktop environments do not support those options. For many years I rebuilt the freetype package to gain use of sub-pixel ordering.
I never had a problem with the True Type fonts until the latest freetype changes.
I am aware the changes in the latest package affect True Type fonts. Allegedly the cure for using True Type fonts with the latest freetype is to use various environment variables. I tried all three options in /etc/profile.d/freetype.sh.
In a CentOS 7.6 virtual machine, which includes the same freetype changes, I am using the following environment variable:
With -current this is how I set my fonts, not sure if this is the look you are going for though. The newest versions of freetype don't require recompiling to get subpixel rendering anymore, they have there own method called harmony. All I do now is set these symlinks in my /etc/fonts/conf.d file
Code:
cd /etc/fonts/conf.d
ln -s /etc/fonts/conf.avail/10-hinting-full.conf (I use 10-hinting-slight.conf, but you mentioned you like full)
ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf
ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf
and then add an .Xresources file in my home directory with these settings, this is for a few programs that don't play nice with fontconfig
The newest versions of freetype don't require recompiling to get subpixel rendering anymore, they have there own method called harmony. All I do now is set these symlinks in my /etc/fonts/conf.d file
Right answer.
All you have to do in order to change the appearance of your screen fonts is symlink files from /etc/fonts/conf.avail to /etc/fonts/conf.d.
Thanks for the tips. As often is the case, discussing an issue with others reveals the root cause. In my case, the problem is caused by 60-liberation.conf. I should have thought about that sym link right away because I long have used the MS core fonts and always have had to remove that link.
After removing that link the fonts look sharper. Yet oddly the entire VirtualBox screen looks blurry or fuzzy. All other VirtualBox guests (not Slackware) do not have this problem. Might be an Xfce thing, I don't know. I have no patience for KDE and I have not tried that. I need to find time to install the MATE packages as that is what I use daily and that would provide my eyes an equivalent presentation. I probably should find time to run Current on bare metal too. Time -- the one thing nobody ever has enough of.
Side note: I realize the Liberation fonts are supposed to be a replacement for the MS fonts, but to me they don't look the same and are not as sharp. The metrics are not the same and the fonts always look thicker to me. Because of the recent upstream freetype changes I have been tinkering with other fonts. I don't seem to find anything I am content with. Probably two decades of eye and memory muscle fighting against me because I started using the core fonts as soon as I started using Linux systems in 2002. Back in that day, fonts on a Linux system were awful. As I was dual booting for a few years, I used the core fonts in both systems. By using the core fonts I never had font issues in any Linux system I used. Some might call that "cheating." I call that being pragmatic.
Did you enable sub-pixel hinting? It is not enabled by default.
Yes.
Quote:
How to enable it ?
Also can be enabled with the older local.conf that is sourced through 51-local.conf.
Question:
Is sub-pixel hinting now built in? If yes then perhaps the build script should be updated to removed the freetype.subpixel.rendering.diff.gz patch?
Also can be enabled with the older local.conf that is sourced through 51-local.conf.
Question:
Is sub-pixel hinting now built in? If yes then perhaps the build script should be updated to removed the freetype.subpixel.rendering.diff.gz patch?
Well freetype's own method of subpixel rendering called harmony is enabled by default now because it doesn't infringe on any patents. You can still enable the old Microsoft patented method with that patch if you want it, so personally I hope Pat leaves it in the buildscript. I was using the patented method until recently because some programs like Wine didn't support harmony yet and fonts would looks terrible with harmony, so using the old patented method was the safest option. However it seems most programs have caught up to freetype so there is very little reason to use the old patented method anymore. but it is still nice having the option in the buildscript IMO
Yes and no, that line just specifies the pixel order of your LCD monitor. The vast majority of monitors sold today have a pixel order of red,green,blue (RGB). There are monitors out there that different pixel orders like blue,green,red (BGR). I believe the default is RGB so you really don't have to set that if you don't want to. I just do it for peace of mind. If you had a monitor that used BGR, you would have to symlink the appropriate entry into /etc/fonts/conf.d, however I have personally never seen a monitor that uses anything other than RGB, but I do know they exist.
And remember, #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING is the patented subpixel rendering method, freetype 2.9.1 has two ways of doing subpixel rendering, the patented cleartype Microsfoft method, which is that line, and is disabled in default Slackware. And the non-patented freetype method called harmony which is now automatically enabled in freetype. You just have to "turn it on" either in your desktop environment or with the symlinks I mention above.
So quick answer, if you decided to turn on subpixel rendering, setting your pixel order is probably only necessary if your monitor is using something other than RGB, but I always set it anyway.
And remember, #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING is the patented subpixel rendering method, freetype 2.9.1 has two ways of doing subpixel rendering, the patented cleartype Microsfoft method, which is that line, and is disabled in default Slackware. And the non-patented freetype method called harmony which is now automatically enabled in freetype. You just have to "turn it on" either in your desktop environment or with the symlinks I mention above.
Thanks !
AFAIU These two methods may coexist (may be enabled) simultaneously in the same system.
True ?
I don't believe so. if you enable #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING with the patch included in the slackbuild then the patented method will be used and harmony will be disabled. I am not 100% sure about this, but it really doesn't matter which one you choose to use. visually they are identical. If you read this, it implies its one or the other.
Code:
/*************************************************************************/
/* */
/* Uncomment the line below if you want to activate LCD rendering */
/* technology similar to ClearType in this build of the library. This */
/* technology triples the resolution in the direction color subpixels. */
/* To mitigate color fringes inherent to this technology, you also need */
/* to explicitly set up LCD filtering. */
/* */
/* Note that this feature is covered by several Microsoft patents */
/* and should not be activated in any default build of the library. */
/* When this macro is not defined, FreeType offers alternative LCD */
/* rendering technology that produces excellent output without LCD */
/* filtering. */
/* */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
Yes, I recompile freetype 2.9.x on my machine with ``#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING'' enabled, because WINE does some very bizarro low-level things to enable smoothed fonts rather than using, say, the Xft API. Try enabling smoothed fonts in WINE without that option enabled, and it will not work and fonts will appear jagged and un-antialiased.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.