Share via


Método ITextDocument2::GetPreferredFont (tom.h)

Recupera a fonte preferencial para um repertório de caractere específico e uma posição de caractere.

Sintaxe

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
);

Parâmetros

[in] cp

Tipo: long

A posição do caractere para a fonte preferencial.

[in] CharRep

Tipo: long

O índice de repertório de caracteres para a fonte preferencial. Pode ser um dos seguintes valores.

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

tomMongolian

tomMyanmar

tomNewTaiLu

tomOEM

tomOgham

tomOriya

tomPC437

tomRunic

tomShiftJIS

tomSinhala

tomSylotinagr

tomSymbol

tomSyriac

tomTaiLe

tomTamil

tomTelugu

tomThaana

tomThai

tomTibetan

tomTurkish

tomUsymbol

tomVietnamese

tomYi

[in] Options

Tipo: long

As opções de fonte preferidas. A palavra de baixa ordem pode ser uma combinação dos valores a seguir.

tomIgnoreCurrentFont

tomMatchCharRep

tomMatchFontSignature

tomMatchAscii

tomGetHeightOnly

tomMatchMathFont

Se a palavra de alta ordem de Opções for tomUseTwips, as alturas da fonte serão fornecidas em twips.

[in] curCharRep

Tipo: long

O índice do repertório de caracteres atual.

[in] curFontSize

Tipo: long

O tamanho da fonte atual.

[out] pbstr

Tipo: BSTR*

O nome da fonte.

[out] pPitchAndFamily

Tipo: long*

O tom de fonte e a família.

[out] pNewFontSize

Tipo: long*

O novo tamanho da fonte.

Retornar valor

Tipo: HRESULT

Se o método for bem-sucedido, ele retornará NOERROR. Caso contrário, ele retornará um código de erro HRESULT.

Requisitos

Requisito Valor
Cliente mínimo com suporte Windows 8 [somente aplicativos da área de trabalho]
Servidor mínimo com suporte Windows Server 2012 [somente aplicativos da área de trabalho]
Plataforma de Destino Windows
Cabeçalho tom.h
DLL Msftedit.dll

Confira também

ITextDocument2