Use any of the 1k+ free FontAwesome icons in your tkinter application.

Overview

TkFontAwesome

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

You may use any of the 1k+ free FontAwesome 5.0 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

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

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.

You might also like...
System Tray Icon for PySimpleGUI (the tkinter version). Adds a system tray icon by using pystray and PIL
System Tray Icon for PySimpleGUI (the tkinter version). Adds a system tray icon by using pystray and PIL

psgtray Add a System Tray Icon to your tkinter port of PySimpleGUI. Installation via pip Installation is via pip: python -m pip install psgtray or if

Basic calculator using Tkinter GUI
Basic calculator using Tkinter GUI

Basic calculator using Tkinter GUI

Tukaan is the new framework that aims to replace Tkinter

Tukaan is the new, pythonic and colorful (like a keel-billed toucan) framework that aims to replace Tkinter. It has everything (on my computer, not at GitHub) that you need to develop cross-platform GUIs.

Json IDE made with Python tkinter!
Json IDE made with Python tkinter!

JIDE Json IDE made with Python tkinter! Download: https://github.com/LouisTheXIV/JIDE/releases/tag/v0.1 Features In JIDE everything is customisable do

A Python Tkinter based Inventory managment System
A Python Tkinter based Inventory managment System

Inventory Management System Using Python Tkinter Introduction Inventory managemrnt system is an open source platform for manage business. It has a com

An offline python frontend for the QuadVisions Colab Notebook using tkinter.
An offline python frontend for the QuadVisions Colab Notebook using tkinter.

Visions GUI An offline python frontend for the QuadVisions Colab Notebook using tkinter. It offers basic options and interactively displays the genera

A simple project used Tkinter module to make a seperate window
A simple project used Tkinter module to make a seperate window

Project Title This is a program to run a databse where you can store the general information of poeple. This is a very simple project and i have used

Advanced Zola Cabs integrated with tkinter Graphical User Interface (GUI) made for ZOHO Corp .

