# Uses of Class
java.awt.font.TextAttribute

Packages that use TextAttribute
Package
Description
java.awt
Contains all of the classes for creating user interfaces and for painting graphics and images.
java.awt.font
Provides classes and interface relating to fonts.
java.awt.im
Provides classes and interfaces for the input method framework.

## Uses of TextAttribute in java.awt

Methods in java.awt that return types with arguments of type TextAttribute
Modifier and Type
Method
Description
`Map<TextAttribute, ?>`
Font.`getAttributes()`
Returns a map of font attributes available in this `Font`.
`abstract Map<TextAttribute, ?>`
Toolkit.`mapInputMethodHighlight(InputMethodHighlight highlight)`
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.

## Uses of TextAttribute in java.awt.font

Fields in java.awt.font declared as TextAttribute
Modifier and Type
Field
Description
`static final TextAttribute`
TextAttribute.`BACKGROUND`
Attribute key for the paint used to render the background of the text.
`static final TextAttribute`
TextAttribute.`BIDI_EMBEDDING`
Attribute key for the embedding level of the text.
`static final TextAttribute`
TextAttribute.`CHAR_REPLACEMENT`
Attribute key for a user-defined glyph to display in lieu of the font's standard glyph for a character.
`static final TextAttribute`
TextAttribute.`FAMILY`
Attribute key for the font name.
`static final TextAttribute`
TextAttribute.`FONT`
Attribute key used to provide the font to use to render text.
`static final TextAttribute`
TextAttribute.`FOREGROUND`
Attribute key for the paint used to render the text.
`static final TextAttribute`
TextAttribute.`INPUT_METHOD_HIGHLIGHT`
Attribute key for input method highlight styles.
`static final TextAttribute`
TextAttribute.`INPUT_METHOD_UNDERLINE`
Attribute key for input method underlines.
`static final TextAttribute`
TextAttribute.`JUSTIFICATION`
Attribute key for the justification of a paragraph.
`static final TextAttribute`
TextAttribute.`KERNING`
Attribute key to request kerning.
`static final TextAttribute`
TextAttribute.`LIGATURES`
Attribute key for enabling optional ligatures.
`static final TextAttribute`
TextAttribute.`NUMERIC_SHAPING`
Attribute key for converting ASCII decimal digits to other decimal ranges.
`static final TextAttribute`
TextAttribute.`POSTURE`
Attribute key for the posture of a font.
`static final TextAttribute`
TextAttribute.`RUN_DIRECTION`
Attribute key for the run direction of the line.
`static final TextAttribute`
TextAttribute.`SIZE`
Attribute key for the font size.
`static final TextAttribute`
TextAttribute.`STRIKETHROUGH`
Attribute key for strikethrough.
`static final TextAttribute`
TextAttribute.`SUPERSCRIPT`
Attribute key for superscripting and subscripting.
`static final TextAttribute`
TextAttribute.`SWAP_COLORS`
Attribute key for swapping foreground and background `Paints`.
`static final TextAttribute`
TextAttribute.`TRACKING`
Attribute key to control tracking.
`static final TextAttribute`
TextAttribute.`TRANSFORM`
Attribute key for the transform of a font.
`static final TextAttribute`
TextAttribute.`UNDERLINE`
Attribute key for underline.
`static final TextAttribute`
TextAttribute.`WEIGHT`
Attribute key for the weight of a font.
`static final TextAttribute`
TextAttribute.`WIDTH`
Attribute key for the width of a font.

## Uses of TextAttribute in java.awt.im

Methods in java.awt.im that return types with arguments of type TextAttribute
Modifier and Type
Method
Description
`Map<TextAttribute, ?>`
InputMethodHighlight.`getStyle()`
Returns the rendering style attributes for the text range, or null.
Constructor parameters in java.awt.im with type arguments of type TextAttribute
Modifier
Constructor
Description
``
`InputMethodHighlight(boolean selected, int state, int variation, Map<TextAttribute, ?> style)`
Constructs an input method highlight record.