Skip to content
Unicode’s test suite for text rendering engines
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
testcases [SHLANA-3] Shorten test description Feb 28, 2019
.gitignore Remove configs for obsolete build system `gyp` Oct 29, 2018
.travis.yml Install cmake on Travis build machines Oct 29, 2018
package.json Simplify paths before checking for equality Jan 9, 2018

Build Status

Text rendering tests

This is a test suite for text rendering engines. It is not easy to correctly display text, so we founded this project to help implementations to get this right.

$ git clone --recursive
$ cd text-rendering-tests
$ for engine in CoreText FreeStack fontkit OpenType.js ; do python --engine=$engine --output=reports/$engine.html  ; done

Supported Platforms

Currently, the test suite supports four OpenType implementations:

It’s trivial to test other implementations; simply write a small wrapper tool. For the Go font library, see here. For the Rust font library, see here.

Test Cases

The test cases are defined in the testcases directory. It contains HTML snippets which describe each test, and define the rendering parameters together with the expected result.

For each test case, the script parses the HTML snippet to extract the rendering parameters. Then, it runs a sub-process (written in C++, Objective C or JavaScript depending on the tested implementation) that writes the observed rendering in SVG format to Standard Output. Finally, the script checks whether the expected rendering matches the observed result. Currently, “matching” is implemented by iterating over SVG paths, allowing for maximally 1 font design unit of difference.


Your contributions are very welcome; simply send pull requests via GitHub. A bot will ask you (on the GitHub review thread) to accept Unicode’s Contributor License Agreement by clicking on a web form. Alternatively, if you prefer paper, you can also send a signed paper copy of the agreement to Unicode.

You can’t perform that action at this time.