ZolaCabs Advanced Zola Cabs integrated with tkinter Graphical User Interface (GUI) made for ZOHO Corp. Logs username : zoho password : zoho [ Deve

Signin/Signup GUI form using tkinter in python
Signin/Signup GUI form using tkinter in python

SignIn-SignUpFormRepo Hello there, I am Shahid and this is the Signin/Signup GUI form using tkinter in python if you want to use avatar images then pa

Comments
  • No such file or directory: 'pacman'

    No such file or directory: 'pacman'

    On mac os i tried to install this package using command pip install fontawesome but it give me error.

    Collecting tkfontawesome Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB) Collecting tksvg==0.7.4 Using cached tksvg-0.7.4.tar.gz (50 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

    × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [12 lines of output] Installing dependency cmake... Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/private/var/folders/p2/_8dlzbbd3kq5wr0rmwd2xh600000gn/T/pip-install-qez1bb0p/tksvg_a96fbe2637684b8398caee99455febb7/setup.py", line 62, in sp.call(["pacman", "--needed", "--noconfirm", "-S", "mingw-w64-x86_64-{}".format(dep)]) # , stdout=sp.PIPE) File "/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 349, in call with Popen(*popenargs, **kwargs) as p: File "/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/Cellar/[email protected]/3.9.12_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'pacman' [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

    × Encountered error while generating package metadata. ╰─> See above for output.

    opened by sakshemglaze 4
  • Consolidate svg files into single py dictionary

    Consolidate svg files into single py dictionary

    This will simplify the package and will make distribution easier because users won't have to worry about packaging resources with pyinstaller or py2exe, etc...

    enhancement 
    opened by israel-dryer 0
Releases(v0.2.0)
  • v0.2.0(Dec 23, 2021)

    What's Changed

    • consolidate svg files into svgs.py; refactor file lookup to dict lookups by @israel-dryer in https://github.com/israel-dryer/TkFontAwesome/pull/3

    Full Changelog: https://github.com/israel-dryer/TkFontAwesome/compare/v0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
Owner
Israel Dryer
Israel Dryer
System Tray Icon for PySimpleGUI (the tkinter version). Adds a system tray icon by using pystray and PIL

psgtray Add a System Tray Icon to your tkinter port of PySimpleGUI. Installation via pip Installation is via pip: python -m pip install psgtray or if

PySimpleGUI 38 Dec 30, 2022
Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Will McGugan 17.1k Jan 08, 2023
This simple python program can be used to make FontChooser dialog in Tkinter Applications.

tkFontBox This simple python program can be used to make FontChooser dialog in Tkinter Applications. how to use? Copy the tkFontBox.py file into your

Pawan Kumar Prachi 1 Feb 08, 2022
Criando interfaces gráficas com Python e Qt 6 (PyQt6)

Criando interfaces gráficas com Python e Qt 6 (PyQt6) Qt O Qt é um framework para criação de interfaces gráficas multiplataforma, atualmente ele é des

Renato Cruz 1 Jun 07, 2022
A library for building modern declarative desktop applications in WX.

re-wx is a library for building modern declarative desktop applications. It's built as a management layer on top of WXPython, which means you get all the goodness of a mature, native, cross-platform

Chris 115 Dec 24, 2022
Useful PDF-related productivity tool.

Luftmensch 1.4.7 (Español) | 1.4.3 (English) Version 1.4.7 (Español) released in October 2021. Version 1.4.3 (English) released in September 2021. 🏮

8 Dec 29, 2022
pyglet is a cross-platform windowing and multimedia library for Python, for developing games and other visually rich applications.

pyglet pyglet is a cross-platform windowing and multimedia library for Python, intended for developing games and other visually rich applications. It

1.3k Jan 01, 2023
A GUI for designing Python GUI's for PySimpleGUI.

SimpleGUIBuilder A GUI for designing Python GUI's for PySimpleGUI. Installation There is none :) just download the file from a release and run it. Don

Miguel Martins 65 Dec 22, 2022
Pyabr lightweight OS with Python and Qt

Pyabr cloud computing software In the name of God, the Compassionate, the Merciful Pyabr © 2021 Mani Jamali. Free Software GNU General Public License

PyFarsi Software Foundation 88 Dec 26, 2022
A keyboard-driven, vim-like browser based on PyQt5.

qutebrowser is a keyboard-focused browser with a minimal GUI. It’s based on Python and PyQt5 and free software, licensed under the GPL.

qutebrowser 8.4k Jan 01, 2023
Use NixOS Without Coding

(Work in Progress) Nix-Gui Make NixOS usable for non-technical users through a settings / package management GUI. Motives The declarative nature of Ni

548 Dec 30, 2022
PyQt5 Sample GUI Program - Python PyQt5 Sample GUI application

Python PyQt5 Sample GUI application Program work like this Designed GUI using De

Dimuth De Zoysa 5 Mar 27, 2022
Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS

Kivy Innovative user interfaces made easy. Kivy is an open source, cross-platform Python framework for the development of applications that make use o

Kivy 15.4k Jan 07, 2023
LCD GUI for P4wnP1 ALOA

GUI for P4wnP1 Colorful UI interface for P4wnP1 ALOA Don't pwn just as a USB client. Use also the USB host capabilities! UPS Lite support Scalability

John 7 Dec 13, 2022
PyQT5 app for LOLBAS and GTFOBins

LOLBins PyQT app to list all Living Off The Land Binaries and Scripts for Windows from LOLBAS and Unix binaries that can be used to bypass local secur

Hamza Megahed 41 Dec 01, 2022
Python Screen Recorder using Python

PY-Screen-Recorder Python Screen Recorder using Python Requirement: pip install cv2 pip install pyautogui pip install numpy How to reach me? You can r

SonLyte 8 Nov 08, 2021
Management Gui for OpenVR FSR PlugIn

OpenVR FSR App Small GUI to install/uninstall, tweak settings of the Modified OpenVR DLL with AMD FidelityFX SuperResolution Upscaler with a single cl

Stefan Tapper 234 Dec 20, 2022
python+PySimpleGUI+pyserial+threading

GUI_pyserial python+PySimpleGUI+pyserial+threading 功能 1.利用PySimpleGUI制作图形用户界面 2.利用threading实现多线程调用pyserial处理串口通信 模块版本 PySimpleGUI 4.46.0 pyserial 3.5

2 Dec 27, 2022
Python script with tkinter that allows you to open a local chat room

Server_chat Python script with tkinter that allows you to open a local chat room To begn you'll have to start the server side script and run it. You w

2 Feb 11, 2022