# Style Class

> Provides access to data about fonts, font sizes, and colors used in a word.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class Style
```

**Namespace:** `datalogics_interface`

## Description

Provides access to data about fonts, font sizes, and colors used in a word.

**Referenced by:** [`StyleTransition`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/StyleTransition.md)

**Uses types:** [`Color`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)

## Constructors

### Style

```cpp
datalogics_interface::Style::Style(Style &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`Style &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md))

### ~Style

```cpp
datalogics_interface::Style::~Style()
```

*destructor*

## Methods

### get_color

```cpp
std::unique_ptr< Color > datalogics_interface::Style::get_color() const
```

**Returns:** [`std::unique_ptr< Color >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Color.md)

The Color associated with this style.

Gets the style's color.

### get_font_name

```cpp
std::string datalogics_interface::Style::get_font_name() const
```

**Returns:** `std::string`

The font name as a string.

Gets the name of the style's font.

### get_font_size

```cpp
double datalogics_interface::Style::get_font_size() const
```

**Returns:** `double`

The font size for this style, in points.

Gets the style's font size.

### operator=

```cpp
Style & datalogics_interface::Style::operator=(Style &&) noexcept
```

**Parameters**

- (unnamed) ([`Style &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md))

**Returns:** [`Style &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Style.md)

### to_string

```cpp
std::string datalogics_interface::Style::to_string() const
```

**Returns:** `std::string`

A string in the format "[color=..., fontsize=...,
fontname=...]".

Returns a string representing the Style's value.

The returned value indicates the color, font, and font size of the style.
