Skip to content

Bulk tester#5365

Merged
skef merged 2 commits intofontforge:masterfrom
iorsh:bulk_test
Feb 4, 2024
Merged

Bulk tester#5365
skef merged 2 commits intofontforge:masterfrom
iorsh:bulk_test

Conversation

@iorsh
Copy link
Copy Markdown
Contributor

@iorsh iorsh commented Feb 2, 2024

This is a BASH script, which can perform an operation on a large number of SFD files and compare its output to the reference FontForge version.

Specifically, for each SFD file in the list the following actions are performed:

  1. Call /usr/local/bin/fontforge with some script and keep the output
  2. Call a development version of fontforge with the same script and keep the output separately
  3. Compare the outputs byte-to-byte and report failure if they differ.

Type of change

  • New feature - regression testing

To verify this script actually works:

  1. Go to
    sf->fullname = copy(val);
    and modify this line to sf->fullname = copyn(val, 23);. This change cuts long font names.
  2. Compile the project and run the script
  3. Observe some fonts (with longer names) start to fail. For example, Homerton.Medium.Oblique.sfd

Copy link
Copy Markdown
Contributor

@skef skef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be more portable if it were written in Python but the type of testing its doing is less likely to vary by platform, and anyway where bash isn't available by default one can figure things out, so this seems fine.

@skef skef merged commit f5a13bb into fontforge:master Feb 4, 2024
@iorsh iorsh deleted the bulk_test branch March 28, 2025 07:27
@iorsh
Copy link
Copy Markdown
Contributor Author

iorsh commented Mar 28, 2025

To test TTF export:

FF_PY_SCRIPT_LINE="f=fontforge.open(argv[1]); f.generate(argv[2], flags='no-FFTM-table')"
FF_OUTPUT_FILE="Output.ttf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants