Does anyone knows how can I insert optional hyphen via code?
Purpose of the optional hyphen (also know as: discretionary, soft) is to mark a possible hyphenation point, 'invisible' point at which a word can be broken.
189, VK_SUBTRACT: if Changing then // Hyphen
if (wpUseHyphenation in FormatOptions) and (Shift = [ssCtrl]) then
begin
if not WPIsWordDelimiter(CPWideChar) then
begin
CPCharAttr := CPCharAttr xor cafsHyphen;
if FMemo.Cursor.active_paragraph.Reformat > 0 then
FMemo.ReformatAll;
ChangeApplied;
Memo.RePaint;
// Memo.ShowCursor;
end;
Key := 0;
end;