LogoopenSUSE Build Service > Projects
Sign Up | Log In

Ubuntu Style Font Rendering

This repo provides Ubuntu style font rendering for OpenSUSE by implementing Ubuntu's versions of fontconfig and freetype2 for enhanced font presentation with subpixel rendering.  This repo is currently based on Ubuntu's 17.10 Artful Aardvark release and is updated periodically with Ubuntu's latest versions.

Install as follows:

1) Add one of the following repository links using YaST or zypper according to your OS version:

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

The packages from this repo that should be used are: fontconfig, fontconfig-32bit, libfreetype6 and libfreetype6-32bit.

Beginning with Ubuntu 17.10 Artful Aardvark the default freetype2 package used by Ubuntu has changed to include hinting in addition to subpixel rendering and which is implemented in the above repositories. According to your own personal preferences, the font rendering is generally considered to be neither better or worse with hinting but simply different.  Generally speaking, the new font rendering with hinting causes the fonts to appear bolder whereas the older font rendering without hinting appear crisper.  If you prefer the crisper font rendering in earlier versions of Ubuntu (prior to 17.10 with subpixel rendering but without hinting) then use the following SPRE repository links:

https://download.opensuse.org/repositories/home:/gldickens3:/SPRE/openSUSE_Leap_42.2/
https://download.opensuse.org/repositories/home:/gldickens3:/SPRE/openSUSE_Leap_42.3/
https://download.opensuse.org/repositories/home:/gldickens3:/SPRE/openSUSE_Tumbleweed/

The packages from the SPRE repo that should be used are: libfreetype6 and libfreetype6-32bit.  The SPRE repo is based on OpenSUSE's factory version of freetype2 with subpixel rendering enabled and hinting disabled and which works well with the OpenSUSE stock version of fontconfig.

Note: Tumbleweed users no longer need to use the "Advanced" repo for freetype-2.7.1 since the above repos are based on freetype-2.8 which works well with Tumbleweed and does not conflict with the harfbuzz package.  All users should switch from the "Advanced" repos to the above repos since the "Advanced" repos are no longer supported.

2) Switch packages to one of the above repos with either YaST or the command line as follows:

Using YaST:

     Software Management > Repositories > This Repo > Switch system packages > Accept

Using the command line: 

     sudo zypper dup --from <This Repo>

3) Logout/in.

4) Verify that the following content is included in ~/.config/fontconfig/fonts.conf and/or
/etc/fonts/local.conf:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintmedium</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
</fontconfig>

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.

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

Comments for home:gldickens3 (7)

Alexandre Silva abatistas1709 wrote 9 months ago

Works fine! Congrats!

Bengt Frost bfrost wrote 8 months ago

Just installed updated packages in Leap 42.2, works great!

Martin Torres emtorres wrote 5 months ago

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

Gordon Dickens gldickens3 wrote 5 months 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 5 months ago

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

Alexandre Silva abatistas1709 wrote 3 months ago

'Advanced' repo tested! Thanks!

Gordon Dickens gldickens3 wrote 3 months ago

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