Interface SyFontType
public interface SyFontType
A font.
-
Method Summary
Modifier and TypeMethodDescriptionThe font description.intMeasure the maximum descent of text rendered using this font.intMeasure the maximum height of text rendered using this font.default List<SyTextLineMeasuredType> textLayout(SyTextID textID, SyText text, int pageWidth) Split the given text into lines based on the given page width; lines will be broken in order to ensure that text fits within the page width.textLayoutMultiple(SortedMap<SyTextID, SyText> texts, int pageWidth) Split the given texts into lines based on the given page width; lines will be broken in order to ensure that text fits within the page width.intMeasure the width of the given text using this font.
-
Method Details
-
textHeight
int textHeight()Measure the maximum height of text rendered using this font.- Returns:
- The height of the text
-
textWidth
Measure the width of the given text using this font.- Parameters:
text- The text- Returns:
- The width of the text
-
textDescent
int textDescent()Measure the maximum descent of text rendered using this font.- Returns:
- The descent of the text
-
description
-
textLayout
Split the given text into lines based on the given page width; lines will be broken in order to ensure that text fits within the page width.- Parameters:
textID- The text identifiertext- The textpageWidth- The page width- Returns:
- The non-empty list of split lines
-
textLayoutMultiple
Split the given texts into lines based on the given page width; lines will be broken in order to ensure that text fits within the page width.- Parameters:
texts- The textspageWidth- The page width- Returns:
- The split lines
-