FontStyle

Inheritance: java.lang.Object

All Implemented Interfaces: com.groupdocs.editor.htmlcss.css.properties.ICssProperty

public class FontStyle implements ICssProperty

Defines how the font should be styled with: a normal, italic, or oblique face from its font-family.

Constructors

Constructor Description
FontStyle()

Fields

Field Description
Normal Selects a font that is classified as normal within a font-family.
Italic Selects a font that is classified as italic.
Oblique Selects a font that is classified as oblique.

Methods

Method Description
isInitial() Indicates whether this font-style has an initial value (Normal)
getValue() Returns a value of this font style as a string
equals(FontStyle other) Determines whether this font-style instance is equal to specified
equals(Object obj) Determines whether this font-style instance is equal to specified uncasted
hashCode() Returns a hash-code for this instance
op_Equality(FontStyle first, FontStyle second) Checks whether two “FontStyle” values are equal
op_Inequality(FontStyle first, FontStyle second) Checks whether two “FontStyle” values are not equal
tryParse(String keyword, FontStyle[] result) Tries to recognize a specified keyword as a proper keyword value of the ‘font-style’ and return it on success or NULL on failure.

FontStyle()

public FontStyle()

Normal

public static final FontStyle Normal

Selects a font that is classified as normal within a font-family. Initial value.

Italic

public static final FontStyle Italic

Selects a font that is classified as italic. If no italic version of the face is available, one classified as oblique is used instead. If neither is available, the style is artificially simulated.

Oblique

public static final FontStyle Oblique

Selects a font that is classified as oblique. If no oblique version of the face is available, one classified as italic is used instead. If neither is available, the style is artificially simulated.

isInitial()

public final boolean isInitial()

Indicates whether this font-style has an initial value (Normal)

Returns: boolean

getValue()

public final String getValue()

Returns a value of this font style as a string

Returns: java.lang.String

equals(FontStyle other)

public final boolean equals(FontStyle other)

Determines whether this font-style instance is equal to specified

Parameters:

Parameter Type Description
other FontStyle Other font-style instance

Returns: boolean - true if are equal, false otherwise

equals(Object obj)

public boolean equals(Object obj)

Determines whether this font-style instance is equal to specified uncasted

Parameters:

Parameter Type Description
obj java.lang.Object Other uncasted font-style instance, may be null

Returns: boolean - true if are equal, false if not equal, null or of other type

hashCode()

public int hashCode()

Returns a hash-code for this instance

Returns: int - Hash-code as an signed integer

op_Equality(FontStyle first, FontStyle second)

public static boolean op_Equality(FontStyle first, FontStyle second)

Checks whether two “FontStyle” values are equal

Parameters:

Parameter Type Description
first FontStyle First value to check
second FontStyle Second value to check

Returns: boolean - true if are equal, false otherwise

op_Inequality(FontStyle first, FontStyle second)

public static boolean op_Inequality(FontStyle first, FontStyle second)

Checks whether two “FontStyle” values are not equal

Parameters:

Parameter Type Description
first FontStyle First value to check
second FontStyle Second value to check

Returns: boolean - false if are equal, true otherwise

tryParse(String keyword, FontStyle[] result)

public static boolean tryParse(String keyword, FontStyle[] result)

Tries to recognize a specified keyword as a proper keyword value of the ‘font-style’ and return it on success or NULL on failure.

Parameters:

Parameter Type Description
keyword java.lang.String A keyword to parse
result FontStyle[] Result, of parsing was successful, or #Normal.Normal otherwise

Returns: boolean - true if parsing was successful, false otherwise