InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
WFontContext Class Reference

#include <WFontContext.h>

Public Member Functions

 WFontContext (const IGraphicsContext *gc, const InterfaceFontInfo &fontInfo)
 
 WFontContext (HDC dc, const InterfaceFontInfo &fontInfo)
 
void SetFont (const InterfaceFontInfo &fontInfo)
 

Detailed Description

Utility class for setting & restoring a UI font into an HDC. This object is intended to be declared on the stack. This object will restore the previous font in the HDC when it goes out of scope.

Constructor & Destructor Documentation

WFontContext::WFontContext (const IGraphicsContextgc,
const InterfaceFontInfofontInfo 
)

Constructor using a graphics context. This class will get the HDC from the graphics context, and set the font for that HDC