| 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. | 
| Modifier and Type | Method and 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. | 
| Modifier and Type | Field and Description | 
|---|---|
| static TextAttribute | TextAttribute. BACKGROUNDAttribute key for the paint used to render the background of
 the text. | 
| static TextAttribute | TextAttribute. BIDI_EMBEDDINGAttribute key for the embedding level of the text. | 
| static TextAttribute | TextAttribute. CHAR_REPLACEMENTAttribute key for a user-defined glyph to display in lieu
 of the font's standard glyph for a character. | 
| static TextAttribute | TextAttribute. FAMILYAttribute key for the font name. | 
| static TextAttribute | TextAttribute. FONTAttribute key used to provide the font to use to render text. | 
| static TextAttribute | TextAttribute. FOREGROUNDAttribute key for the paint used to render the text. | 
| static TextAttribute | TextAttribute. INPUT_METHOD_HIGHLIGHTAttribute key for input method highlight styles. | 
| static TextAttribute | TextAttribute. INPUT_METHOD_UNDERLINEAttribute key for input method underlines. | 
| static TextAttribute | TextAttribute. JUSTIFICATIONAttribute key for the justification of a paragraph. | 
| static TextAttribute | TextAttribute. KERNINGAttribute key to request kerning. | 
| static TextAttribute | TextAttribute. LIGATURESAttribute key for enabling optional ligatures. | 
| static TextAttribute | TextAttribute. NUMERIC_SHAPINGAttribute key for converting ASCII decimal digits to other
 decimal ranges. | 
| static TextAttribute | TextAttribute. POSTUREAttribute key for the posture of a font. | 
| static TextAttribute | TextAttribute. RUN_DIRECTIONAttribute key for the run direction of the line. | 
| static TextAttribute | TextAttribute. SIZEAttribute key for the font size. | 
| static TextAttribute | TextAttribute. STRIKETHROUGHAttribute key for strikethrough. | 
| static TextAttribute | TextAttribute. SUPERSCRIPTAttribute key for superscripting and subscripting. | 
| static TextAttribute | TextAttribute. SWAP_COLORSAttribute key for swapping foreground and background
  Paints. | 
| static TextAttribute | TextAttribute. TRACKINGAttribute key to control tracking. | 
| static TextAttribute | TextAttribute. TRANSFORMAttribute key for the transform of a font. | 
| static TextAttribute | TextAttribute. UNDERLINEAttribute key for underline. | 
| static TextAttribute | TextAttribute. WEIGHTAttribute key for the weight of a font. | 
| static TextAttribute | TextAttribute. WIDTHAttribute key for the width of a font. | 
| Modifier and Type | Method and Description | 
|---|---|
| Map<TextAttribute,?> | InputMethodHighlight. getStyle()Returns the rendering style attributes for the text range, or null. | 
| Constructor and Description | 
|---|
| InputMethodHighlight(boolean selected,
                    int state,
                    int variation,
                    Map<TextAttribute,?> style)Constructs an input method highlight record. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.