Ubuntu Style Font Rendering

This repo is deprecated for freetype2 version 2.8.1 and above due to the introduction of the Harmony LCD Subpixel Rendering technique. This repo will no longer be published for Tumbleweed, Leap 15.0 or any other version of OpenSUSE.

The new Harmony LCD Subpixel Rendering technique avoids the ClearType patents by not requiring (and/or supporting) filtering. By default, freetype2 now offers high quality LCD-optimized output without resorting to ClearType techniques of resolution tripling and filtering. With the Harmony method each color channel is generated separately after shifting the glyph outline, capitalizing on the fact that the color grids on LCD panels are shifted by a third of a pixel. This output is indistinguishable from ClearType with a light 3-tap filter.

Recommended Font Rendering Configuration For Harmony
-----------------------------------------------------------------------

The default freetype2 package has changed to include hinting in addition to Harmony subpixel rendering. Generally speaking, the new font rendering with hinting causes the fonts to appear bolder whereas the font rendering without hinting appear crisper and is virtually identical to ClearType rendering. If you prefer the crisper font rendering (which is recommended) then add the following to /etc/environment:

FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=1 \
autofitter:warping=1"

This will disable hinting while keeping Harmony subpixel rendering and will produce font rendering that is virtually identical to ClearType.

You should verify that the following content is included in ~/.config/fontconfig/fonts.conf and/or /etc/fonts/local.conf:



rgb




true




hintmedium




true




lcddefault

Edit the hintstyle in ~/.config/fontconfig/fonts.conf and/or /etc/fonts/local.conf and try each available setting: "hintslight", "hintmedium", "hintfull". "hintmedium" is the default value and which usually produces the best results.

You should logout/login after changing the font configuration.

Alternatively, you can use your desktop environment's GUI to set the font configuration. For example, with KDE, go to Font Settings and enable anti-aliasing > Configure > RGB > Slight/Medium/Full.

For best results, you should also install a robust font package such as a set of MS truetype fonts. You can install additional fonts from an existing Windows installation in /usr/share/fonts/ or use the OpenSUSE package, fetchmsttfonts, which provides a selection of freely available MS truetype fonts including Ariel, Verdana and Times New Roman.

Name Changed
Comments for home:gldickens3 20

Alexandre Silva

abatistas1709 wrote over 2 years ago

Works fine! Congrats!


Bengt Frost

bfrost wrote over 2 years ago

Just installed updated packages in Leap 42.2, works great!


Martin Torres

emtorres wrote about 2 years ago

Thanks for your work! Please can you add a build for Leap 42.3?


Gordon Dickens

gldickens3 wrote about 2 years ago

I have already added a build for Leap 42.3 in my Advanced repo here:

http://download.opensuse.org/repositories/home:/gldickens3:/Advanced/openSUSE_Leap_42.3/

This should work fine, however, I must tell you that I have not yet tested it. So, give it a test drive if you would like and let me know how it goes.

I was planning to test everything for 42.3 soon, however, I have been very busy but I will get around to it within the next few weeks anyway...

Thanks,

Gordon


Martin Torres

emtorres wrote about 2 years ago

Ok thanks again. I will test the 'Advanced' repo.


Alexandre Silva

abatistas1709 wrote almost 2 years ago

'Advanced' repo tested! Thanks!


Gordon Dickens

gldickens3 wrote almost 2 years ago

Hello abatistas1709, Thanks for testing the repo!... Gordon


jean-christophe baptiste

phocean wrote over 1 year ago

Excellent work, thank you for sharing.


Bill Fischer

billfischer wrote over 1 year ago

Thank you very much! This is fantastic. The font rendering is excellent.


Bengt Frost

bfrost wrote over 1 year ago

Installed and with Georgia, Verdana (fetchmsttfonts) and Source Code Pro fonts. Fontconfig is: Font Antialiasing, hintslight, rgb och lcddefault with KDE system settings (also added lcddefault in ~/.config/fontconfig/fonts.conf) and in YaST settings. Nice, great work!


Bengt Frost

bfrost wrote over 1 year ago

Instead of add lcddefault in home fonts.conf: echo "Xft.lcdfilter: lcddefault" > ~/.Xresources # If X.org


simon izor

simonizor wrote over 1 year ago

You should be adding the patches from the main freetype2 repo here for font rendering issues with Electron apps.


Gordon Dickens

gldickens3 wrote over 1 year ago

Hello simonizor, This repo includes the patches that ubuntu uses. I also maintain another repo named SPRE, with subpixel rendering enabled and hinting disabled, that is based on OpenSUSE factory and that includes all of the OpenSUSE patches here:

https://build.opensuse.org/project/show/home:gldickens3:SPRE

I recommend that you give the SPRE repo a test drive and see if it plays nicely with the Electron apps.

FYI,

Gordon


Tanmay Das

tanmaydas wrote about 1 year ago

Hi @gldickens3, Do I have to install both libfreetype6 and libfreetype6-32bit? Or just one of them?


Gordon Dickens

gldickens3 wrote about 1 year ago

You only need libfreetype6-32bit to use with 32 bit applications.


Ivo Lux

imax wrote about 1 year ago

Hi Gordon, which font configuration do I need for the new freetype2 version 2.9.1 in leap 15 (hintstyle,rgb, lcddefault...)? I guess everything turned off? And is ~/.config/fontconfig/fonts.conf still needed? I'm a bit confused about the new version, and I'm not sure if it renders the same like ubuntu. My subjective opinion is not.


Gordon Dickens

gldickens3 wrote about 1 year ago

Hi imax,

For Harmony LCD rendering in the recent versions of freetype2, I recommend the font configuration that is included in item 4 above or use your GUI to configure. Try hintmedium first which is normally best but then, if you aren't satisfied, try the other settings.

Stock OpenSUSE Leap 15.0 comes mostly pre-configured for optimal font rendering, however, you need to add the following to /etc/environment:

FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=1 \ autofitter:warping=1"

Personally, I think that the new Harmony LCD rendering is equivalent to cleartype with the above FREETYPE_PROPERTIES entry to /etc/environment.

FYI,

Gordon


Ivo Lux

imax wrote about 1 year ago

Thanks for your reply. I will try it.


Anthony Accioly

aaccioly wrote about 1 year ago

Hi Gordon. I've previously installed libfreetype6 2.9-lp150.4.1 from the, now defunct, Leap 15 repo. Actually, I probably sudo zypper dup --from it. Now that the repo no londer exists, should I downgrade to 2.9-lp150.2.1? If so, any extra hints on how and what to downgrade / change in the config?


Gordon Dickens

gldickens3 wrote about 1 year ago

Hi aaccioly,

It really doesn't matter if you keep my repo's version or go back to the stock OpenSUSE repo. The reendering will be the same either way. I guess that you probably should downgrade otherwise YaST may list your libfreetype6 as unmaintained.

FYI,

Gordon