GithubHelp home page GithubHelp logo

bhanditz / text-rendering-tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unicode-org/text-rendering-tests

0.0 2.0 0.0 6.59 MB

Unicode’s test suite for text rendering engines

License: Other

Python 0.12% HTML 99.42% CMake 0.01% C++ 0.28% Objective-C++ 0.16% CSS 0.01%

text-rendering-tests's Introduction

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 https://github.com/unicode-org/text-rendering-tests.git
$ cd text-rendering-tests
$ for engine in CoreText FreeStack fontkit OpenType.js ; do python check.py --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 check.py 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.

Contributing

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.

text-rendering-tests's People

Contributors

brawer avatar devongovett avatar robmck-ms avatar miguelsousa avatar jenskutilek avatar behdad avatar fdb avatar justvanrossum avatar lorp avatar truetyper avatar mayuraverma avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.