Use any of the 2k+ free FontAwesome icons in your tkinter application without the scikit bloatware.
Project description
TkFontAwesome
A library that enables you to use FontAwesome icons in your tkinter application.
Fork differences
-
This fork removes sci-kit as a build environment as it seemed to be polluting the installation with lots of unnecesarry libraries.
-
This version uses the hatch build system. hatch build .
-
Loads into pypi as a package: tkfontawesome_mizraith
More info
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_mizraith
Usage
import tkinter as tk
from tkfontawesome_mizraith 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()
tkfontawesome.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tkfontawesome_mizraith-0.3.tar.gz.
File metadata
- Download URL: tkfontawesome_mizraith-0.3.tar.gz
- Upload date:
- Size: 517.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423bb5502cd0ce4802810a4096a7ebc30858fd9c10105397c1cc116e09618604
|
|
| MD5 |
b3289a181ba965ed9d78f6b6e46e39c3
|
|
| BLAKE2b-256 |
2dcd093d353fbb7dc82e7e700a889613b509612e2851c88e0df15e1e47c8f203
|
File details
Details for the file tkfontawesome_mizraith-0.3-py3-none-any.whl.
File metadata
- Download URL: tkfontawesome_mizraith-0.3-py3-none-any.whl
- Upload date:
- Size: 479.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c1bf038248c4fe16c434e1930cd312b60e279e3bd5d5daaf22e937d5c1cebe3
|
|
| MD5 |
5e7b15087195302a2639c12e79213a30
|
|
| BLAKE2b-256 |
4a531090e25024f722c99048b2adcf71c259ea41f3440d97277971b6f3b945eb
|