# FONTSTYLE

## Overview

The `FONTSTYLE` and `ISMFontStyle` components provide constants for defining font styles in Servoy, such as `PLAIN`, `BOLD`, `ITALIC`, and `BOLD_ITALIC`. These constants enable developers to customize text appearance in forms and components, streamlining font style management in scripting.

## Constants Summarized

| Type                                                     | Name                         | Summary                     |
| -------------------------------------------------------- | ---------------------------- | --------------------------- |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [BOLD](#bold)                | Bold font style.            |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [BOLD\_ITALIC](#bold_italic) | Bold and italic font style. |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [ITALIC](#italic)            | Italic font style.          |
| [Number](/reference/servoycore/dev-api/js-lib/number.md) | [PLAIN](#plain)              | Plain(normal) font style.   |

## Constants Detailed

### BOLD

Bold font style.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
var component = form.getComponent("someComponent")
component.fontType = solutionModel.createFont('Arial',SM_FONTSTYLE.BOLD,12);
```

### BOLD\_ITALIC

Bold and italic font style.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
var component = form.getComponent("someComponent")
component.fontType = solutionModel.createFont('Arial',SM_FONTSTYLE.BOLD_ITALIC,20);
```

### ITALIC

Italic font style.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
var component = form.getComponent("someComponent")
component.fontType = solutionModel.createFont('Arial',SM_FONTSTYLE.ITALIC,14);
```

### PLAIN

Plain(normal) font style.

**Type**\
[Number](/reference/servoycore/dev-api/js-lib/number.md)

**Sample**

```js
var form = solutionModel.getForm("someForm");
var component = form.getComponent("someComponent")
component.fontType = solutionModel.createFont('Arial',SM_FONTSTYLE.PLAIN,10);
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoycore/dev-api/solutionmodel/fontstyle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
