IText uses the classes ITextStyle and ITextStyleSet to encapsulate the styling information associated with a string. ITextStyle is the abstract base class for all text styles provided by the framework. ITextStyleSet provides a mechanism for manipulating styles in groups. Most functions that take styles as parameters allow you to add styles to a range of characters in an IText object either individually (with ITextStyle) or as a group (with ITextStyleSet).

IText uses ITextStyleSet to store the set of styles associated with a particular style run, and you can use it to work with groups of styles. An ITextStyleSet object can contain only one instance of any given style. It cannot, for example, contain two instances of ITextTypefaceStyle even if one style indicates "Helvetica" and another indicates "Times." If you add a style to a style set that already contains an instance of that type of style, the new style replaces the old style regardless of their values, as illustrated in this figure:

![]()
Style Classes
Style Propagation