Modify fonts to remove bitmap and disable gridfit for Windows font rendering.

Overview

FaithType

Modify fonts to remove bitmap and disable gridfit for Windows font rendering.

[ English ] [ 正體中文 ] [ 简体中文 ] [ 日本語 ]

Description

Since Windows 10 version 1703 (Creators Update), its built-in TrueType renderer now supports vertical anti-aliasing. Despite there are only 30 levels of grayscale shade, it dramatically improves text rendering, especially for CJK languages. Sadly, it is only enabled for selected fonts at selected sizes.

By using this tool, you can enable vertical anti-aliasing for almost any TrueType outline font, also removing the embedded bitmap, to make the text look much better on Hi-DPI displays.

How to use this tool?

  1. Download the Rust compiler.

  2. Download the source code of FaithType.

  3. Open a terminal (either Command Prompt or PowerShell):

    cd path_to_FaithType
    cargo build --release
    cd .\target\release
  4. Read how to use the tool:

    .\faithtype.exe --help
  5. Optional: If you want to completely remove hinting, download ttfautohint and use ttfautohint --dehint at this step.

  6. Process the font:

    mkdir "C:\Patched Fonts"
    .\faithtype.exe "C:\Windows\Fonts\simsun.ttc" -o "C:\Patched Fonts\simsun.ttc" --remove-bitmap --remove-hinting --modify-gasp

    Depending on whether you want to remove or regenerate hinting, use one of --remove-hinting or --keep-hinting.

  7. Optional: If you want to regenerate hinting instructions, use ttfautohint at this step instead of Step 5.

  8. Make sure Windows can open and preview the modified font file.

  9. Change the registry:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
    "SimSun & NSimSun (TrueType)"="C:\Patched Fonts\simsun.ttc"
    "宋体 & 新宋体 (TrueType)"="C:\Patched Fonts\simsun.ttc"
  10. Restart the system.

FAQs

  • Why remove bitmap?

    Although OpenType supports grayscale bitmap, all Windows built-in bitmap fonts only contain black-and-white version. This happens even on Hi-DPI displays, where the number of pixels are already enough to produce legible anti-aliased text.

    Also, some bitmap fonts only load when ClearType is off. Normally we don't care about them. But since current ClearType is broken (see below), we now need to remove these bitmaps.

  • Why disable gridfit?

    Windows built-in fonts tend to use TrueType hinting to heavily gridfit the outlines, rendering the text blocky and pixelated even on Hi-DPI screens. Some people, who may be using an old VGA connector or an uncalibrated display, claims this style maintains color contrast and sharpness. But to me, heavily gridfitted text gives me headache after reading for a few minutes.

  • Why patch the gasp table?

    Because ClearType is now broken somewhere between Windows 10 version 1703 and 21H1. The LCD filter can no longer be turned off through the “ClearType Text Tuner”.

    LCD filter is originally designed for LCD screens with 1:1 viewing scale. Meaning you should not use LCD filter on projectors, televisions, PenTile displays, rotatable displays, video recordings, screenshots, remote meetings, slideshows, DPI-scaled applications, etc. But now, even the Text Tool in “Microsoft Paint” can only draw LCD-filtered text.

    If you turn ClearType off altogether, you also get bugs and lose legibility with certain built-in fonts. One solution is to process those fonts with FaithType, which patches the gasp table to request bidirectional anti-aliasing while you can keep ClearType turned off.

Strokes look too thin!

On older versions of (Mac) OS X, the TrueType renderer widens the strokes to maintain a stable contrast on Low-DPI displays. Windows can't do stroke widening. My personal experience with graphics indicates 1.3px is the minimum width for legible font rendering, but most built-in fonts in Windows are way too thin.

  1. Changing the gamma level from 0x00000898 to 0x00000708 may help:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Avalon.Graphics\DISPLAY1]
    "GammaLevel"=dword:00000708
  2. Another way is to use ttfautohint to generate TrueType hinting to widen the strokes.

  3. The ultimate solution is to buy a Hi-DPI display.

Common issues

  • Microsoft Yahei (微软雅黑), Microsoft Jhenghei (微軟正黑體), and Meiryo (メイリオ):

    Their hinting instructions have issues with vertical anti-aliasing. You need to remove hinting.

  • Monotype Courier New:

    The Monotype Courier New is designed according to the metal letter used in IBM typewriters, instead of the real appearance on a paper, where the ink spreads and emboldens the strokes. Therefore, this Monotype font is garbage, replace it with “Bitstream Courier 10 Pitch”.

  • DynaLab MingLiU (華康細明體) before version 4.55:

    The font rendering requires TrueType hinting. Don't remove hinting.

