Class TypeFamily

java.lang.Object
com.mta.tehreer.graphics.TypeFamily

public class TypeFamily extends Object
A TypeFamily object represents a collection of typefaces that relate to each other.
  • Constructor Details

    • TypeFamily

      public TypeFamily(@NonNull String familyName, @NonNull @Size(min=1L) List<Typeface> typefaces)
      Constructs a type family object.
      Parameters:
      familyName - The name of family.
      typefaces - The list of typefaces belonging to family.
  • Method Details

    • getFamilyName

      @NonNull public String getFamilyName()
      Returns the name of this family.
      Returns:
      The name of this family.
    • getTypefaces

      @NonNull public List<Typeface> getTypefaces()
      Returns the list of typefaces belonging to this family.
      Returns:
      The list of typefaces belonging to this family.
    • getTypefaceByStyle

      @NonNull public Typeface getTypefaceByStyle(@NonNull TypeWidth typeWidth, @NonNull TypeWeight typeWeight, @NonNull TypeSlope typeSlope)
      Returns a typeface best matching the specified style.
      Parameters:
      typeWidth - The typographic width of desired typeface.
      typeWeight - The typographic weight of desired typeface.
      typeSlope - The typographic slope of desired typeface.
      Returns:
      A typeface best matching the specified style.
    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      @NonNull public String toString()
      Overrides:
      toString in class Object