Class FontVariant

  • All Implemented Interfaces:
    java.io.Serializable

    public class FontVariant
    extends java.lang.Object
    implements java.io.Serializable
    The Class FontVariant.
    See Also:
    Serialized Form
    • Constructor Detail

      • FontVariant

        public FontVariant()
    • Method Detail

      • getFont

        public java.lang.String getFont()

        Gets the name of this font variant, e.g. 'Arial'

        Returns:
        name of this font variant
      • setFont

        public void setFont​(java.lang.String font)

        Sets the name of this font variant, e.g. 'Arial'

        Parameters:
        font - new name of font
      • getFace

        public java.lang.String getFace()

        Gets the name of the font face, e.g. 'Condensed'

        Returns:
        name of the font face
      • setFace

        public void setFace​(java.lang.String face)

        Sets the name of the font face, e.g. 'Condensed'

        Parameters:
        face - name of the font face
      • getStyle

        public FontVariant.Style getStyle()

        Gets the style of this font variant.

        Returns:
        style of this font variant, either NORMAL or ITALIC
      • setStyle

        public void setStyle​(FontVariant.Style style)

        Sets the style of this font variant, i.e. NORMAL or ITALIC

        Parameters:
        style - new style of the font
      • getWeight

        public FontVariant.Weight getWeight()

        Gets the weight of this font variant, e.g. BOLD

        Returns:
        weight of this font variant
      • setWeight

        public void setWeight​(FontVariant.Weight weight)

        Sets the weight of this font variant, e.g. BOLD

        Parameters:
        weight - new weight of this font variant
      • getStretch

        public FontVariant.Stretch getStretch()

        Gets the stretch of this font variant, e.g. CONDENSED

        Returns:
        stretch of this font variant
      • setStretch

        public void setStretch​(FontVariant.Stretch stretch)

        Sets the stretch of this font variant, e.g. CONDENSED

        Parameters:
        stretch - stretch of this font variant
      • merge

        public FontVariant merge​(FontVariant other)

        Merge definitions of other font variants into this font variant.

        Applies style, weight and stretch of another font variant to this font variant.

        Parameters:
        other - other font variant
        Returns:
        the merged font variant