-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Added keyword arguments to Font.render
#2000
Added keyword arguments to Font.render
#2000
Conversation
Oddly enough, despite the docs saying Also the C implementation didn't receive the |
That’s not what ftfont is. |
Ah apologies, will rectify that mistake |
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 👍
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.
Thinking about the parameter names I find color
and background
more understandable than fgcolor
and bgcolor
. Reading this I would wonder what fgcolor
is.
Maybe textcolor
and backgroundcolor
would be nicer (but longer) and would need a change in Font and in Freetype.
We can't change freetype since it already has those as kwargs. What about |
|
@PurityLake This looks to be nearly done, just needs a bit of sprucing up. It seems we've come to a consensus on the kwarg names being The versionchanged needs to be updated to 2.3.0, since that's the next version now. After those changes I think this is good to go. |
* Added kwargs to font.render * Added docs and tests for kwargs for font.render * Fix incompatible pointer * Added wraplength to font.render * Attempt to fix failing test * Remove changes to ftfont.py * Change a test to only run for FontTest class * Fix formatting issue * Adjusted keyword arg names for font.render and updated docs * Fix documentation error * Changed arguments fgcolor and bgcolor in ftfont * Adjusted tests to include freetype font * Adjusted formatting * Fixed failing test in font_test * Fixing font_test again * Fixing font_test yet again * Fix formatting * Renamed fgcolor to color * Fixed remaining mentions of background
Refers to #1990
Added keyword argument options for the arguments in
Font.render