SetTextFlowLanguage

文字、版面

描述

設定 TextFlow 選擇選擇性斷詞時使用的主要語言

語法

Delphi

Function TPDFlib.SetTextFlowLanguage(FlowID: Integer; Const Language: WideString): Integer;

ActiveX

Function PDFlib::SetTextFlowLanguage(FlowID As Long, Language As String) As Long

DLL

int DLSetTextFlowLanguage(int InstanceID, int FlowID, const wchar_t* Language);

參數

FlowIDNewTextFlow 傳回的 TextFlow 控制代碼
LanguageBCP 47 語言標籤;空字串表示清除語言設定

傳回值

文字流與語言語法有效時傳回 1,否則傳回 0

備註

主要標籤正規化為小寫,並去除地區或文字子標籤後保留

自動連字支援 en、de、nl、fr、es、it、pt、ru 與 tr

新建的 TextFlow 會繼承文件 Catalog 的 /Lang 值,主要語言受支援時啟用自動連字

設定不受支援但語法有效的主要標籤會停用自動連字,自由軟連字符仍可使用

另見

GetTextFlowLanguage, SetTextFlowHyphenation, NewTextFlow