Share this Page URL
Help

Chapter 18. Fonts > Class FontData - Pg. 292

292 Chapter 18. Fonts All modern graphical user interfaces provide some mechanism for specifying the appearance of text that is displayed. The degree of control that platforms provide over this can vary significantly, and on several of the platforms that SWT supports, there is significant ongoing work in this area. We use the term font (note lowercase) to describe generally the platform objects that specify text ap- pearance. SWT abstracts these objects using three classes: FontData, Font, and FontMetrics. Class FontData Instances of class FontData are descriptions of fonts. They can represent either an abstract, user- oriented specification of a font, or a precise, platform-specific description of a font, depending on how they are created. No operating system storage is allocated for FontData objects, and they do not have a dispose() method. To request a font with a particular name, size, and style, create an instance of class FontData, using the following constructor.