License and warranty

This software is released under the GPL license, version 3 or later.

This software may cause instability to your operating system due to bugs on my side, or on Microsoft's side, or on any third-paty application's side. This software is released free-of-charge only under the hope that it may be helpful, thus comes with no warranty in case anything happens during your usage of this software.

Acknowledgement

You might also like...
An implementation of Code Generation and Factoring for Fast Evaluation of Low-order Spherical Harmonic Products and Squares

sh_product An implementation of Code Generation and Factoring for Fast Evaluation of Low-order Spherical Harmonic Products and Squares (paper by John

lightweight and customizable rust s-expression (s-expr) parser and printer

s-expr Rust library for S-expression like parsing and printing parser keeps track of spans, and representation (e.g. number base) number and decimal d

Crates Registry is a tool for serving and publishing crates and serving rustup installation in offline networks.
Crates Registry is a tool for serving and publishing crates and serving rustup installation in offline networks.

Crates Registry Description Crates Registry is a tool for serving and publishing crates and serving rustup installation in offline networks. (like Ver

Simplify temporary email management and interaction, including message retrieval and attachment downloads, using Rust.

Tempmail The Tempmail simplifies temporary email management and interaction, including message retrieval and attachment downloads, using the Rust prog

The simplest way to de-Google your life and business: Inbox, Calendar, Files, Contacts & much more
The simplest way to de-Google your life and business: Inbox, Calendar, Files, Contacts & much more

Bloom The all-in-one private workspace Try it for free! You no longer trust tech monopolies with your data? You are done with your privacy invaded by

MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine
MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine

MeiliSearch is a powerful, fast, open-source, easy to use and deploy search engine. Both searching and indexing are highly customizable. Features such as typo-tolerance, filters, and synonyms are provided out-of-the-box. For more information about features go to our documentation.

A job queue built on sqlx and PostgreSQL.

sqlxmq A job queue built on sqlx and PostgreSQL. This library allows a CRUD application to run background jobs without complicating its deployment. Th

An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Rust ESP32 Example An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Small and simple stateful applications, designed to facilitate the monitoring of unwanted behaviors of the same.

Violet Violet é um pequeno e simples monitorador de aplicação, voltado para receber eventos de erro e estado. Instalação simples: Dependencias: Docker

Releases(latest)
Owner
Star Brilliant
Star Brilliant
A Garry's Mod module that lets you check which fonts are available on the system

gm_fontsx Since apparently we're never getting a proper way to check for installed fonts on Garry's Mod, this has to exist ?? Usage require("fontsx")

Earu 4 Mar 14, 2022
Demo for the swash font library

Demo for the swash crate See the swash repo or crate for the actual project. This is a chunk of very rough code.

Chad Brokaw 28 Nov 29, 2022
Novus - A blazingly fast and efficient package manager for windows.

Novus - A blazingly fast and efficient package manager for windows. Why Novus Swift Unlike any other package manager, Novus uses multithreaded downloads

Novus 197 Dec 18, 2022
Rust for the Windows App SDK

Rust for the Windows App SDK The windows-app crate makes the Windows App SDK (formerly known as Project Reunion) available to Rust developers.

Microsoft 212 Nov 22, 2022
Click-once - A small tiny little binary to fix undesired mouse double clicks in Windows, written in Rust.

click-once A small tiny little binary to fix malfunctioning mouse double clicks in Windows, written in Rust. Minimal executable with little to no over

null 23 Dec 29, 2022
LSR - A Rust Implementation of LS for Windows

LSR - A Rust Implementation of LS for Windows(and possibly other platforms) This is underdevelopment Quick Start For now, I only tested this code on t

Christopher Schneider 4 Jan 31, 2023
A Rust proc-macro crate which derives functions to compile and parse back enums and structs to and from a bytecode representation

Bytecode A simple way to derive bytecode for you Enums and Structs. What is this This is a crate that provides a proc macro which will derive bytecode

null 4 Sep 3, 2022
A library and tool for automata and formal languages, inspired by JFLAP

Sugarcubes is a library and application for automata and formal languages. It is inspired by JFLAP, and is intended to eventually to be an alternative to JFLAP.

Henry Sloan 22 Nov 2, 2022
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity.

bottom-bot This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity. Ever had this pro

Bottom Software Foundation 11 Dec 10, 2022