O'Reilly logo

Practical Programming in Tcl and Tk, Fourth Edition by Brent Welch, Ken Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 42. Fonts and Text Attributes

This chapter describes the naming conventions for fonts. Tk has a font object that you can dynamically configure and associate with widgets. This chapter also describes other text-related attributes such as justification, anchoring, and geometry gridding.

Fonts describe how characters look on the screen. Tk widgets like buttons, labels, and listboxes have a font attribute that determines which font they use to display their text. The text widget has font attributes on tags that are applied to different regions of text. Tk has a platform-independent way to name fonts (e.g., times 12 bold), plus it gracefully handles missing fonts. You can define named font objects and then associate those with widgets and text ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required