com.groupdocs.editor.htmlcss.resources.fonts

Class FontType

  • java.lang.Object
    • com.aspose.ms.System.ValueType<T>
      • com.aspose.ms.lang.Struct<FontType>
        • com.groupdocs.editor.htmlcss.resources.fonts.FontType
  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<FontType>, IResourceType


    public class FontType
    extends com.aspose.ms.lang.Struct<FontType>
    implements com.aspose.ms.System.IEquatable<FontType>, IResourceType

    Represents one supportable font type

    • Constructor Summary

      Constructors 
      Constructor and Description
      FontType() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(FontType other)
      Determines whether this instance is equal with specified "FontType" instance
      boolean equals(Object obj)
      Determines whether this instance is equal with specified uncasted object, which presumably is another "FontType" instance
      String getCssName()
      Returns CSS-compatible name of this font type, which is used in the @font-face at-rule
      static FontType getEot()
      Represents a EOT (Embedded OpenType) font type
      String getFileExtension()
      Filename extension (without dot character) for this font type
      static FontType getFirstDefined(FontType... fonts)
      Returns a first font type from specified set, which is not an "Undefined" value, or "Undefined" font type otherwise (when all items are "Undefined")
      String getFontFormat()
      Font format for @font-face format
      String getFormalName()
      Returns a formal name of this font type
      String getMimeCode()
      MIME code of a particular font type
      static FontType getTtf()
      Represents a TTF (TrueType Font) font type
      static FontType getUndefined()
      Special value, which marks undefined, unknown or unsupported font resource
      static FontType getWoff()
      Represents a WOFF (Web Open Font Format) font type
      static FontType getWoff2()
      Represents a WOFF2 (Web Open Font Format version 2) font type
      int hashCode()
      Returns a hash-code, which is a constant number for this specific value type
      static boolean op_Equality(FontType first, FontType second)
      Checks whether two "FontType" values are equal
      static boolean op_Inequality(FontType first, FontType second)
      Checks whether two "FontType" values are not equal
      static FontType parseFromCssName(String name)
      Returns FontType value, which is equivalent of specified CSS-compatible name of the font type
      static FontType parseFromFilenameWithExtension(String filename)
      Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename
      static FontType parseFromMime(String mimeCode)
      Returns FontType value, which is equivalent of specified MIME code
      • Methods inherited from class com.aspose.ms.System.ValueType

        Clone, CloneTo
    • Constructor Detail

      • FontType

        public FontType()
    • Method Detail

      • equals

        public boolean equals(FontType other)

        Determines whether this instance is equal with specified "FontType" instance

        Parameters:
        other - FontType
        Returns:
      • equals

        public boolean equals(Object obj)

        Determines whether this instance is equal with specified uncasted object, which presumably is another "FontType" instance

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<FontType>
        Overrides:
        equals in class Object
        Parameters:
        obj - Object
        Returns:
      • getCssName

        public String getCssName()

        Returns CSS-compatible name of this font type, which is used in the @font-face at-rule

      • getEot

        public static FontType getEot()

        Represents a EOT (Embedded OpenType) font type

      • getFileExtension

        public String getFileExtension()

        Filename extension (without dot character) for this font type

        Specified by:
        getFileExtension in interface IResourceType
      • getFirstDefined

        public static FontType getFirstDefined(FontType... fonts)

        Returns a first font type from specified set, which is not an "Undefined" value, or "Undefined" font type otherwise (when all items are "Undefined")

        Parameters:
        fonts -
        Returns:
      • getFontFormat

        public String getFontFormat()

        Font format for @font-face format

      • getTtf

        public static FontType getTtf()

        Represents a TTF (TrueType Font) font type

      • getUndefined

        public static FontType getUndefined()

        Special value, which marks undefined, unknown or unsupported font resource

      • getWoff

        public static FontType getWoff()

        Represents a WOFF (Web Open Font Format) font type

      • getWoff2

        public static FontType getWoff2()

        Represents a WOFF2 (Web Open Font Format version 2) font type

      • hashCode

        public int hashCode()

        Returns a hash-code, which is a constant number for this specific value type

        Overrides:
        hashCode in class Object
        Returns:
      • op_Equality

        public static boolean op_Equality(FontType first,
                          FontType second)

        Checks whether two "FontType" values are equal

        Parameters:
        first -
        second -
        Returns:
      • op_Inequality

        public static boolean op_Inequality(FontType first,
                            FontType second)

        Checks whether two "FontType" values are not equal

        Parameters:
        first -
        second -
        Returns:
      • parseFromCssName

        public static FontType parseFromCssName(String name)

        Returns FontType value, which is equivalent of specified CSS-compatible name of the font type

        Parameters:
        name - Format name of the font type
        Returns:
      • parseFromFilenameWithExtension

        public static FontType parseFromFilenameWithExtension(String filename)

        Returns FontType value, which is equivalent of filename extension, which is extracted from specified filename

        Parameters:
        filename - Filename extension (without dot character)
        Returns:
      • parseFromMime

        public static FontType parseFromMime(String mimeCode)

        Returns FontType value, which is equivalent of specified MIME code

        Parameters:
        mimeCode - MIME code of a particular font type
        Returns: