filmov
tv
Python GUI Tutorial - 30 - Fonts | Tkinter
Показать описание
In this video, you're going to learn how we can use font in our tkinter program to show our text in different style.
The Font class in Tkinter provides us various options to decorate our text.
Example in video -
from tkinter import *
root = Tk()
my_font = Font(family="Times New Roman", size=16, weight="bold", slant="italic", underline=1, overstrike=1)
label = Label(root, text= "Tech-Gram Academy", font=my_font).pack()
---------------------------------------------------------------------
So there are 6 options there to decorate the text
1. family = Which font family we're going to use.
2. size = take a number as size
3. weight = set it to "bold" to make text bold
4. slant = set it to "italic" to make text italic
5. underline = Used to draw underline.
6. overstrike = to make text strike.
available fonts families -
Noto Sans Mono CJK TC
Lohit Kannada
Samyak Devanagari
Century Schoolbook L
OpenSymbol
Khmer OS System
Nakula
Chandas
Keraleeyam
Noto Sans Mono CJK TC
Mukti Narrow
Meera
Kalimati
KacstQurn
Gubbi
Noto Sans Mono CJK SC
Tibetan Machine Uni
Umpush
DejaVu Sans Mono
Purisa
Pothana2000
Noto Serif CJK JP
KacstBook
KacstLetter
Noto Serif CJK KR
Noto Sans CJK SC
Norasi
Loma
Karumbi
KacstDigital
KacstTitleL
mry_KacstQurn
URW Palladio L
Noto Serif CJK SC
Noto Serif CJK TC
Likhan
Padauk Book
Phetsarath OT
Sawasdee
Sahadeva
Noto Sans CJK TC
Tlwg Typist
Tlwg Typewriter
Samyak Tamil
Noto Sans CJK KR
URW Gothic L
Dingbats
URW Chancery L
Ubuntu
Noto Sans CJK JP
Noto Sans CJK SC
Chilanka
FreeSerif
Lohit Assamese
Padauk
AnjaliOldLipi
Ubuntu Condensed
Samyak Gujarati
ori1Uni
KacstOffice
DejaVu Sans
Kinnari
KacstArt
Lohit Odia
Tlwg Mono
aakar
Bitstream Charter
KacstOne
Mitra Mono
Kalapi
Khmer OS
Courier 10 Pitch
Laksaman
Liberation Sans Narrow
Liberation Mono
Nimbus Sans L
padmaa-Bold.1.1
Manjari
Noto Sans CJK TC
Ani
Rachana
Pagul
Lohit Telugu
Lohit Tamil Classical
Samanata
Droid Sans Fallback
Vemana2000
San Francisco Display
Standard Symbols L
Lohit Gujarati
KacstPen
SFNS Display
RaghuMalayalam
KacstDecorative
Nimbus Mono L
Liberation Serif
Manjari
Lohit Malayalam
LKLUG
Noto Sans Mono CJK SC
Nimbus Roman No9 L
Ubuntu
KacstPoster
Liberation Sans
Manjari
Mukti Narrow
FreeSans
Noto Sans Mono CJK JP
Sarai
Lohit Devanagari
Noto Color Emoji
Uroob
Noto Mono
KacstNaskh
Dyuthi
Lohit Tamil
Tlwg Typo
Noto Sans CJK JP
KacstFarsi
Suruma
Lohit Bengali
Abyssinica SIL
Jamrul
Noto Sans Mono CJK KR
Waree
KacstTitle
padmaa
DejaVu Serif
Saab
Noto Sans CJK KR
Navilu
Gargi
Noto Sans Mono CJK KR
Garuda
Samyak Malayalam
Rekha
KacstScreen
Lohit Gurmukhi
FreeMono
Ubuntu Mono
URW Bookman L
Noto Sans Mono CJK JP
i am sure your queries like-
- How we can change the size of text in tkinter?
- change size of the text in tkinter?
- how to make text bold in tkinter?
- how to make text italic in tkinter?
- how to make text underlined in tkinter?
- how to make striked next in tkinter?
have been solved.
if you have any problem related with this video then please comment below. we'll reply as soon as possible -
contact us on-
The Font class in Tkinter provides us various options to decorate our text.
Example in video -
from tkinter import *
root = Tk()
my_font = Font(family="Times New Roman", size=16, weight="bold", slant="italic", underline=1, overstrike=1)
label = Label(root, text= "Tech-Gram Academy", font=my_font).pack()
---------------------------------------------------------------------
So there are 6 options there to decorate the text
1. family = Which font family we're going to use.
2. size = take a number as size
3. weight = set it to "bold" to make text bold
4. slant = set it to "italic" to make text italic
5. underline = Used to draw underline.
6. overstrike = to make text strike.
available fonts families -
Noto Sans Mono CJK TC
Lohit Kannada
Samyak Devanagari
Century Schoolbook L
OpenSymbol
Khmer OS System
Nakula
Chandas
Keraleeyam
Noto Sans Mono CJK TC
Mukti Narrow
Meera
Kalimati
KacstQurn
Gubbi
Noto Sans Mono CJK SC
Tibetan Machine Uni
Umpush
DejaVu Sans Mono
Purisa
Pothana2000
Noto Serif CJK JP
KacstBook
KacstLetter
Noto Serif CJK KR
Noto Sans CJK SC
Norasi
Loma
Karumbi
KacstDigital
KacstTitleL
mry_KacstQurn
URW Palladio L
Noto Serif CJK SC
Noto Serif CJK TC
Likhan
Padauk Book
Phetsarath OT
Sawasdee
Sahadeva
Noto Sans CJK TC
Tlwg Typist
Tlwg Typewriter
Samyak Tamil
Noto Sans CJK KR
URW Gothic L
Dingbats
URW Chancery L
Ubuntu
Noto Sans CJK JP
Noto Sans CJK SC
Chilanka
FreeSerif
Lohit Assamese
Padauk
AnjaliOldLipi
Ubuntu Condensed
Samyak Gujarati
ori1Uni
KacstOffice
DejaVu Sans
Kinnari
KacstArt
Lohit Odia
Tlwg Mono
aakar
Bitstream Charter
KacstOne
Mitra Mono
Kalapi
Khmer OS
Courier 10 Pitch
Laksaman
Liberation Sans Narrow
Liberation Mono
Nimbus Sans L
padmaa-Bold.1.1
Manjari
Noto Sans CJK TC
Ani
Rachana
Pagul
Lohit Telugu
Lohit Tamil Classical
Samanata
Droid Sans Fallback
Vemana2000
San Francisco Display
Standard Symbols L
Lohit Gujarati
KacstPen
SFNS Display
RaghuMalayalam
KacstDecorative
Nimbus Mono L
Liberation Serif
Manjari
Lohit Malayalam
LKLUG
Noto Sans Mono CJK SC
Nimbus Roman No9 L
Ubuntu
KacstPoster
Liberation Sans
Manjari
Mukti Narrow
FreeSans
Noto Sans Mono CJK JP
Sarai
Lohit Devanagari
Noto Color Emoji
Uroob
Noto Mono
KacstNaskh
Dyuthi
Lohit Tamil
Tlwg Typo
Noto Sans CJK JP
KacstFarsi
Suruma
Lohit Bengali
Abyssinica SIL
Jamrul
Noto Sans Mono CJK KR
Waree
KacstTitle
padmaa
DejaVu Serif
Saab
Noto Sans CJK KR
Navilu
Gargi
Noto Sans Mono CJK KR
Garuda
Samyak Malayalam
Rekha
KacstScreen
Lohit Gurmukhi
FreeMono
Ubuntu Mono
URW Bookman L
Noto Sans Mono CJK JP
i am sure your queries like-
- How we can change the size of text in tkinter?
- change size of the text in tkinter?
- how to make text bold in tkinter?
- how to make text italic in tkinter?
- how to make text underlined in tkinter?
- how to make striked next in tkinter?
have been solved.
if you have any problem related with this video then please comment below. we'll reply as soon as possible -
contact us on-
Комментарии