SetTextFlowHyphenation
Text, layout
Description
Enables or disables language-aware automatic hyphenation and sets the minimum visible characters retained on each side of a break
Syntax
Delphi
Function TPDFlib.SetTextFlowHyphenation(FlowID, Enable, MinPrefix, MinSuffix: Integer): Integer;ActiveX
Function PDFlib::SetTextFlowHyphenation(FlowID As Long, Enable As Long, MinPrefix As Long, MinSuffix As Long) As LongDLL
int DLSetTextFlowHyphenation(int InstanceID, int FlowID, int Enable, int MinPrefix, int MinSuffix);Parameters
| FlowID | TextFlow handle returned by NewTextFlow |
|---|---|
| Enable | 0 disables automatic language rules; any other value enables them |
| MinPrefix | Minimum visible characters before a break, from 1 through 16 |
| MinSuffix | Minimum visible characters after a break, from 1 through 16 |
Return values
Returns 1 when the settings are accepted, or 0 for an invalid flow, range, or unsupported language while enabling
Remarks
Soft hyphen characters take precedence over automatic language rules and remain discretionary when automatic hyphenation is disabled
A hyphen-minus is drawn only when the corresponding discretionary break is selected; the retained source text is not modified
Line measurement and drawing use the same break path, so repeated measurement does not advance the flow and drawing resumes at the exact source position
See also
GetTextFlowHyphenation, SetTextFlowLanguage, MeasureTextFlow, DrawTextFlow