From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/python~3.12/library%2Ftkinter.font.html | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 devdocs/python~3.12/library%2Ftkinter.font.html (limited to 'devdocs/python~3.12/library%2Ftkinter.font.html') diff --git a/devdocs/python~3.12/library%2Ftkinter.font.html b/devdocs/python~3.12/library%2Ftkinter.font.html new file mode 100644 index 00000000..6b0f35ac --- /dev/null +++ b/devdocs/python~3.12/library%2Ftkinter.font.html @@ -0,0 +1,50 @@ +

tkinter.font — Tkinter font wrapper

Source code: Lib/tkinter/font.py

The tkinter.font module provides the Font class for creating and using named fonts.

The different font weights and slants are:

+tkinter.font.NORMAL
+tkinter.font.BOLD
+tkinter.font.ITALIC
+tkinter.font.ROMAN
+
+class tkinter.font.Font(root=None, font=None, name=None, exists=False, **options)
+

The Font class represents a named font. Font instances are given unique names and can be specified by their family, size, and style configuration. Named fonts are Tk’s method of creating and identifying fonts as a single object, rather than specifying a font by its attributes with each occurrence.

arguments:

additional keyword options (ignored if font is specified):

+actual(option=None, displayof=None)
+

Return the attributes of the font.

+
+cget(option)
+

Retrieve an attribute of the font.

+
+config(**options)
+

Modify attributes of the font.

+
+copy()
+

Return new instance of the current font.

+
+measure(text, displayof=None)
+

Return amount of space the text would occupy on the specified display when formatted in the current font. If no display is specified then the main application window is assumed.

+
+metrics(*options, **kw)
+

Return font-specific data. Options include:

+ascent - distance between baseline and highest point that a
+
+

character of the font can occupy

+descent - distance between baseline and lowest point that a
+
+

character of the font can occupy

+linespace - minimum vertical separation necessary between any two
+
+

characters of the font that ensures no vertical overlap between lines.

fixed - 1 if font is fixed-width else 0

+
+
+tkinter.font.families(root=None, displayof=None)
+

Return the different font families.

+
+tkinter.font.names(root=None)
+

Return the names of defined fonts.

+
+tkinter.font.nametofont(name, root=None)
+

Return a Font representation of a tk named font.

Changed in version 3.10: The root parameter was added.

+
+

+ © 2001–2023 Python Software Foundation
Licensed under the PSF License.
+ https://docs.python.org/3.12/library/tkinter.font.html +

+
-- cgit v1.2.3