TkFontAwesome
Requires Python 3.8+
A library that enables you to use FontAwesome icons in your tkinter application.
You may use any of the 2k+ free FontAwesome 6.5 icons.
The fill color and size are customized to your specifications and then converted
to an object via tksvg that can be used anywhere you would use a tkinter.PhotoImage object.
Installation
python -m pip install tkfontawesome
Usage
import tkinter as tk
from tkfontawesome import icon_to_image
root = tk.Tk()
fb = icon_to_image("facebook", fill="#4267B2", scale_to_width=64)
send = icon_to_image("paper-plane", fill="#1D9F75", scale_to_width=64)
tk.Label(root, image=fb).pack(padx=10, pady=10)
tk.Button(root, image=send).pack(padx=10, pady=10)
root.mainloop()
API: icon_to_image()
(
name=None,
fill=None,
scale_to_width=None,
scale_to_height=None,
scale=1
)
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| name | str | The name of the FontAwesome icon. | None |
| fill | str | The fill color of the svg path. | None |
| scale_to_width | int | Adjust image width to this size (in pixels); maintains aspect ratio. | None |
| scale_to_height | int | Adjust image height to this size (in pixels); maintains aspect ratio. | None |
| scale | float | Scale the image width and height by this factor. | 1 |
License
The CC BY 4.0 license applies to all FontAwesome free icons used in the library. The MIT License applies to all other work.
Author: Israel Dryer 📦 Available on PyPI | 🐙 GitHub
Metadata
Release files for tkfontawesome 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkfontawesome-0.3.2.tar.gz | 480.4 kB | Without provenance | Details for tkfontawesome-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tkfontawesome-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for tkfontawesome-0.3.2-py3-none-any.whl |
Total release size: 961.2 kB
Release files / tkfontawesome-0.3.2.tar.gz
| Download URL | tkfontawesome-0.3.2.tar.gz |
|---|---|
| Size | 480.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8286d8be06d537e18bc670a0211b13af222ac564d6e0211608dfff97653eefde
|
|
BLAKE2b-256 checksum How to use checksums |
059d13464ad97c6440234da802db4f681386341d8f78f4823c459dcb15c8bfb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / tkfontawesome-0.3.2-py3-none-any.whl
| Download URL | tkfontawesome-0.3.2-py3-none-any.whl |
|---|---|
| Size | 480.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12b56d86206c5fc719012f5770f40d408da7acd59f6ea08bc07ce5cd921fab2a
|
|
BLAKE2b-256 checksum How to use checksums |
a460cb35ababbb3fd09eb0e7b9008e9a787cc77c553a2811280cd5d0068f6601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for tkfontawesome 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.