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 Detail

      • FontType

        public FontType()
    • Method Detail

      • CloneTo

        public void CloneTo(FontType that)
        Specified by:
        CloneTo in class com.aspose.ms.System.ValueType<FontType>
      • equals

        public boolean equals(FontType other)

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

        Parameters:
        other -
        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 -
        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)
                                        throws Exception

        Returns a first font type from specified set, which is not an "Undefined" value

        Parameters:
        fonts -
        Returns:
        Throws:
        Exception
      • 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 -
        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 -
        Returns:
      • parseFromMime

        public static FontType parseFromMime(String mimeCode)

        Returns FontType value, which is equivalent of specified MIME code

        Parameters:
        mimeCode -
        Returns: