API Reference
PdfHyphenationLexicon
Immutable, dependency-free dictionary of language-specific word hyphenation points.
Inheritance
- Object
- PdfHyphenationLexicon
Remarks
Entries use an explicit marker, for example typog-ra-phy. The marker is removed from lookup text and its UTF-16 position becomes a preferred generated-PDF line break. Dictionary data remains caller-owned, so applications can ship only the languages they use.
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters
Constructors
public PdfHyphenationLexicon(IEnumerable<String> hyphenatedWords, Char breakMarker = '-', Int32 minimumPrefixLength = 2, Int32 minimumSuffixLength = 2) #Creates a case-insensitive hyphenation dictionary from marked words.
Parameters
- hyphenatedWords System.Collections.Generic.IEnumerable{System.String}
- Words containing one or more explicit break markers.
- breakMarker System.Char = '-'
- Marker removed from entries and converted into a break position.
- minimumPrefixLength System.Int32 = 2
- Minimum UTF-16 word length retained before a break.
- minimumSuffixLength System.Int32 = 2
- Minimum UTF-16 word length retained after a break.
Methods
public PdfTextHyphenationCallback AsCallback() #PdfTextHyphenationCallbackCreates the callback shape consumed by PdfTextHyphenationCallback).
public Boolean Contains(String token) #BooleanReturns true when the normalized word is present.
Parameters
- token System.String
public IReadOnlyList<Int32> GetBreakpoints(String token) #IReadOnlyList<Int32>Returns preferred UTF-16 break positions for a word, or an empty list when it is not present.
Parameters
- token System.String
Inherited Methods
Properties
public Char BreakMarker { get; } #Marker used by the source dictionary.
public Int32 MinimumPrefixLength { get; } #Minimum UTF-16 length retained before each returned break.
public Int32 MinimumSuffixLength { get; } #Minimum UTF-16 length retained after each returned break.
public Int32 Count { get; } #Number of normalized words in the dictionary.