Skip to content

x/image/font: add a tool for running Unicode’s text rendering tests #20208

Open
@brawer

Description

@brawer

Would you be interested in testing the Go font library through Unicode text rendering tests?

I’m maintaining this test suite for Unicode, and would volunteer to do the integration with the test framework. But somebody familiar with Go would have to write a command-line tool that can be called like this:

path/to/some-command --font=fonts/TestCMAP14.otf --testcase=Foo-5/6 --render=≩≩

This should write an SVG file to standard output, looking like this:

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1"
    xmlns="http://www.w3.org/2000/svg"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    viewBox="0 -120 1446 1200">
  <symbol id="Foo-5/6.uni2269" overflow="visible"><path d="M100,334 L623,563 L623,619 L100,880 L100,793 L518,594 L100,420 Z M100,208 L622,208 L622,287 L100,287 Z M100,38 L622,38 L622,117 L100,117 Z M282,-93 L508,379 L436,413 L211,-59 Z"/></symbol>
  <use xlink:href="#Foo-5/6.uni2269" x="0" y="0"/>
  <use xlink:href="#Foo-5/6.uni2269" x="723" y="0"/>
</svg>

For test cases on variable fonts, your tool would be called with an additional argument for the variation settings, such as --variation=wght:481.3;wdth:70. Initially, you could ignore this.

The test fonts are here. If you write a command-line tool that can be called as described, the generated test report will look like this, this, this, or this.

Activity

changed the title [-]x.image.font: Tool for running Unicode’s text rendering tests[/-] [+]x/image/font: Tool for running Unicode’s text rendering tests[/+] on May 2, 2017
added this to the Unreleased milestone on May 2, 2017
added
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.
TestingAn issue that has been verified to require only test changes, not just a test failure.
on May 2, 2017
changed the title [-]x/image/font: Tool for running Unicode’s text rendering tests[/-] [+]x/image/font: add a tool for running Unicode’s text rendering tests[/+] on Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.TestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bradfitz@brawer@nigeltao@gopherbot

        Issue actions

          x/image/font: add a tool for running Unicode’s text rendering tests · Issue #20208 · golang/go