Java Abstract Window Toolkit (AWT)
LineBreakMeasurer shall be used in case you want your styled text paragraph to get fit in a specific width. Styled text is broken down into lines by this class so that to make them fit in a visual advance. As a TextLayout object every line is returned, that presents the styled and unchangeable character data. This class accesses the layout information.
The getDescent and getAscent methods of Textlayout make the information to be returned regarding font which positions the component