there are a number of widgets that supports displaying text. most of these provides the option of font attribute. the syntax for creating a font is shown below −
font create fontname options
options
the options available for the font create are listed below in the following table −
| sr.no. | syntax & description |
|---|---|
| 1 |
-family familyname the name of font family. |
| 2 |
-size number the size of font. |
| 3 |
-weight level the weight for font. |
a simple example for a font creation is shown below −
#!/usr/bin/wish font create myfont -family helvetica -size 18 -weight bold pack [label .mylabel -font myfont -text "hello world"]
when we run the above program, we will get the following output −
to get all the fonts available, we can use the following command −
#!/usr/bin/wish puts [font families]
when we run the above command, we will get the following output −
{abadi mt condensed extra bold} {abadi mt condensed light} {al bayan} {al nile}
{al tarikh} {american typewriter} {andale mono} arial {arial black}
{arial hebrew} {arial narrow} {arial rounded mt bold} {arial unicode ms}
athelas avenir {avenir next} {avenir next condensed} ayuthaya baghdad {bangla mn}
{bangla sangam mn} {baoli sc} baskerville {baskerville old face} batang {bauhaus 93}
beirut {bell mt} {bernard mt condensed} biaukai {big caslon} {book antiqua}
{bookman old style} {bookshelf symbol 7} braggadocio {britannic bold} {brush script mt}
calibri {calisto mt} cambria {cambria math} candara century {century gothic}
{century schoolbook} chalkboard {chalkboard se} chalkduster {charcoal cy} charter
cochin {colonna mt} {comic sans ms} consolas constantia {cooper black} copperplate
{copperplate gothic bold} {copperplate gothic light} corbel {corsiva hebrew} courier
{courier new} {curlz mt} damascus {decotype naskh} desdemona {devanagari mt}
{devanagari sangam mn} didot {din alternate} {din condensed} {diwan kufi} {diwan thuluth}
{edwardian script itc} {engravers mt} {euphemia ucas} eurostile farah farisi
{footlight mt light} {franklin gothic book} {franklin gothic medium}
futura gabriola garamond {gb18030 bitmap} {geeza pro} geneva {geneva cy}
georgia {gill sans} {gill sans mt} {gloucester mt extra condensed}
{goudy old style} {gujarati mt} {gujarati sangam mn} gulim gungseo {gurmukhi mn}
{gurmukhi mt} {gurmukhi sangam mn} haettenschweiler {hannotate sc} {hannotate tc}
{hanzipen sc} {hanzipen tc} harrington headlinea hei {heiti sc} {heiti tc}
helvetica {helvetica cy} {helvetica neue} herculanum {hiragino kaku gothic pro}
{hiragino kaku gothic pron} {hiragino kaku gothic std} {hiragino kaku gothic stdn}
{hiragino maru gothic pro} {hiragino maru gothic pron}
{hiragino mincho pro} {hiragino mincho pron} {hiragino sans gb}
{hoefler text} impact {imprint mt shadow} inaimathi {iowan old style} kai kailasa
{kaiti sc} {kaiti tc} {kannada mn} {kannada sangam mn} kefa {khmer mn} {khmer sangam mn}
{kino mt} kokonor krungthep kufistandardgk {lantinghei sc} {lantinghei tc} {lao mn}
{lao sangam mn} {libian sc} {lihei pro} {lisong pro} {lucida blackletter} {lucida bright}
{lucida calligraphy} {lucida console} {lucida fax} {lucida grande} {lucida handwriting}
{lucida sans} {lucida sans typewriter} {lucida sans unicode} {malayalam mn}
{malayalam sangam mn} marion {marker felt} marlett {matura mt script capitals}
meiryo menlo {microsoft sans serif} mishafi mistral {modern no. 20} monaco {ms gothic}
{ms mincho} {ms pgothic} {ms pmincho} {ms reference sans serif} {ms reference specialty}
mshtakan {mt extra} muna {myanmar mn} {myanmar sangam mn} nadeem {nanum brush script}
{nanum gothic} {nanum myeongjo} {nanum pen script} {new peninim mt} {news gothic mt}
noteworthy onyx optima {oriya mn} {oriya sangam mn} osaka palatino {palatino linotype}
papyrus pcmyungjo perpetua {perpetua titling mt} pilgi {plantagenet cherokee}
playbill pmingliu {pt mono} {pt sans} {pt sans caption} {pt sans narrow} {pt serif}
{pt serif caption} raanana rockwell {rockwell extra bold} sana sathu {savoye let}
seravek silom simsun {sinhala mn} {sinhala sangam mn} skia {snell roundhand} {songti sc}
{songti tc} stencil stfangsong stheiti stixgeneral stixintegralsd stixintegralssm
stixintegralsup stixintegralsupd stixintegralsupsm stixnonunicode stixsizefivesym
stixsizefoursym stixsizeonesym stixsizethreesym stixsizetwosym stixvariants stkaiti
stsong superclarendon symbol tahoma {tamil mn} {tamil sangam mn} teamviewer8 {telugu mn}
{telugu sangam mn} thonburi times {times new roman} {trebuchet ms} {tw cen mt} verdana
waseem {wawati sc} {wawati tc} webdings {weibei sc} {weibei tc} {wide latin} wingdings
{wingdings 2} {wingdings 3} {xingkai sc} {yuanti sc} yugothic yumincho {yuppy sc}
{yuppy tc} {zapf dingbats} zapfino {apple braille} {apple chancery} {apple color emoji}
{apple ligothic} {apple lisung} {apple sd gothic neo} {apple symbols}
applegothic applemyungjo {monotype corsiva} {monotype sorts}