Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeTextHyphenationLexicon

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

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

Inheritance

  • object
  • OfficeTextHyphenationLexicon

Constructors

public OfficeTextHyphenationLexicon(IEnumerable<string> hyphenatedWords, char breakMarker = '-', int minimumPrefixLength = 2, int minimumSuffixLength = 2) #

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() #

Creates the callback shape consumed by renderer options.

public bool Contains(string token) #

Returns true when the normalized word is present.

Parameters

token string required

Returns

bool
public IReadOnlyList<int> GetBreakpoints(string token) #

Returns preferred UTF-16 break positions for a word.

Parameters

token string required

Returns

IReadOnlyList<int>

Properties

public char BreakMarker { get; } #

Marker removed from source entries.

public int MinimumPrefixLength { get; } #

Minimum UTF-16 length retained before a break.

public int MinimumSuffixLength { get; } #

Minimum UTF-16 length retained after a break.

public int Count { get; } #

Number of normalized words in the dictionary.