FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tkinter documentation: font data type error and two minor suggestions · Issue #99089 · python/cpython · GitHub

Repository navigation

tkinter documentation: font data type error and two minor suggestions #99089

Closed

Description

Packer Options

Anchor:

Very minor gripe that this does not include the legal values while the other parameters do.
I recommend appending the following sentence for clarity:

Legal values are points of the compass: "n", "ne", "e", "se", "s", "sw", "w", "nw", and also "center".

Tk Option Data Types

Font:

Tk uses a list font name format, such as {courier 10 bold}.

The example provided does not function, as it is using improper syntax (Note the curly brackets). The section should be corrected to reflect expected usage. This is the definition provided in typeshed/stdlib/tkinter/font.pyi : L15:

_FontDescription: TypeAlias = (
    str  # "Helvetica 12"
    | Font  # A font object constructed in Python
    | list[Any]  # ("Helvetica", 12, BOLD)
    | tuple[Any, ...]
    | _tkinter.Tcl_Obj  # A font object constructed in Tcl
)

Cursor:

You can also specify a bitmap and mask file of your own. See page 179 of Ousterhout’s book.

I recommend prepending the following sentence, as it is far more practical (in most situations) than the bitmap & mask method referenced.

To specify a cursor file (.cur or .ani), use the path to the file, preceded with an @, as in cursor="@path/to/cursor.cur"..

Activity

  1. serhiy-storchaka commented on Jun 27, 2026

    Member

    Thanks. The anchor and font items were already addressed by the documentation overhaul (gh-86726): the anchor entry now lists "n"…"nw" and "center", and font no longer presents {courier 10 bold} as Python — it shows the tuple/string forms. PR #152380 adds the remaining piece, the Windows @C:/cursors/bart.ani cursor-file form.

  2. added a commit that references this issue on Jun 27, 2026
  3. added 3 commits that reference this issue on Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL