Closed thundernixon closed 5 years ago
DiffFonts
is located in the diff.py
sub-module of diffenator. This import statement should address your issue with the attempt to import the (correct) DiffFonts
class:
from diffenator.diff import DiffFonts
Ohhh I wasn't aware I needed the .diff in the import. Thank you! -- ——
Stephen Nixon
www.thundernixon.com
Marc's implementation is in the fontdiffenator.__main__
file. It looks like his approach with the DiffFonts
class combines this dictionary that is parsed from command line args:
with this class instantiation using the before/after paths in the call:
https://github.com/googlefonts/fontdiffenator/blob/master/Lib/diffenator/__main__.py#L112
then you can choose how you want to view the diff:
Thanks so much for the helpful information, @chrissimpkins!
For now, I just cued diffenator via gftools qa
in a simple shell script.
The readme suggests that fontdifferenator can be used in Python:
However, when I do try to use this in Python, I get a
cannot import name
error:Searching in the bin of fontdiffenator, I see that
diffenator/diff.py
contains nodiff_fonts
class, but does containDiffFonts
class. So, I've tried to instead import and use that in my Python script, but with a similar result:Am I missing something here, or has the tool changed since that part of the readme was written?