IVsFontAndColorStorage.GetFont(LOGFONTW[], FontInfo[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.