Interface SyFontType


public interface SyFontType
A font.
  • Method Details

    • textHeight

      int textHeight()
      Measure the maximum height of text rendered using this font.
      Returns:
      The height of the text
    • textWidth

      int textWidth(String text)
      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

      SyFontDescription description()
      The font description.
      Returns:
      The description of the font
    • textLayout

      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.
      Parameters:
      textID - The text identifier
      text - The text
      pageWidth - The page width
      Returns:
      The non-empty list of split lines
    • textLayoutMultiple

      List<SyTextLineMeasuredType> 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.
      Parameters:
      texts - The texts
      pageWidth - The page width
      Returns:
      The split lines