Foxit PDF RDK

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RichTextStyle Class Reference

## Public Member Functions
| constructor ()
| Constructor.
| constructor (font, text_size, text_alignment, text_color, is_bold, is_italic, is_underline, is_strikethrough, mark_style)
| Constructor, with parameters. More...
| Set (font, text_size, text_alignment, text_color, is_bold, is_italic, is_underline, is_strikethrough, mark_style)
| Set value. More...

## Public Attributes
| font
| A font used in rich text style. It should be a valid font object. More...
| is_bold
| A boolean value which indicates whether to make text bold or not.
| is_italic
| A boolean value which indicates whether to italicize text or not.
| is_strikethrough
| A boolean value which indicates whether to cross text out with strike through or not.
| is_underline
| A boolean value which indicates whether to underline text or not.
| mark_style
| Corner mark style. Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from RichTextStyle.e_CornerMarkNone and this should be one of these values.
| text_alignment
| Alignment value. Please refer to values starting from e_AlignmentLeft and this should be one of these values.
| text_color
| Text color. Format: 0xRRGGBB.
| text_size
| Text size. It should not be negative value. 0 means text will not be shown.

## Static Public Attributes
static | e_CornerMarkNone
| Enumeration for corner mark style. More...
static | e_CornerMarkSubscript
| Corner mark style: subscript.
static | e_CornerMarkSuperscript
| Corner mark style: superscript.

## Detailed Description

This class represents rich text style data, which is used to specify the style of rich text.

## Member Function Documentation

## ◆ constructor()

RichTextStyle.constructor | ( | font | ,
|  | text_size | ,
|  | text_alignment | ,
|  | text_color | ,
|  | is_bold | ,
|  | is_italic | ,
|  | is_underline | ,
|  | is_strikethrough | ,
|  | mark_style |
| ) |  |

Constructor, with parameters.

Parameters

  [in] | font | A valid font object.
  [in] | text_size | Text size. It should not be negative value. 0 means text will not be shown.
  [in] | text_alignment | Alignment value. Please refer to values starting from e_AlignmentLeft and this should be one of these values.
  [in] | text_color | Text color. Format: 0xRRGGBB.
  [in] | is_bold | A boolean value which indicates whether to make text bold or not.
  [in] | is_italic | A boolean value which indicates whether to italicize text or not.
  [in] | is_underline | A boolean value which indicates whether to underline text or not.
  [in] | is_strikethrough | A boolean value which indicates whether to cross text out with strike through or not.
  [in] | mark_style | Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from RichTextStyle.e_CornerMarkNone and this should be one of these values.

## ◆ Set()

RichTextStyle.Set | ( | font | ,
|  | text_size | ,
|  | text_alignment | ,
|  | text_color | ,
|  | is_bold | ,
|  | is_italic | ,
|  | is_underline | ,
|  | is_strikethrough | ,
|  | mark_style |
| ) |  |

Set value.

Parameters

  [in] | font | A valid font object.
  [in] | text_size | Text size. It should not be negative value. 0 means text will not be shown.
  [in] | text_alignment | Alignment value. Please refer to values starting from e_AlignmentLeft and this should be one of these values.
  [in] | text_color | Text color. Format: 0xRRGGBB.
  [in] | is_bold | A boolean value which indicates whether to make text bold or not.
  [in] | is_italic | A boolean value which indicates whether to italicize text or not.
  [in] | is_underline | A boolean value which indicates whether to underline text or not.
  [in] | is_strikethrough | A boolean value which indicates whether to cross text out with strike through or not.
  [in] | mark_style | Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. Please refer to values starting from RichTextStyle.e_CornerMarkNone and this should be one of these values.

Returns
  None.

## Member Data Documentation

## ◆ e_CornerMarkNone

RichTextStyle.e_CornerMarkNone
| static

Enumeration for corner mark style.

Values of this enumeration should be used alone.

Corner mark style: none.

## ◆ font

RichTextStyle.font

A font used in rich text style. It should be a valid font object.

- When current style is used to set a rich text or add/insert a new rich text, this font means "user expects to use this font for a rich text". Then during resetting appearance process, Foxit PDF SDK will check if the expected font is suitable and decide to use it or change to a more suitable font for showing text content.
- When current style is retrieved from a rich text, this font represents the used font of a rich text.