Due to a recent problem with a font on OSX, I found myself investigating OSX’s font validator. It actually ships with one which is accessible through FontBook, OSX’s font management program. Open it up, then go to ‘File’ -> ‘Validate File’ and you’ll get this:
Already this is somewhat useful, but it doesn’t go into much detail. However, Apple provides a suite of font tools on their website for developers, which contains a version which is more helpful.
Unlike the first version, this is a command line tool only. The installer will place it in usr/bin, so it should be usable anywhere.
The documentation might tell you that the command you want is ATSValidator, which has supposedly replaced ftxvalidator, but after installing and being unable to find ATSValidator I snooped around inside the package (with a little help from this useful article) and found that it isn’t there – but an updated version of ftxvalidator is. I’m not sure whether the documentation is ahead or behind the product itself, but it could definitely be more helpful!
So, open up the console, navigate to where your fonts are, and try this:
> ftxvalidator -r -o results.plist YourFont.otf
A file called ‘results.plist’ will be created with the validation report. This is a properties list file, which OSX has a viewer built in for. The results can be a little obtuse, but it does give more detail than just using the Font Book version.
Keep an eye out for properties caled ‘kATSFontTestResultKey’ – these are empty if the test is passed and contain a value which describes the failure if they don’t.
If you don’t need to look at OS X’s font support in particular, I’d recommend Microsoft’s Font Validator, as it seems to test much more and report back in much greater detail, while also being much nicer to use. If you’re stuck with OS X, however, I hope this has been useful.
This post is part of our “Fonts Articles Index” in these articles we explore Fonts.
Latest posts by Sam Howard (see all)
- PDF to HTML5’s Holy Grail – Vertical positioning for PDF fonts - October 8, 2015
- WOFF 2.0: What is it, why is it coming, and what’s next? - April 2, 2015
- Web fonts: A quick introduction to Wrapper and Glyph formats - February 27, 2015
- 5 tips for using fonts in HTML5 - January 29, 2015
- A Beginners introduction to Unicode - December 4, 2014