# OfficeTextHyphenationLexicon

Immutable, dependency-free dictionary of explicit word hyphenation points shared by OfficeIMO renderers.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeTextHyphenation.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L15)

**Modifiers**

sealed

Immutable, dependency-free dictionary of explicit word hyphenation points shared by OfficeIMO renderers.

## Inheritance

- object
- OfficeTextHyphenationLexicon

Filter members 

Show inherited

## Constructors

`public OfficeTextHyphenationLexicon(IEnumerable<string> hyphenatedWords, char breakMarker = '-', int minimumPrefixLength = 2, int minimumSuffixLength = 2)` [#](#constructor-ctor-collections-generic-ienumerable-system-string-char-int32-int32)

[OfficeTextHyphenation.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L15)

Creates a case-insensitive dictionary from words such as typog-ra-phy.

Parameters

**hyphenatedWords System.Collections.Generic.IEnumerable<string> required**

**breakMarker char = '-' optional**

**minimumPrefixLength int = 2 optional**

**minimumSuffixLength int = 2 optional**

## Methods

`public OfficeTextHyphenationCallback AsCallback()` [#](#method-ascallback)

[OfficeTextHyphenation.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L59)

Creates the callback shape consumed by renderer options.

Returns

`OfficeTextHyphenationCallback`

`public bool Contains(string token)` [#](#method-contains-string)

[OfficeTextHyphenation.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L54)

Returns true when the normalized word is present.

Parameters

**token string required**

Returns

`bool`

`public IReadOnlyList<int> GetBreakpoints(string token)` [#](#method-getbreakpoints-string)

[OfficeTextHyphenation.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L48)

Returns preferred UTF-16 break positions for a word.

Parameters

**token string required**

Returns

`IReadOnlyList<int>`

## 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 char BreakMarker { get; }` [#](#property-breakmarker)

[OfficeTextHyphenation.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L35)

Marker removed from source entries.

`public int MinimumPrefixLength { get; }` [#](#property-minimumprefixlength)

[OfficeTextHyphenation.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L38)

Minimum UTF-16 length retained before a break.

`public int MinimumSuffixLength { get; }` [#](#property-minimumsuffixlength)

[OfficeTextHyphenation.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L41)

Minimum UTF-16 length retained after a break.

`public int Count { get; }` [#](#property-count)

[OfficeTextHyphenation.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/OfficeTextHyphenation.cs#L44)

Number of normalized words in the dictionary.

<!-- PowerForge markdown artifact sha256:CD1C9B47B8225CC826521CA62DF07A05AAF47ADE32FD97069B40E02A44CE560C -->
