GpFontStyle enumeration
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 | 0 | Normal text. |
| FontStyleBold | 1 | Bold text. |
| FontStyleItalic | 2 | Italic text. |
| FontStyleBoldItalic | 3 | Bold and italic text. |
| FontStyleUnderline | 4 | Underlined text. |
| FontStyleStrikeout | 8 | Text with a line through the middle. |
Used by
- Font class: Style, constructor
- FontFamily class: CellAscent, CellDescent, EmHeight, IsStyleAvailable, LineSpacing
Example
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 – Microsoft’s documentation of the GDI+ enumeration
- Enumerations – all the enumerations of the package
- Font class
- FontFamily class