Conversation
23b2e18 to
aabb26a
Compare
Looks to me like |
|
Er, yes..? The test passes (even on On even though the typings say they should be accepted: |
|
Oh, right, most PR tests fail without the other changes, but that was not your intention here. |
030e19a to
6428532
Compare
e918a3a to
5bcbe16
Compare
9e51b32 to
a403f4c
Compare
You've initialized Lines 227 to 231 in 0253ef0 But you are ensuring that it is always populated from Python bcause you are concerned about someone writing future code that isn't aware that it might be |
I can re-add the |
aa3dd08 to
54b8025
Compare
I don't think we need to take action to help such users. But I also have a feeling that there are a bunch of arguments in our C API that are optional that don't need to be (since we always provide values for them in our Python code). See what you think of akx#30 |
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Avoids a segfault when `encoding` and `font_bytes` weren't passed at all (they were left uninitialized)
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
* Make font bytes optional * Remove keyword support from core.getfont Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Refs #9898 - had to figure out what's happening in
_imagingftto get to the bottom of the kerning woes, and these came out of that. The actual bugfixes will be in another PR stacked on this.Basically:
FT_F26Dot6type (an alias tolong, since C doesn't have real newtypes, more's the shame) to make it more obvious to the reader.* 64s or<< 6s. Not truly type-safe since, well, see above about newtypes, but better than throwing magic numbers around.getfont()'s signature to make all arguments required (C interface is internal #9879 in mind, that should be fine to do), since callinggetfont()without encoding could handily segfault (sinceencodingin C was left uninitialized, set to stack garbage)._imagingft.pyi's types to match the reality of the module.