Skip to content

FreeType adjustments designed to improve fonts visibility

License

Notifications You must be signed in to change notification settings

maximilionus/freetype-envision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Carefully tuned adjustments for the font rendering software library FreeType, designed to improve visibility and refine appearance on the Linux platform.

You can find demo images to compare the changes here.

Overall

  • Improve the visibility of medium and small-sized fonts by utilizing the disabled by default FreeType 'stem-darkening' feature.
  • Use additional fontconfig rules to prepare the environment for all the new FreeType features.

Install

Fedora, RHEL

  1. Enable the copr repository:
$ sudo dnf copr enable maximilionus/freetype-envision
  1. Install with:
# Normal mode
$ sudo dnf install freetype-envision

# Full mode
$ sudo dnf install freetype-envision-full
  1. Reboot to apply the changes.

Manual

Install

  1. Download the latest release here (download "Source code") and unpack it to any user available location.
  2. Open the terminal in the unpacked directory.
  3. Run the command below, root required:
# Normal mode:
$ sudo ./freetype-envision.sh install
# or
$ sudo ./freetype-envision.sh install normal

# Full mode:
$ sudo ./freetype-envision.sh install full
  1. Reboot to apply the changes.

Uninstall

  1. Run the command below, root required:
$ sudo ./freetype-envision.sh remove
  1. Reboot to apply the changes.

Upgrade

  1. Follow the uninstall procedure using the script exactly the version of the project that is installed in the system.
  2. Download the new version and proceed with install procedure.

Details

Currently, there are several configuration presets with different levels of safety. Normal preset is considered least likely to cause visual errors in the user's environment and is therefore used by default, while the Full one tries to maximize the readability of the rendering for all the font drivers and options, at the cost of severe distortions in the rendering of some elements.

  • Configurations in profile.d:

    • Stem-darkening (embolden) for drivers:

    This feature improves visibility of the medium and small sized-fonts. Especially helpful for the LowPPI displays.

    Driver Normal Full
    autofitter Yes Yes
    type1 Yes Yes
    t1cid Yes Yes
    cff Yes Yes
    • Stem-darkening enabled for the small font sizes in autofitter driver:

    Darkening for small sized fonts with autofitter driver in Normal mode is disabled to avoid various rare distortions in the font rendering

    Normal Full
    No Yes
  • Configurations in fontconfig:

    • Enforce grayscale antialiasing (disable sub-pixel).

    Grayscale antialiasing should be enforced in the system to make the stem-darkening work properly.

    • Reject usage of Droid Sans family for Japanese and Chinese, force the environment to use other fonts.

    Stem-darkening does not work well with these typefaces, causing characters over-emboldening.

Notes

GNOME DE

Antialiasing

While GNOME does use the grayscale antialiasing method by default, there are a few Linux distributions that change this setting to the subpixel method, making the font rendering appear incorrect after the tweaks from this project.

This issue is already tracked, but manual user intervention is still required for now. You can enable the grayscale antialiasing method by executing the command below:

gsettings set org.gnome.desktop.interface font-antialiasing grayscale

To reset the changes:

gsettings reset org.gnome.desktop.interface font-antialiasing

Fonts

GNOME users should consider changing the default interface font Cantarell to any other similar font that doesn't render with the cff engine. Hinting in cff engine is broken, making the fonts look very distorted after emboldening.

Changing the fonts is possible through the gnome-tweaks utility.

Fonts to consider:

  • Inter (size: 10.5pt)
  • Noto Sans (size: 10.5pt)

Build

The repository also contains a GNU Make - Makefile for building the project archive for further distribution via package managers. Note that this archive does not contain the main script, as all file handling is expected to be done by the package manager! The final build made by this method is distributed with each release.

To create the release archive:

  1. Execute:
    $ make
  2. Final archive will be placed in dist/ directory with name freetype-envision-X.Y.Z.tar.gz, where:
    • X.Y.Z stands for current version