# GpFontStyle enumeration
{: .no_toc }

Specifies the style of a font. Styles can be combined.

The members combine with **Or**. **FontStyleBoldItalic** is the combination of **FontStyleBold** and **FontStyleItalic**; **FontStyleRegular** is no style at all.

| Member | Value | Description |
|:-------|:------|:------------|
| **FontStyleRegular**{: #FontStyleRegular } | `0` | Normal text. |
| **FontStyleBold**{: #FontStyleBold } | `1` | Bold text. |
| **FontStyleItalic**{: #FontStyleItalic } | `2` | Italic text. |
| **FontStyleBoldItalic**{: #FontStyleBoldItalic } | `3` | Bold and italic text. |
| **FontStyleUnderline**{: #FontStyleUnderline } | `4` | Underlined text. |
| **FontStyleStrikeout**{: #FontStyleStrikeout } | `8` | Text with a line through the middle. |

## Used by

- [**Font**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md) class: [**Style**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md#style), [constructor](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md#creating)
- [**FontFamily**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md) class: [**CellAscent**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md#cellascent), [**CellDescent**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md#celldescent), [**EmHeight**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md#emheight), [**IsStyleAvailable**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md#isstyleavailable), [**LineSpacing**](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md#linespacing)

## Example

```tb check_build check_run
Dim style As GpFontStyle = FontStyleBold Or FontStyleItalic Or FontStyleUnderline
Debug.Print style
Debug.Print (style And FontStyleBold) <> 0
Debug.Print (style And FontStyleStrikeout) <> 0
Debug.Print (style And FontStyleBoldItalic) = FontStyleBoldItalic
' Output:
' 7
' True
' False
' True
```

## See Also

- [FontStyle](https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-fontstyle) -- Microsoft's documentation of the GDI+ enumeration
- [Enumerations](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Enumerations/index.md) -- all the enumerations of the package
- [Font](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/Font.md) class
- [FontFamily](/twinBASIC-docs/tB/Packages/Contributed/GdiPlus/FontFamily.md) class
