PdfPatternHyphenator Class
Hyphenates the words with the hyphenation patterns of a language, loaded by Hyphenator.
public sealed class PdfPatternHyphenator : IPdfHyphenatorRemarks
No pattern is included in the library: the hyph-utf8 project of the TeX community publishes patterns for many languages, each under its own license.
- Implements
Constructors
| Name | Description |
|---|---|
| PdfPatternHyphenator(Hyphenator) | Initializes a new instance of the PdfPatternHyphenator class. |
PdfPatternHyphenator(Hyphenator)
PdfPatternHyphenator.csInitializes a new instance of the PdfPatternHyphenator class.
public PdfPatternHyphenator(Hyphenator hyphenator)Parameters
hyphenatorHyphenator- The patterns of the language.
Properties
| Name | Description |
|---|---|
| Hyphenator | Gets the patterns of the language. |
Hyphenator
PdfPatternHyphenator.csMethods
| Name | Description |
|---|---|
| Hyphenate(ReadOnlySpan<char>, Span<int>) | Finds the positions where a word can be hyphenated. |
Hyphenate(ReadOnlySpan<char>, Span<int>)
PdfPatternHyphenator.csFinds the positions where a word can be hyphenated.
public int Hyphenate(ReadOnlySpan<char> word, Span<int> breakPositions)Parameters
wordReadOnlySpan<char>- The word: the letters and the combining marks of the text, without the punctuation and the spaces around it.
breakPositionsSpan<int>- The buffer that receives the positions, in increasing order: a position is the index of the UTF-16 code unit of
wordbefore which a hyphen can be inserted. Its length is the length of the word.
Returns
int The number of positions written; 0 when the word cannot be hyphenated.