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

#include <MInterfaceFontInfo.h>

Inheritance diagram for InterfaceFontInfo:
CInterfaceFontInfoCInterfaceFontInfo

Public Member Functions

 InterfaceFontInfo (const InterfaceFontInfo &other)
 
 InterfaceFontInfo (const PMString &fontName, const int16 &pts, const int16 &attrs)
 
InterfaceFontInfooperator= (const InterfaceFontInfo &other)
 
int16 GetFontSize () const
 
int16 GetFontAttributes () const
 
int16 GetFontNumber () const
 
void GetMetrics (IGraphicsContext *gc, int16 &ascent, int16 &descent, int16 &leading) const
 
 InterfaceFontInfo (const InterfaceFontInfo &other)
 
 InterfaceFontInfo (const PMString &fontName, const int32 &pts, const int16 &attrs)
 
InterfaceFontInfooperator= (const InterfaceFontInfo &other)
 
int32 GetFontSize () const
 
const LOGFONT & GetLogFont () const
 
WGDIObject GetGDIObject () const
 
int16 GetFontAttributes () const
 
void GetMetrics (IGraphicsContext *gc, int16 &ascent, int16 &descent, int16 &leading) const
 
- Public Member Functions inherited from CInterfaceFontInfo
 CInterfaceFontInfo ()
 
 CInterfaceFontInfo (const PMString &fontName)
 
 CInterfaceFontInfo (const CInterfaceFontInfo &other)
 
 ~CInterfaceFontInfo ()
 
CInterfaceFontInfooperator= (const CInterfaceFontInfo &other)
 
const PMStringGetFontName () const
 
IPMFontGetFont () const
 

Additional Inherited Members

- Protected Attributes inherited from CInterfaceFontInfo
PMString fFontName
 
IPMFontfFont
 

Detailed Description

Macintosh platform specific implementation of UI font structure. Note that this can only be used with fonts that are installed in the system. Fonts in Adobe fonts folders can't be used to draw UI elements.

See Also
IUIFontSpec for the interface which allows widgets to override their default UI font.
IInterfaceFonts for the main interface to get InterfaceFontInfo from an interface font IDs
DrawStringUtils.h for the main routines that use InterfaceFontInfo

Windows platform specific implementation of UI font structure. Note that this can only be used with fonts that are installed in the system. Fonts in Adobe fonts folders can't be used to draw UI elements.

See Also
IUIFontSpec for the interface which allows widgets to override their default UI font.
IInterfaceFonts for the main interface to get InterfaceFontInfo from an interface font IDs
DrawStringUtils.h for the main routines that use InterfaceFontInfo

Member Function Documentation

int16 InterfaceFontInfo::GetFontAttributes () const

Get the font attributes. Should be one of {kInterfaceFontPlain, kInterfaceFontBold, kInterfaceFontItalic}

int16 InterfaceFontInfo::GetFontAttributes () const

Get the font attributes. Should be one of {kInterfaceFontPlain, kInterfaceFontBold, kInterfaceFontItalic}

int16 InterfaceFontInfo::GetFontNumber () const

OBSOLETE: Get the MacOS font number. Can be passed to the QuickDraw call TextFont() Return value is always kInvalidFontFamily.

int16 InterfaceFontInfo::GetFontSize () const

Get the font size, in points

int32 InterfaceFontInfo::GetFontSize () const

Get the font size, in points

WGDIObject InterfaceFontInfo::GetGDIObject () const

Get the GDI object associated with this font

const LOGFONT& InterfaceFontInfo::GetLogFont () const

Get the LOGFONT structure associated with this font

void InterfaceFontInfo::GetMetrics (IGraphicsContextgc,
int16 & ascent,
int16 & descent,
int16 & leading 
) const

Get some metrics about the font

Parameters
gcthe graphics context to use to set up drawing environment to get font information.
ascentOUT the ascent value of the font, as reported by the OS.
descentOUT the descent value of the font, as reported by the OS.
leadingOUT the leading value of the font, as reported by the OS.
void InterfaceFontInfo::GetMetrics (IGraphicsContextgc,
int16 & ascent,
int16 & descent,
int16 & leading 
) const

Get some metrics about the font

Parameters
gcthe graphics context to use to set up drawing environment to get font information.
ascentOUT the ascent value of the font, as reported by the OS.
descentOUT the descent value of the font, as reported by the OS.
leadingOUT the leading value of the font, as reported by the OS.