-
-
Notifications
You must be signed in to change notification settings - Fork 192
Updated outdated docs for pygame.freetype module and added note at top #3472
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
base: main
Are you sure you want to change the base?
Updated outdated docs for pygame.freetype module and added note at top #3472
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.
Hi, thank you for contributing :) I have some small requests
- freetype isn't older than pygame.font, it was an attempt to replace it but eventually failed. you can just say that it's an outdated alternative to pygame.font (plus the other things you said)
- the note needs to be on the same indentation level as the module, with the proper spaces. run docs --full again after your change.
- the grammar in the note should be improved
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.
Good start! But I see a few places for improvement.
Thanks for the contribution 🎉
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.
This file should not be modified by hand, as the header says it's autogenerated. It's actually an important file and pygame-ce will not compile without it (it's the built-in docs for the pygame.freetype
module)
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.
This header file gets regenerated when you run python dev.py docs --full
@@ -5,12 +5,15 @@ | |||
|
|||
.. module:: pygame.freetype | |||
:synopsis: Enhanced pygame module for loading and rendering computer fonts | |||
.. note:: The ``pygame.freetype`` module is no longer being maintained, | |||
and instead use of :mod:`pygame.font` is strongly recommended. | |||
|
|||
|
|||
| :sl:`Enhanced pygame module for loading and rendering computer fonts` |
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.
This slug line should be updated too
Yet is has absolutely no dependencies on the SDL_ttf library. | ||
The ``pygame.freetype`` module is an old pygame module for font functionality | ||
and has since been replaced by the newer :mod:`pygame.font` module. | ||
It has absolutely no dependencies on the SDL_ttf library. | ||
It is implemented directly on the FreeType 2 library. | ||
The ``pygame.freetype`` module is not itself backward compatible with | ||
:mod:`pygame.font`. |
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.
Below here, there should be some changes too because ftfont
is a pygame.font
-like API that wraps pygame.freetype
, and it's still written in a way that intends to replace font
To the docs for the pygame.freetype module, I added a note at the top warning and suggesting users to use the better maintained pygame.font module. I also removed any false statements from the longer description of the pygame.freetype module.