Package playn.core

Class Font

java.lang.Object
playn.core.Font

public class Font extends Object
Contains metadata for a font.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    The styles that may be requested for a given font.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The name of this font.
    final float
    The point size of this font.
    The style of this font.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Font(String name, float size)
    Creates a font as specified with Font.Style.PLAIN..
    Font(String name, Font.Style style, float size)
    Creates a font as specified.
  • Method Summary

    Modifier and Type
    Method
    Description
    derive(float size)
    Derives a font with the same name and style as this one, at the specified size.
    boolean
    equals(Object other)
     
    int
     
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      public final String name
      The name of this font.
    • style

      public final Font.Style style
      The style of this font.
    • size

      public final float size
      The point size of this font.
  • Constructor Details

    • Font

      public Font(String name, Font.Style style, float size)
      Creates a font as specified.
    • Font

      public Font(String name, float size)
      Creates a font as specified with Font.Style.PLAIN..
  • Method Details

    • derive

      public Font derive(float size)
      Derives a font with the same name and style as this one, at the specified size.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object