Skip to content

Testing the font

Corne2Plum3 edited this page Nov 1, 2024 · 2 revisions

Before pushing a pull request to the master branch, to ensure to always have something that works, the compilation process through make fonts must be a success and not be interrupted because of an error, which usually means that something isn't valid with the UFO files, for example (not a full list):

  • A glyph is invalid
  • A glyph does not have the same amount/types of points across all weights
  • The substitution tables aren't the same in all weights.

After the font binaries are here (in the fonts folder), 2 types of tests have to be done:

  1. A manual test
  2. An automated test

1. Manual tests

The manual test is simple, and consists to manually inspect all glyphs (at least the one you changed) manually to ensure they look as excepted. This is even more important on intermediate weights. Usually checking only 1 weight between Thin (100) and Regular (400) and 1 weight between Regular (400) and ExtraBlack (1000) is enough.

See issue #3 as an example of what we could get and what should be avoided.

Also don't hesitate to type some words and test some features with the font. There are plenty of tools (programs and websites to check if the font is working. For example:

2. Automated tests (Fontbakery)

We use a program called Fontbakery to do some quality tests about the font. To do that, run the following command (don't forget the -i otherwise it will stop if a test has at least 1 fail)

make tests -i

Some font files will be checked, and the result for each file will be inside the tests_results folder, as log files.

Fontbakery must be up to date. (if it's not you're going to have an additional FAIL telling you that it isn't)

At the end of it there's the total amount of FATAL, FAILS and WARNS. The ideal would be to have 0 of them, but in reality it's impossible. And for some of them it's on purpose, see the list below.

Intended ignored Fontbakery issues

List as of Fontbakery version 0.12.10. If you think an entry is missing or shouldn't be here, open an issue.

contour_count WARN [code: contour-count]

Appears on ttf files only.

The non-recommended countours count is the result of the font building process. And as the font is variable, I don't think this is really a problem.

gf_axisregistry FAIL [code: invalid-name]

How do I name the variation for weight 1000?

There isn't anything among the excepted names for any weight above 900 (for this font, 1000). Also we're already using ALL of them for the other weights.

"ExtraBlack" is used, as it's how fonts with weight 1000 that are actually on Google Fonts name their weight 1000. (I forgot the examples aaaahhhh...)

kerning_for_non_ligated_sequences [code: lacks-kern-info]

For the following, I think a kerning of 0 is good, so I don't think it's going to be an issue:

equal + equal                                                                                                                                                                                                           
equal + greater                                                                                                                                                                                                         
f.ss08 + f.ss08                                                                                                                                                                                                         
f.ss08 + i.ss08                                                                                                                                                                                                         
f.ss08 + j.ss08                                                                                                                                                                                                         
f.ss08 + l.ss08                                                                                                                                                                                                         
f.ss08 + t.ss08                                                                                                                                                                                                         
hyphen + greater                                                                                                                                                                                                        
hyphen + hyphen                                                                                                                                                                                                         
less + equal                                                                                                                                                                                                            
less + hyphen

If there's something that isn't on the list, should be checked manually.

mandatory_avar_table WARN [code: missing-avar]

Fontmake doesn't generate it as the weight axis is linear (100-400 and 400-1000). It's intended.

outline_alignment_miss: WARN [code: found-misalignments]

Should be checked individually, as it may be an accident but not always.

The .sups, .subs, and similar shouldn't be considered as a problem as it's the result of the digits being shrinked and moved.

outline_colinear_vectors WARN [code: found-colinear-vectors]

Font is variable so sometimes it's needed to have colinear vectors.

outline_direction WARN [code: ccw-outer-contour]

Appears on ttf files only.

I know that for most glyphs the outline should be counter-clockwise, but for technical reasons, to have ufo_digits_glyphs.py working properly, some glyphs needs to be counter clockwise to work, when overlapping 2 glyphs (for example the numbers in a circle).

outline_jaggy_segments WARN [code: found-jaggy-segments]

For (almost?) all of them it's by design choice.

outline_semi_vertical WARN [code: found-semi-vertical]

Should be checked, but it is excepted as a design choice on the following (including derivates):

  • Exclamation
  • Asterisk
  • Quotes (single, doubles, etc.)

usweightclass FAIL [code: bad-value]

The font goes from weight 100 to 1000. The weight going below 250 may be seen as an issue, but it is no longer an issue since 2020.

it's also possible to get a fail because the weight goes above 900 but yeah, the font goes to 1000, and the variable font includes all of the 10 weights.

vendor_id WARN [code: bad]

I don't have a vendor it, and don't plan to register one (I'm not a professional lol), that's why I keep 'PfEd' (the default one given by Fontforge).