次の方法で共有


IVsFontAndColorStorage.GetFont(LOGFONTW[], FontInfo[]) Method

Definition

Returns the font attributes for the currently open Category.

public:
 int GetFont(cli::array <Microsoft::VisualStudio::Shell::Interop::LOGFONTW> ^ pLOGFONT, cli::array <Microsoft::VisualStudio::Shell::Interop::FontInfo> ^ pInfo);
int GetFont(std::Array <Microsoft::VisualStudio::Shell::Interop::LOGFONTW> const & pLOGFONT, std::Array <Microsoft::VisualStudio::Shell::Interop::FontInfo> const & pInfo);
public int GetFont (Microsoft.VisualStudio.Shell.Interop.LOGFONTW[] pLOGFONT, Microsoft.VisualStudio.Shell.Interop.FontInfo[] pInfo);
abstract member GetFont : Microsoft.VisualStudio.Shell.Interop.LOGFONTW[] * Microsoft.VisualStudio.Shell.Interop.FontInfo[] -> int
Public Function GetFont (pLOGFONT As LOGFONTW(), pInfo As FontInfo()) As Integer

Parameters

pLOGFONT
LOGFONTW[]

[in, out] Reference to a LOGFONTW structure.

pInfo
FontInfo[]

[in, out] Reference to a FontInfo enumeration.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsFontAndColorStorage::GetFont(  
   [in, out] LOGFONTW *pLOGFONT,  
   [in, out] FontInfo *pInfo  
);  

Either pLOGFONT or pInfo may be NULL (C++) or null (C#). The only data retrieved is the face name, character set, and point size.

In C++, the face name is a BSTR that must be freed by the client.

It is up to applications rendering text to the Visual Studio environment to update their display to match the settings returned by this method.

Applies to