# OfficeRasterTextOptions

Shared font, layout and effect settings for raster text measurement and drawing.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OfficeRasterTextOptions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L7)

**Modifiers**

sealed

Shared font, layout and effect settings for raster text measurement and drawing.

## Inheritance

- object
- OfficeRasterTextOptions

## Remarks

Operations snapshot scalar settings and the font collection. Font and shaping providers, and the optional diagnostic sink, are retained references. Drawing mutates pixels and cancellation does not undo pixels already painted.

## Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [OfficeRasterTextOptions.Clone](/api/core/officeimo-drawing-officerastertextoptions/#method-clone)

### Accepted by parameters 3

- Method [OfficeRasterText.Draw](/api/core/officeimo-drawing-officerastertext/#method-draw-officeimo-drawing-officerasterimage-string-double-double-double-double-officeimo-officecolor-officeimo-drawing-officerastertextoptions-threading-cancellationtoken) parameter `options`
- Method [OfficeRasterText.EstimateAdditionalWorkingBytes](/api/core/officeimo-drawing-officerastertext/#method-estimateadditionalworkingbytes-int32-int32-officeimo-drawing-officerastertextoptions) parameter `options`
- Method [OfficeRasterText.Measure](/api/core/officeimo-drawing-officerastertext/#method-measure-string-officeimo-drawing-officerastertextoptions-nullable-system-double-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

`public OfficeRasterTextOptions()` [#](#constructor-ctor)

[OfficeRasterTextOptions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L7)

## Methods

`public OfficeRasterTextOptions Clone()` [#](#method-clone)

[OfficeRasterTextOptions.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L49)

Returns an independent copy of the settings and scoped font collection for a composed operation.

Returns

`OfficeRasterTextOptions`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public double FontSize { get; set; }` [#](#property-fontsize)

[OfficeRasterTextOptions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L7)

Positive finite text size in pixels.

`public string? FontFamily { get; set; }` [#](#property-fontfamily)

[OfficeRasterTextOptions.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L9)

Requested managed font family or fallback list.

`public OfficeFontStyle FontStyle { get; set; }` [#](#property-fontstyle)

[OfficeRasterTextOptions.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L11)

Existing bold, italic, underline and strikethrough style flags.

`public OfficeTrueTypeFont? Font { get; set; }` [#](#property-font)

[OfficeRasterTextOptions.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L13)

Explicit outline font; null uses the canvas default font.

`public OfficeFontFaceCollection? Fonts { get; set; }` [#](#property-fonts)

[OfficeRasterTextOptions.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L15)

Scoped managed font faces used consistently for measurement and drawing.

`public IOfficeTextShapingProvider? TextShapingProvider { get; set; }` [#](#property-textshapingprovider)

[OfficeRasterTextOptions.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L17)

Optional shaping provider supported by the shared canvas.

`public string? TextShapingLanguage { get; set; }` [#](#property-textshapinglanguage)

[OfficeRasterTextOptions.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L19)

Optional language passed to the shaping provider.

`public ICollection<OfficeImageExportDiagnostic>? DiagnosticSink { get; set; }` [#](#property-diagnosticsink)

[OfficeRasterTextOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L21)

Optional collection receiving canvas fidelity diagnostics.

`public string? DiagnosticSource { get; set; }` [#](#property-diagnosticsource)

[OfficeRasterTextOptions.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L23)

Optional source identifier attached to diagnostics.

`public OfficeTextAlignment HorizontalAlignment { get; set; }` [#](#property-horizontalalignment)

[OfficeRasterTextOptions.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L25)

Horizontal alignment in the drawing rectangle.

`public OfficeTextVerticalAlignment VerticalAlignment { get; set; }` [#](#property-verticalalignment)

[OfficeRasterTextOptions.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L27)

Vertical alignment in the drawing rectangle.

`public double LineHeight { get; set; }` [#](#property-lineheight)

[OfficeRasterTextOptions.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L29)

Positive finite multiplier of font size used for line height.

`public bool Wrap { get; set; }` [#](#property-wrap)

[OfficeRasterTextOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L31)

Wraps to the drawing width or the explicitly supplied measurement width.

`public bool Clip { get; set; }` [#](#property-clip)

[OfficeRasterTextOptions.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L33)

Clips glyphs, outline and shadow to the drawing rectangle.

`public OfficeColor? ShadowColor { get; set; }` [#](#property-shadowcolor)

[OfficeRasterTextOptions.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L35)

Optional shadow color.

`public double ShadowOffsetX { get; set; }` [#](#property-shadowoffsetx)

[OfficeRasterTextOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L37)

Finite horizontal shadow offset in pixels, rounded to the nearest pixel.

`public double ShadowOffsetY { get; set; }` [#](#property-shadowoffsety)

[OfficeRasterTextOptions.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L39)

Finite vertical shadow offset in pixels, rounded to the nearest pixel.

`public OfficeColor? OutlineColor { get; set; }` [#](#property-outlinecolor)

[OfficeRasterTextOptions.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L41)

Optional outline color.

`public double OutlineWidth { get; set; }` [#](#property-outlinewidth)

[OfficeRasterTextOptions.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.Core/Raster/OfficeRasterTextOptions.cs#L43)

Rounded coverage-expansion radius from zero through sixty-four pixels.

<!-- PowerForge markdown artifact sha256:4BDAC739DD2C455CE6ECB00E91644B739EFCC0D1C25991EFB0D5FDC8A6FF0980 -->
