<!-- Generated by tools/SharpCell.Grid.Docs from the XML documentation comments. Do not edit; run the tool with 'generate'. -->

# GridFont

```csharp
public readonly struct GridFont
```

Namespace `SharpCell.Grid` · package `SharpCell.Grid`

A font to draw text with; the size is in pixels, not points.

## Constructors

<a id="ctor-string-double-bool-bool-bool-bool"></a>
### GridFont(string, double, bool, bool, bool, bool)

```csharp
public GridFont(string Family, double Size, bool Bold = false, bool Italic = false, bool Underline = false, bool Strikethrough = false)
```

A font to draw text with; the size is in pixels, not points.

**Parameters**

- `Family`: The font family, such as `Calibri`; a canvas falls back to its own font when the family is missing.
- `Size`: The size in device-independent pixels: 11 points are 14.67 pixels at 96 DPI.
- `Bold`: Bold text.
- `Italic`: Italic text.
- `Underline`: Underlined text.
- `Strikethrough`: Text struck through.

## Properties

<a id="bold"></a>
### Bold

```csharp
public bool Bold { get; init; }
```

Bold text.

<a id="family"></a>
### Family

```csharp
public string Family { get; init; }
```

The font family, such as `Calibri`; a canvas falls back to its own font when the family is missing.

<a id="italic"></a>
### Italic

```csharp
public bool Italic { get; init; }
```

Italic text.

<a id="size"></a>
### Size

```csharp
public double Size { get; init; }
```

The size in device-independent pixels: 11 points are 14.67 pixels at 96 DPI.

<a id="strikethrough"></a>
### Strikethrough

```csharp
public bool Strikethrough { get; init; }
```

Text struck through.

<a id="underline"></a>
### Underline

```csharp
public bool Underline { get; init; }
```

Underlined text.
