Class Font

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getName() Returns the name of the font family.
      List<File> getFontFiles() Returns all the files associated with the given font family.
      Typeface getDefaultTypeface() Returns the default typeface to use, or null if this font is not available on this device.
      File getDefaultFontFile() Returns the default font file to use.
      boolean equals(Object o)
      int hashCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Font

        Font(String name, List<File> fontFiles)
        Creates a new Font.
        Parameters:
        name - The family name of this font.
        fontFiles - All files associated with the given font family.
      • Font

        Font(String name, Typeface defaultTypeface)
        Creates a new Font.
        Parameters:
        name - The family name of this font.
        defaultTypeface - Default Typeface of the given font.
      • Font

        Font(String name)
        Creates a new Font.
        Parameters:
        name - The family name of this font.
    • Method Detail

      • getName

        @NonNull() String getName()

        Returns the name of the font family.

        Returns:

        The name of the font family.

      • getFontFiles

        @NonNull() List<File> getFontFiles()

        Returns all the files associated with the given font family.

        Returns:

        All the files associated with the given font family.

      • getDefaultTypeface

        @Nullable() Typeface getDefaultTypeface()

        Returns the default typeface to use, or null if this font is not available on this device. This can occur if this annotation wasn't created locally.

        Returns:

        The default typeface to use.

      • getDefaultFontFile

        @Nullable() File getDefaultFontFile()

        Returns the default font file to use.

        Returns:

        The default font file to use or null if no font file is available.