| # test files |
| |
| This directory contains files used for testing. |
| |
| ## ttx |
| |
| The `ttx` directory contains ttx files describing test cases. These are compiled |
| and stored in the `ttf` directory; the `ttf` files are the actual test inputs. |
| |
| ## fea |
| |
| The `fea` directory contains fea files describing test cases. Similarly to ttx, |
| these are compiled and stored in the `ttf` directory. Each test case is |
| comprised of a FEA file and a corresponding glyph list. |
| |
| ## extracted data |
| The extracted directory contains text files holding data computed by FreeType |
| for each font. This data is used for comparisons with the results of our |
| metadata reading and outline loading implementations. |
| |
| ### glyphs |
| Extracted glyph outlines are generated by `extract_glyphs.py` and stored in |
| `extracted\<font-file-name>-glyphs.txt`. Each glyph is represented by the pattern: |
| ``` |
| glyph <glyph-id> <font-size> <hint-mode> |
| points <points> |
| contours <contours> |
| tags <tags> |
| m <points> |
| l <points> |
| q <points> |
| c <points> |
| - |
| ``` |
| With the following values: |
| * `glyph-id`: the glyph identifier |
| * `font-size`: size in pixels per em. A size of 0 means unscaled |
| * `hint-mode`: one of `none`, `full`, `light`, or `light-subpixel` |
| * `points`: space separated list of points in `x, y` format |
| * `contours` and `tags`: space separated list of integers representing contour end point |
| indices and tag bits, respectively |
| * `m`, `l`, `q`, `c`: path commands for `move to`, `line to`, `quad to` and `cubic to`, |
| respectively |
| |
| The pattern ends with a single `-`. |
| |
| ## rebuilding |
| To update the binaries and extracted data, run script located at `resources/test_fonts/rebuild.sh` |
| This script will install the correct version of fonttools and FreeType, and then regenerate |
| all of the inputs. |
| |
| ```shell |
| # from the repo root |
| somewhere/fontations $ ./resources/test_fonts/rebuild.sh |
| ``` |