Interface DMFontConfig


public interface DMFontConfig
Represents a font configuration. This is used to configure the appearance of the font like the family, size, line spacing, ...
See Also:
  • Method Details

    • getName

      @NotNull @NotNull String getName()
      Gets the name of this font configuration.
      Returns:
      The name of the font configuration.
    • setName

      void setName(@NotNull @NotNull String name)
      Sets the name of the font configuration.
      Parameters:
      name - The name of the font configuration.
    • getFamily

      String getFamily()
      Gets the family of the font. If the font is not found, it will use the default font.
      Returns:
      The family of the font.
    • setFamily

      void setFamily(@NotNull @NotNull String family)
      Sets the family of the font. The default Minecraft font is called "default", but you can also import other fonts by putting them inside the "import/fonts" folder inside the DialogueMaster plugin folder.
      Parameters:
      family - The family of the font.
    • getSize

      int getSize()
      Gets the size of the font. Defaults to 12.
      Returns:
      The size of the font.
    • setSize

      void setSize(int size)
      Sets the size of the font. 12 is recommended for most fonts.
      Parameters:
      size - The size of the font.
    • getOversample

      int getOversample()
      Gets the oversample of the font. This is the quality at which it renders the font. Defaults to 16.
      Returns:
      The oversample of the font.
    • setOversample

      void setOversample(int oversample)
      Sets the oversample of the font. This is the quality at which it renders the font. 16 is recommended for most fonts.
      Parameters:
      oversample - The oversample of the font.
    • getVerticalShift

      float getVerticalShift()
      Gets the vertical shift of the font. This is the vertical shift of the first line. The other lines will be determined by this value plus x times the line spacing.
      Returns:
      The vertical shift of the font.
    • setVerticalShift

      void setVerticalShift(float verticalShift)
      Sets the vertical shift of the font.This is the vertical shift of the first line. The other lines will be determined by this value plus x times the line spacing.
      Parameters:
      verticalShift - The vertical shift of the font.
    • getLineSpacing

      float getLineSpacing()
      Gets the line spacing of the font.
      Returns:
      The line spacing of the font.
    • setLineSpacing

      void setLineSpacing(float lineSpacing)
      Sets the line spacing of the font.
      Parameters:
      lineSpacing - The line spacing of the font.
    • getMaxLines

      int getMaxLines()
      Gets the max lines of the font.
      Returns:
      The max lines of the font.
    • setMaxLines

      void setMaxLines(int maxLines)
      Sets the max lines of the font. Defaults to 5.
      Parameters:
      maxLines - The max lines of the font.
    • getAlignment

      TextAlignment getAlignment()
      Gets the alignment of the font.
      Returns:
      The alignment of the font.
    • setAlignment

      void setAlignment(TextAlignment alignment)
      Sets the alignment of the font.
      Parameters:
      alignment - The alignment of the font.
    • getMaxLineWidth

      int getMaxLineWidth()
      Gets the max line width of the font.
      Returns:
      The max line width of the font.
    • setMaxLineWidth

      int setMaxLineWidth(int maxWidth)
      Sets the max line width of the font.
      Parameters:
      maxWidth - The max line width of the font.
      Returns:
      The max line width of the font.