ITextDocument2::GetPreferredFont-Methode (tom.h)

Ruft die bevorzugte Schriftart für ein bestimmtes Zeichenrepertoire und eine bestimmte Zeichenposition ab.

Syntax

HRESULT GetPreferredFont(
  [in]  long cp,
  [in]  long CharRep,
  [in]  long Options,
  [in]  long curCharRep,
  [in]  long curFontSize,
  [out] BSTR *pbstr,
  [out] long *pPitchAndFamily,
  [out] long *pNewFontSize
);

Parameter

[in] cp

Typ: long

Die Zeichenposition für die bevorzugte Schriftart.

[in] CharRep

Typ: long

Der Zeichenrepertoireindex für die bevorzugte Schriftart. Dieses Argument einen der folgenden Werte annehmen.

tomAboriginal

tomAnsi

tomArabic

tomArmenian

tomBaltic

tomBengali

tomBIG5

tomBraille

tomCherokee

tomCyrillic

tomDefaultCharRep

tomDevanagari

tomEastEurope

tomEmoji

tomEthiopic

tomGB2312

tomGeorgian

tomGreek

tomGujarati

tomGurmukhi

tomHangul

tomHebrew

tomJamo

tomKannada

tomKayahli

tomKharoshthi

tomKhmer

tomLao

tomLimbu

tomMac

tomMalayalam

tomMongolisch

tomMyanmar

tomNewTaiLu

tomOEM

tomOgham

tomOriya

tomPC437

tomRunic

tomShiftJIS

tomSinhala

tomSylotinagr

tomSymbol

tomSyriac

tomTaiLe

tomTamil

tomTelugu

tomThaana

tomThai

tomTibetan

tomTurkish

tomUsymbol

tomVietnamese

tomYi

[in] Options

Typ: long

Die bevorzugten Schriftartoptionen. Das Wort mit niedriger Ordnung kann eine Kombination aus den folgenden Werten sein.

tomIgnoreCurrentFont

tomMatchCharRep

tomMatchFontSignature

tomMatchAscii

tomGetHeightOnly

tomMatchMathFont

Wenn das Wort " Optionen " in hoher Reihenfolge tomUseTwips lautet, werden die Schrifthöhen in Twips angegeben.

[in] curCharRep

Typ: long

Der Index des aktuellen Charakterrepertoires.

[in] curFontSize

Typ: long

Der aktuelle Schriftgrad.

[out] pbstr

Typ: BSTR*

Der Name der Schriftart.

[out] pPitchAndFamily

Typ: long*

Der Schriftgrad und die Schriftfamilie.

[out] pNewFontSize

Typ: long*

Der neue Schriftgrad.

Rückgabewert

Typ: HRESULT

Wenn die Methode erfolgreich ist, gibt sie NOERROR zurück. Andernfalls wird ein Fehlercode HRESULT zurückgegeben.

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows 8 [nur Desktop-Apps]
Unterstützte Mindestversion (Server) Windows Server 2012 [nur Desktop-Apps]
Zielplattform Windows
Kopfzeile tom.h
DLL Msftedit.dll

Weitere Informationen

ITextDocument2