Skip to content

Commit 0e178b4

Browse files
authored
Merge pull request #3628 from Starbuck5/clarify-freetype-status
Clarify the status of the freetype module
2 parents 75c15d9 + abf9047 commit 0e178b4

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

docs/reST/ref/freetype.rst

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
======================
55

66
.. module:: pygame.freetype
7-
:synopsis: Enhanced pygame module for loading and rendering computer fonts
8-
9-
| :sl:`Enhanced pygame module for loading and rendering computer fonts`
10-
11-
The ``pygame.freetype`` module is a replacement for :mod:`pygame.font`.
12-
It has all of the functionality of the original, plus many new features.
13-
Yet is has absolutely no dependencies on the SDL_ttf library.
14-
It is implemented directly on the FreeType 2 library.
15-
The ``pygame.freetype`` module is not itself backward compatible with
16-
:mod:`pygame.font`.
17-
Instead, use the ``pygame.ftfont`` module as a drop-in replacement
18-
for :mod:`pygame.font`.
7+
:synopsis: pygame module for loading and rendering computer fonts
8+
9+
| :sl:`pygame module for loading and rendering computer fonts`
10+
11+
The ``pygame.freetype`` module is an alternative to :mod:`pygame.font`.
12+
It is implemented directly on the FreeType 2 library, and is not
13+
backward compatible with :mod:`pygame.font`. :mod:`pygame.font`
14+
relies on the SDL_ttf library, and due to the SDL_ttf team's efforts,
15+
``pygame.font`` is now the better supported of our font modules.
16+
In new code, the use of :mod:`pygame.font` is encouraged.
17+
``pygame.font``, unlike ``pygame.freetype``, has support for multiline text,
18+
text shaping for global writing systems, and rendering emoji with color.
19+
20+
The ``pygame.ftfont`` module exists as a limited version of
21+
the :mod:`pygame.font` API, running on top of ``pygame.freetype``.
22+
Many of the recently added font features do not work on it.
1923

2024
All font file formats supported by FreeType can be rendered by
2125
``pygame.freetype``, namely ``TTF``, Type1, ``CFF``, OpenType,

src_c/doc/freetype_doc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Auto generated file: with make_docs.py . Docs go in docs/reST/ref/ . */
2-
#define DOC_FREETYPE "Enhanced pygame module for loading and rendering computer fonts"
2+
#define DOC_FREETYPE "pygame module for loading and rendering computer fonts"
33
#define DOC_FREETYPE_GETERROR "get_error() -> str\nget_error() -> None\nReturn the latest FreeType error"
44
#define DOC_FREETYPE_GETVERSION "get_version(linked=True) -> (int, int, int)\nReturn the FreeType version"
55
#define DOC_FREETYPE_INIT "init(cache_size=64, resolution=72) -> None\nInitialize the underlying FreeType library."

0 commit comments

Comments
 (0)