# Sandbox.TextStyle

Text settings for Painter.

- Kind: struct
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Modifiers: sealed

## Constructors

- [`TextStyle`](/api/Sandbox.TextStyle/.ctor): Creates TextStyle.Default: white, 16px Roboto with normal weight and top-left alignment. Unlike default(TextStyle), this constructor initializes the font and layout settings.

## Properties

- [`Alignment`](/api/Sandbox.TextStyle/Alignment): Alignment and layout flags used within the destination rectangle.
- [`Color`](/api/Sandbox.TextStyle/Color): Text color. Its alpha combines with drawing and panel opacity.
- [`Default`](/api/Sandbox.TextStyle/Default): White, 16px Roboto with normal weight and top-left alignment.
- [`FontName`](/api/Sandbox.TextStyle/FontName): Font family, with the engine's usual fallback for unavailable fonts.
- [`FontSize`](/api/Sandbox.TextStyle/FontSize): Font size in pixels, scaled by the panel's ScaleToScreen.
- [`FontWeight`](/api/Sandbox.TextStyle/FontWeight): Font weight from 1 to 1000. Normal is 400, bold is 700.
- [`Italic`](/api/Sandbox.TextStyle/Italic): Use an italic face.
- [`LetterSpacing`](/api/Sandbox.TextStyle/LetterSpacing): Additional spacing between letters, in pixels before ScaleToScreen.
- [`LineHeight`](/api/Sandbox.TextStyle/LineHeight): Line height multiplier, where 1 uses the font's normal line height.
- [`Outline`](/api/Sandbox.TextStyle/Outline): One outline, with stroke width in pixels before ScaleToScreen. Disabled by default.
- [`Shadow`](/api/Sandbox.TextStyle/Shadow): One drop shadow, with blur and offset in pixels before ScaleToScreen. Disabled by default.
- [`WordSpacing`](/api/Sandbox.TextStyle/WordSpacing): Additional spacing between words, in pixels before ScaleToScreen.

## Methods

- [`WithAlignment`](/api/Sandbox.TextStyle/WithAlignment): Returns a copy with alignment and layout flags for the destination rectangle.
- [`WithBold`](/api/Sandbox.TextStyle/WithBold): Returns a copy with bold (700) or normal (400) weight.
- [`WithColor`](/api/Sandbox.TextStyle/WithColor): Returns a copy with a text color. Alpha applies to the text and its effects together.
- [`WithFont`](/api/Sandbox.TextStyle/WithFont)
- [`WithItalic`](/api/Sandbox.TextStyle/WithItalic): Returns a copy with italic enabled or disabled.
- [`WithLetterSpacing`](/api/Sandbox.TextStyle/WithLetterSpacing): Returns a copy with additional spacing between letters, in pixels before ScaleToScreen.
- [`WithLineHeight`](/api/Sandbox.TextStyle/WithLineHeight): Returns a copy with a line-height multiplier.
- [`WithOutline`](/api/Sandbox.TextStyle/WithOutline)
- [`WithoutOutline`](/api/Sandbox.TextStyle/WithoutOutline): Returns a copy without its outline.
- [`WithoutShadow`](/api/Sandbox.TextStyle/WithoutShadow): Returns a copy without its drop shadow.
- [`WithShadow`](/api/Sandbox.TextStyle/WithShadow)
- [`WithSize`](/api/Sandbox.TextStyle/WithSize): Returns a copy with a font size in pixels before ScaleToScreen.
- [`WithWeight`](/api/Sandbox.TextStyle/WithWeight): Returns a copy with a font weight from 1 to 1000.
- [`WithWordSpacing`](/api/Sandbox.TextStyle/WithWordSpacing): Returns a copy with additional spacing between words, in pixels before ScaleToScreen.
