Skip to main content

TkFontAwesome

A library that enables you to use FontAwesome icons in your tkinter application.

Fork differences

  1. This fork removes sci-kit as a build environment as it seemed to be polluting the installation with lots of unnecesarry libraries.

  2. This version uses the hatch build system. hatch build .

  3. 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.

example-2

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()

example-1

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.

Metadata

Release files for tkfontawesome-mizraith 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkfontawesome-mizraith 0.3
File Size Uploaded
tkfontawesome_mizraith-0.3.tar.gz 517.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tkfontawesome-mizraith 0.3
File Interpreter ABI Platform
tkfontawesome_mizraith-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 996.2 kB

Release files / tkfontawesome_mizraith-0.3.tar.gz

Download URL tkfontawesome_mizraith-0.3.tar.gz
Size 517.2 kB
Tags Source
SHA-256 checksum
How to use checksums
423bb5502cd0ce4802810a4096a7ebc30858fd9c10105397c1cc116e09618604
BLAKE2b-256 checksum
How to use checksums
2dcd093d353fbb7dc82e7e700a889613b509612e2851c88e0df15e1e47c8f203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / tkfontawesome_mizraith-0.3-py3-none-any.whl

Download URL tkfontawesome_mizraith-0.3-py3-none-any.whl
Size 479.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c1bf038248c4fe16c434e1930cd312b60e279e3bd5d5daaf22e937d5c1cebe3
BLAKE2b-256 checksum
How to use checksums
4a531090e25024f722c99048b2adcf71c259ea41f3440d97277971b6f3b945eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page