com.groupdocs.editor.htmlcss.resources.fonts

Class FontType

    • Constructor Detail

      • FontType

        public FontType()
    • Method Detail

      • equals

        public final boolean equals(FontType other)

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

        Parameters:
        other - Other FontType instance to check with this
        Returns:
        True if are equal, false if are unequal
      • equals

        public boolean equals(Object obj)

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

        Overrides:
        equals in class Object
        Parameters:
        obj - Other instance presumably of FontType struct, that was boxed to System.Object
        Returns:
        True if are equal, false if are unequal
      • getCssName

        public final String getCssName()

        Returns CSS-compatible name of this font type, which is used in the

        Returns:
      • getEot

        public static FontType getEot()

        Represents a EOT (Embedded OpenType) font type

        Returns:
      • getFileExtension

        public final String getFileExtension()

        Filename extension (without dot character) for this font type

        Specified by:
        getFileExtension in interface IResourceType
        Returns:
      • 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 - One or more FontType values, NULL or empty collection is not allowed
        Returns:
        First FontType value from specified collection, that is not Undefined, or Undefined, if all items are Undefined
      • getFontFormat

        public final String getFontFormat()

        Font format for @font-face format

        Returns:
      • getOtf

        public static FontType getOtf()

        Represents a OTF (OpenType Font) font type

        Returns:
      • getTtf

        public static FontType getTtf()

        Represents a TTF (TrueType Font) font type

        Returns:
      • getUndefined

        public static FontType getUndefined()

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

        Returns:
      • getWoff

        public static FontType getWoff()

        Represents a WOFF (Web Open Font Format) font type

        Returns:
      • getWoff2

        public static FontType getWoff2()

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

        Returns:
      • hashCode

        public int hashCode()

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

        Overrides:
        hashCode in class Object
        Returns:
        4-byte signed integer, 0 for Undefined value
      • op_Equality

        public static boolean op_Equality(FontType first,
                                          FontType second)

        Checks whether two "FontType" values are equal

        Parameters:
        first - First FontType to check
        second - Second FontType to check
        Returns:
        True if are equal, false if are unequal
      • op_Inequality

        public static boolean op_Inequality(FontType first,
                                            FontType second)

        Checks whether two "FontType" values are not equal

        Parameters:
        first - First FontType to check
        second - Second FontType to check
        Returns:
        True if are equal, false if are unequal
      • parseFromCssName

        public static FontType parseFromCssName(String name)

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

        Parameters:
        name - CSS-compatible name of the font type
        Returns:
        Valid FontType value on success or FontType.Undefined on failure
      • 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 with extension, may be a full name
        Returns:
        Valid FontType value on success or FontType.Undefined on failure
      • parseFromMime

        public static FontType parseFromMime(String mimeCode)

        Returns FontType value, which is equivalent of specified MIME-code

        Parameters:
        mimeCode - MIME-code
        Returns:
        Valid FontType value on success or FontType.Undefined on failure