Skip to content

Use fonttools.afmLib instead of ad-hoc AFM parser#700

Merged
jwiggins merged 3 commits into
masterfrom
refactor/fonttools-afmlib
Mar 11, 2021
Merged

Use fonttools.afmLib instead of ad-hoc AFM parser#700
jwiggins merged 3 commits into
masterfrom
refactor/fonttools-afmlib

Conversation

@jwiggins
Copy link
Copy Markdown
Member

@jwiggins jwiggins commented Mar 10, 2021

kiva.fonttools.afm should not exist. Once all this font chaos is done, it won't.

This PR starts the ball rolling by changing the AFM parsing in the new code to use fonttools.afmLib:AFM. While I was at it, I copied fonttools test AFM file. Now we're actually exercising the code with some real data!

Comment thread kiva/fonttools/tests/test_scan_parse.py Outdated
Comment thread kiva/fonttools/tests/test_scan_parse.py Outdated
@jwiggins
Copy link
Copy Markdown
Member Author

I'm confused:

FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.edm/envs/enable-test-3.6-null/lib/python3.6/site-packages/kiva/fonttools/tests/data/TestAFM.afm'

@jwiggins
Copy link
Copy Markdown
Member Author

Right. Package data. 😫

Copy link
Copy Markdown
Contributor

@rahulporuri rahulporuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jwiggins jwiggins merged commit dfcb9a5 into master Mar 11, 2021
@jwiggins jwiggins deleted the refactor/fonttools-afmlib branch March 11, 2021 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants