-
-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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` | ||
|
||
The ``pygame.freetype`` module is a replacement for :mod:`pygame.font`. | ||
It has all of the functionality of the original, plus many new features. | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Below here, there should be some changes too because |
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This header file gets regenerated when you run |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,2 @@ | ||
/* Auto generated file: with make_docs.py . Docs go in docs/reST/ref/ . */ | ||
#define DOC_FREETYPE "Enhanced pygame module for loading and rendering computer fonts" | ||
#define DOC_FREETYPE_GETERROR "get_error() -> str\nget_error() -> None\nReturn the latest FreeType error" | ||
#define DOC_FREETYPE_GETVERSION "get_version(linked=True) -> (int, int, int)\nReturn the FreeType version" | ||
#define DOC_FREETYPE_INIT "init(cache_size=64, resolution=72) -> None\nInitialize the underlying FreeType library." | ||
#define DOC_FREETYPE_QUIT "quit() -> None\nShut down the underlying FreeType library." | ||
#define DOC_FREETYPE_GETINIT "get_init() -> bool\nReturns True if the FreeType module is currently initialized." | ||
#define DOC_FREETYPE_WASINIT "was_init() -> bool\nDEPRECATED: Use get_init() instead." | ||
#define DOC_FREETYPE_GETCACHESIZE "get_cache_size() -> long\nReturn the glyph case size" | ||
#define DOC_FREETYPE_GETDEFAULTRESOLUTION "get_default_resolution() -> long\nReturn the default pixel size in dots per inch" | ||
#define DOC_FREETYPE_SETDEFAULTRESOLUTION "set_default_resolution(resolution, /)\nSet the default pixel size in dots per inch for the module" | ||
#define DOC_FREETYPE_SYSFONT "SysFont(name, size, bold=False, italic=False) -> Font\ncreate a Font object from the system fonts" | ||
#define DOC_FREETYPE_GETDEFAULTFONT "get_default_font() -> string\nGet the filename of the default font" | ||
#define DOC_FREETYPE_FONT "Font(file, size=0, font_index=0, resolution=0, ucs4=False) -> Font\nFont(pathlib.Path) -> Font\nCreate a new Font instance from a supported font file." | ||
#define DOC_FREETYPE_FONT_NAME "name -> string\nProper font name." | ||
#define DOC_FREETYPE_FONT_STYLENAME "style_name -> str\nGets the font's style_name." | ||
#define DOC_FREETYPE_FONT_PATH "path -> unicode\nFont file path" | ||
#define DOC_FREETYPE_FONT_SIZE "size -> float\nsize -> (float, float)\nThe default point size used in rendering" | ||
#define DOC_FREETYPE_FONT_GETRECT "get_rect(text, style=STYLE_DEFAULT, rotation=0, size=0) -> rect\nReturn the size and offset of rendered text" | ||
#define DOC_FREETYPE_FONT_GETMETRICS "get_metrics(text, size=0) -> [(...), ...]\nReturn the glyph metrics for the given text" | ||
#define DOC_FREETYPE_FONT_HEIGHT "height -> int\nThe unscaled height of the font in font units" | ||
#define DOC_FREETYPE_FONT_ASCENDER "ascender -> int\nThe unscaled ascent of the font in font units" | ||
#define DOC_FREETYPE_FONT_DESCENDER "descender -> int\nThe unscaled descent of the font in font units" | ||
#define DOC_FREETYPE_FONT_GETSIZEDASCENDER "get_sized_ascender(size=0, /) -> int\nThe scaled ascent of the font in pixels" | ||
#define DOC_FREETYPE_FONT_GETSIZEDDESCENDER "get_sized_descender(size=0, /) -> int\nThe scaled descent of the font in pixels" | ||
#define DOC_FREETYPE_FONT_GETSIZEDHEIGHT "get_sized_height(size=0, /) -> int\nThe scaled height of the font in pixels" | ||
#define DOC_FREETYPE_FONT_GETSIZEDGLYPHHEIGHT "get_sized_glyph_height(size=0, /) -> int\nThe scaled bounding box height of the font in pixels" | ||
#define DOC_FREETYPE_FONT_GETSIZES "get_sizes() -> [(int, int, int, float, float), ...]\nget_sizes() -> []\nreturn the available sizes of embedded bitmaps" | ||
#define DOC_FREETYPE_FONT_RENDER "render(text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> (Surface, Rect)\nReturn rendered text as a surface" | ||
#define DOC_FREETYPE_FONT_RENDERTO "render_to(surf, dest, text, fgcolor=None, bgcolor=None, style=STYLE_DEFAULT, rotation=0, size=0) -> Rect\nRender text onto an existing surface" | ||
#define DOC_FREETYPE_FONT_RENDERRAW "render_raw(text, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> (bytes, (int, int))\nReturn rendered text as a string of bytes" | ||
#define DOC_FREETYPE_FONT_RENDERRAWTO "render_raw_to(array, text, dest=None, style=STYLE_DEFAULT, rotation=0, size=0, invert=False) -> Rect\nRender text into an array of ints" | ||
#define DOC_FREETYPE_FONT_STYLE "style -> int\nThe font's style flags" | ||
#define DOC_FREETYPE_FONT_UNDERLINE "underline -> bool\nThe state of the font's underline style flag" | ||
#define DOC_FREETYPE_FONT_STRONG "strong -> bool\nThe state of the font's strong style flag" | ||
#define DOC_FREETYPE_FONT_OBLIQUE "oblique -> bool\nThe state of the font's oblique style flag" | ||
#define DOC_FREETYPE_FONT_WIDE "wide -> bool\nThe state of the font's wide style flag" | ||
#define DOC_FREETYPE_FONT_STRENGTH "strength -> float\nThe strength associated with the strong or wide font styles" | ||
#define DOC_FREETYPE_FONT_UNDERLINEADJUSTMENT "underline_adjustment -> float\nAdjustment factor for the underline position" | ||
#define DOC_FREETYPE_FONT_FIXEDWIDTH "fixed_width -> bool\nGets whether the font is fixed-width" | ||
#define DOC_FREETYPE_FONT_FIXEDSIZES "fixed_sizes -> int\nthe number of available bitmap sizes for the font" | ||
#define DOC_FREETYPE_FONT_SCALABLE "scalable -> bool\nGets whether the font is scalable" | ||
#define DOC_FREETYPE_FONT_USEBITMAPSTRIKES "use_bitmap_strikes -> bool\nallow the use of embedded bitmaps in an outline font file" | ||
#define DOC_FREETYPE_FONT_ANTIALIASED "antialiased -> bool\nFont anti-aliasing mode" | ||
#define DOC_FREETYPE_FONT_KERNING "kerning -> bool\nCharacter kerning mode" | ||
#define DOC_FREETYPE_FONT_VERTICAL "vertical -> bool\nFont vertical mode" | ||
#define DOC_FREETYPE_FONT_ROTATION "rotation -> int\ntext rotation in degrees counterclockwise" | ||
#define DOC_FREETYPE_FONT_FGCOLOR "fgcolor -> Color\ndefault foreground color" | ||
#define DOC_FREETYPE_FONT_BGCOLOR "bgcolor -> Color\ndefault background color" | ||
#define DOC_FREETYPE_FONT_ORIGIN "origin -> bool\nFont render to text origin mode" | ||
#define DOC_FREETYPE_FONT_PAD "pad -> bool\npadded boundary mode" | ||
#define DOC_FREETYPE_FONT_UCS4 "ucs4 -> bool\nEnable UCS-4 mode" | ||
#define DOC_FREETYPE_FONT_RESOLUTION "resolution -> int\nPixel resolution in dots per inch" | ||
#define DOC_ "get_error() -> str\nget_error() -> None\nReturn the latest FreeType error" |
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