googlefonts / fontdiffenator

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

Improve/finalise api for v1.0.0 #28

Closed m4rc1e closed 5 years ago

m4rc1e commented 5 years ago

Before rolling out the v1.0.0 release, I'd like to get the api finalised.

It currently has a C style api.

# We have to pass the diff to each function
diff = diff_fonts(font_a, font_b)
report = diff_report(diff, font_a, font_b)
gifs = diff_renders(diff, font_a, font_b, dst='/path/out')

It may better if we move to an OOP solution.

# DiffFonts is a container (similar to a Pandas DataFrame).
diff = DiffFonts(font_a, font_b)
report = diff.to_txt('/path/out.txt')
report_md = diff.to_md('/path/out.md')
gifs = diff.to_gifs('/path/out_dir')
m4rc1e commented 5 years ago

Done in #35

davelab6 commented 5 years ago

Winner

chrissimpkins commented 5 years ago

It looks like the C style approach is still documented on the README.

https://github.com/googlefonts/fontdiffenator#python-google-fonts

Look forward to taking this for a spin Marc. Looks fantastic!