com.groupdocs.parser

Interfaces

Classes

Exceptions

com.groupdocs.parser

Class Font



  • public final class Font
    extends Object

    Provides a font.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static Font EMPTY
      An empty font.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Font(boolean isItalic, boolean isBold)
      Initializes a new instance of the Font class.
      Font(String name, double size, boolean isItalic, boolean isBold)
      Initializes a new instance of the Font class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(Font other)
      Indicates whether the current object is equal to another object of the same type.
      boolean equals(Object obj)
      Determines whether the specified object is equal to the current object.
      String getName()
      Gets a name of the font.
      double getSize()
      Gets a size of the text.
      int hashCode()
      Serves as a hash function for a particular type.
      boolean isBold()
      Gets a value indicating whether text is bold.
      boolean isItalic()
      Gets a value indicating whether text is italic.
    • Field Detail

      • EMPTY

        public static final Font EMPTY

        An empty font.

    • Constructor Detail

      • Font

        public Font(boolean isItalic,
            boolean isBold)

        Initializes a new instance of the Font class.

        Parameters:
        isItalic - A value indicating whether the text is italic; otherwise, false.
        isBold - A value indicating whether the text is bold; otherwise, false.
      • Font

        public Font(String name,
            double size,
            boolean isItalic,
            boolean isBold)

        Initializes a new instance of the Font class.

        Parameters:
        name - A name of the font.
        size - A size of the font.
        isItalic - A value indicating whether the text is italic; otherwise, false.
        isBold - A value indicating whether the text is bold; otherwise, false.
    • Method Detail

      • getName

        public String getName()

        Gets a name of the font.

        Returns:
        A string that represents a name of the font.
      • getSize

        public double getSize()

        Gets a size of the text.

        Returns:
        A double value that represents a size of the font.
      • isItalic

        public boolean isItalic()

        Gets a value indicating whether text is italic.

        Returns:
        A boolean true if text is italic; otherwise, false.
      • isBold

        public boolean isBold()

        Gets a value indicating whether text is bold.

        Returns:
        A boolean true if text is bold; otherwise, false.
      • equals

        public boolean equals(Font other)

        Indicates whether the current object is equal to another object of the same type.

        Parameters:
        other - An object to compare with this object.
        Returns:
        true if the current object is equal to the other parameter; otherwise, false.
      • equals

        public boolean equals(Object obj)

        Determines whether the specified object is equal to the current object.

        Overrides:
        equals in class Object
        Parameters:
        obj - An object to compare with the current object.
        Returns:
        true if the specified object is equal to the current object; otherwise, false.
      • hashCode

        public int hashCode()

        Serves as a hash function for a particular type.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for the current object.