Skip to content
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

ImageFont/ImageDraw should support text stroking #2209

Closed
Irishsmurf opened this issue Nov 9, 2016 · 3 comments · Fixed by #3978
Closed

ImageFont/ImageDraw should support text stroking #2209

Irishsmurf opened this issue Nov 9, 2016 · 3 comments · Fixed by #3978

Comments

@Irishsmurf
Copy link

Irishsmurf commented Nov 9, 2016

Hey,

Something that I find myself doing quite often when drawing text to an image is to stroke the text with a high-contrast outline.
I find this helps improve readability over cluttered backgrounds.

Neither pillow.ImageDraw nor pillow.ImageFont currently includes a function while allows ImageDraw to draw stroked text with a specific color outline.

It'd be pretty cool if ImageDraw.text() would include two additional method parameters.

  • One to indicate the size of the outline in pixels
  • One to indicate the colour of the outline (similar to the current fill parameter)

For example:

draw.text((10, 10), "hello", font=font, outline=BLACK, outline_size=2)

@HinTak
Copy link
Contributor

HinTak commented May 8, 2017

https://github.com/rougier/freetype-py have a few examples doing that.

@Vastrix
Copy link

Vastrix commented Mar 24, 2018

I agree, ImageFont could use some love! :s

@radarhere radarhere changed the title FR: ImageFont/ImageDraw should support text stroking ImageFont/ImageDraw should support text stroking Mar 15, 2019
@aclark4life aclark4life added this to Backlog in Pillow May 11, 2019
@aclark4life aclark4life moved this from Backlog to Icebox in Pillow May 11, 2019
@radarhere
Copy link
Member

radarhere commented Jul 19, 2019

I've created PR #3978 to resolve this.

@radarhere radarhere moved this from Icebox to In progress in Pillow Jul 19, 2019
@radarhere radarhere moved this from In progress to Review/QA in Pillow Jul 19, 2019
Pillow automation moved this from Review/QA to Closed Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Pillow
  
Closed
Development

Successfully merging a pull request may close this issue.

4 participants