-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add face_index support to celiagg and kiva.agg backends. #605
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The little bit of exposure I had with font manager does not seem enough to qualify me as that second pair of 👀 . I would want to sit down to give this a harder look if I am to review this, but realistically speaking, I am not sure I have the bandwidth to do that. I am sorry.
One comment after a quick glance.
We can wrap this up once #633 is merged. |
48ac3da
to
27e3991
Compare
OK. I've tested this on Windows and macOS and am happy where it's at. I'm ready for a full review! |
After a git clean and a rebuild, I no longer see any italicized text 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple of comments. Given the current refactor of font code that is happening in parallel, I guess we need to redo some of these changes?
self.assertTrue(os.path.exists(font_file_path)) | ||
spec = font.findfont() | ||
self.assertTrue(os.path.exists(spec.filename)) | ||
self.assertEqual(spec.face_index, 0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think its worth adding a test for face_index
or will that be easier after the ongoing refactor of the font manager code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test for face_index
? What do you mean? And yes, it'll probably be easier after integrating these changes with the new font manager code.
{ | ||
unsigned i; | ||
|
||
if ((face_name_len + 4 + 1) > m_face_lookup_scratch_len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not entirely sure what the magical 4 and 1 here are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 for the face index (this is the %04u
in the format string) and 1 for the NULL.
Thanks for the feedback and testing. I'll integrate this into my larger font manager refactor and then we'll go from there. |
Fixes #391
Leaving this as a draft for now, because it depends on the latest release of celiagg which is not yet available via EDM.Aside from that this is a pretty scary change due to how twisty the font manager code is [and uncertainty about 3rd-party callers of said code]. It's be great to get some extra eyes on this before we move forward.