googlefonts / fontdiffenator

Font comparison tool
Apache License 2.0
80 stars 13 forks source link

v0.100: Added table dumper and more columns for tables #9

Closed m4rc1e closed 6 years ago

m4rc1e commented 6 years ago

Dumper

When fontdiffenator performs a diff, it will create a table for each font to compare. Dumper simply returns a table for the specified font.

dumper ./path/to/font.ttf [marks, kerns, glyphs, attribs...]

It's quite useful if you need to proof all kerns or quickly check attributes within a font.

dumper ./path/to/font.ttf kerns -s

screen shot 2018-07-20 at 10 52 46

Output can be a plain table of markdown

area string glyph
-435760.0 .notdef
0 .null
-576910.333333 A A
-832944.0 Æ AE
-891748.166667 Ǽ AEacute
-635714.5 Á Aacute
-664194.833333 Ă Abreve
-671934.166667 Â Acircumflex
-636953.833333 Ä Adieresis
-635614.583333 À Agrave

More row info

Whilst hooking the diffenator into GFR, https://github.com/googlefonts/gfregression/pull/35. I needed a way to display more info to users. I thought adding more columns to each table was the most appropriate solution. I've added three extra columns called 'string', 'features' and 'description'.

string: Character combos used to build item being diffed. E.g for kerning 'AV' features: OT features enabled to build the string. description: string + features used E.g 'A+V | ('c2sc')

I've done a small tidy up on column names as well. For marks, I previously had "mark1' and "mark2", I've change these to "base_glyph", "mark_glyph"

m4rc1e commented 6 years ago

ping @davelab6.

Once merged, I'll upload it to pip.

davelab6 commented 6 years ago

Chiaro, come Mario!