# Class: Text

## Text

Set text style for vector features.

#### new ol.style.Text(opt_options) experimental

src/ol/style/textstyle.js, line 13

  Name | Type | Description
  --- | --- | ---
  `options` | optional Options.
  Name | Type | Description
  --- | --- | ---
  `font` | string | undefined | optional Font.
  `offsetX` | number | undefined | optional Horizontal text offset in pixels. A positive will shift the text right. Default is `0`.
  `offsetY` | number | undefined | optional Vertical text offset in pixels. A positive will shift the text down. Default is `0`.
  `scale` | number | undefined | optional Scale.
  `rotation` | number | undefined | optional Rotation.
  `text` | string | undefined | optional Text.
  `textAlign` | string | undefined | optional Text alignment.
  `textBaseline` | string | undefined | optional Text base line.
  `fill` | ol.style.Fill | undefined | optional Fill style.
  `stroke` | ol.style.Stroke | undefined | optional Stroke style.

### Methods

#### getFill(){ol.style.Fill} experimental

src/ol/style/textstyle.js, line 108

  ##### Returns:

  Fill style.

#### getFont(){string|undefined} experimental

src/ol/style/textstyle.js, line 83

  ##### Returns:

  Font.

#### getRotation(){number|undefined} experimental

src/ol/style/textstyle.js, line 117

  ##### Returns:

  Rotation.

#### getScale(){number|undefined} experimental

src/ol/style/textstyle.js, line 126

  ##### Returns:

  Scale.

#### getStroke(){ol.style.Stroke} experimental

src/ol/style/textstyle.js, line 135

  ##### Returns:

  Stroke style.

#### getText(){string|undefined} experimental

src/ol/style/textstyle.js, line 144

  ##### Returns:

  Text.

#### getTextAlign(){string|undefined} experimental

src/ol/style/textstyle.js, line 153

  ##### Returns:

  Text align.

#### getTextBaseline(){string|undefined} experimental

src/ol/style/textstyle.js, line 162

  ##### Returns:

  Text baseline.