Skip to content

Rearrange C getfont() parameters - #10448

Merged
radarhere merged 2 commits into
python-pillow:mainfrom
radarhere:getfont
Nov 7, 2026
Merged

radarhere merged 2 commits into
python-pillow:mainfrom
radarhere:getfont

Conversation

@radarhere

@radarhere radarhere commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

See #9908 (comment) for the original discussion

Given our two calls to core.getfont,

Pillow/src/PIL/ImageFont.py

Lines 286 to 288 in e715196

self.font = core.getfont(
"", size, index, encoding, self.font_bytes, layout_engine
)

Pillow/src/PIL/ImageFont.py

Lines 302 to 304 in e715196

self.font = core.getfont(
font, size, index, encoding, layout_engine=layout_engine
)

it would seem simpler to move font_bytes to the end. This PR also makes it the only optional parameter.

@radarhere radarhere changed the title Update C getfont() parameters Rearrange C getfont() parameters Nov 7, 2026
@radarhere
radarhere enabled auto-merge (squash) November 7, 2026 07:34
@radarhere
radarhere merged commit 297d47a into python-pillow:main Nov 7, 2026
52 of 61 checks passed
@radarhere
radarhere deleted the getfont branch November 7, 2026 07:59
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.

1 participant