RichTextFontStyles

Inheritance: java.lang.Object, com.aspose.ms.System.ValueType<com.aspose.ms.System.Enum> com.aspose.ms.System.Enum com.aspose.pdf.RichTextFontStyles, com.aspose.ms.System.ValueType<com.aspose.ms.System.Enum>, com.aspose.ms.System.Enum com.aspose.pdf.RichTextFontStyles, com.aspose.ms.System.Enum, com.aspose.pdf.RichTextFontStyles

public final class RichTextFontStyles extends com.aspose.ms.System.Enum

Options for styling text fragments in RichText.

Fields

FieldDescription
BoldOption that specifies bold.
ClearExistingIf set, clears all existing styles before applying additional ones. When combined with other style flags (e.g., {@code RichTextFontStyles#Bold}), it first resets the styles, then applies the specified ones. Without this flag, new styles are added to the existing ones.
ItalicOption that specifies italic.
UnderlineOption that specifies underline.

Methods

MethodDescription
hasFlagChecks whether the specified flag is set.

Bold

public static final int Bold

Option that specifies bold.

ClearExisting

public static final int ClearExisting

If set, clears all existing styles before applying additional ones. When combined with other style flags (e.g., {@code RichTextFontStyles#Bold}), it first resets the styles, then applies the specified ones. Without this flag, new styles are added to the existing ones.

Italic

public static final int Italic

Option that specifies italic.

Underline

public static final int Underline

Option that specifies underline.

hasFlag

public static boolean hasFlag(int flag, int flagToCheck)

Checks whether the specified flag is set.

Parameters:

ParameterTypeDescription
flagthe enum value representing the flag to check
flagToCheckthe enum value representing the flag to check

Returns: {@code true} if the flag is set; {@code false} otherwise