InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMissingFontSignalData Class Referenceabstract

#include <IMissingFontSignalData.h>

Inheritance diagram for IMissingFontSignalData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMISSINGFONTSIGNALDATA }
 

Public Member Functions

virtual void SetFontByPSName (const PMString &fontName, IFontMgr::FontStyleBits styleBits, int32 writingScript, PMReal smallCapScale, bool16 forceFake)=0
 
virtual const PMStringGetFontPSName () const =0
 
virtual IFontMgr::FontStyleBits GetStyleBits () const =0
 
virtual int32 GetWritingScript () const =0
 
virtual PMReal GetSmallCapScale () const =0
 
virtual bool16 GetForceFake () const =0
 
virtual void SetResult (IPMFont *result)=0
 
virtual IPMFontGetResult () const =0
 
virtual bool16 HaveResult () const =0
 
virtual void ClearResult ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IMissingFontSignalData When the Font Manager cannot find a matching font in response to IFontMgr::QueryFont (...), it signals all responders of type kMissingFontSignalResponderService (see FontMgrID.h). This gives interested parties a chance to supply a suitable substitute or to acquire the font from somewhere else. A missing font responder's "Respond" method should query its Signal Manager for an interface of type IMissingFontSignalData, with an IID of IID_IMISSINGFONTSIGNALDATA. It should ask whether someone has already supplied a result by calling HaveResult(). If HaveResult() returns false then the responder is free to supply its own result. It asks the IMissingFontSignalData interface for information about the requested font using the various "Get" methods. If it can fulfill the request for a font, it supplies it to the Font Manager by calling SetResult.

See Also
IFontMgr, ISignalMgr, IResponder

Member Function Documentation

virtual void IMissingFontSignalData::ClearResult ()
pure virtual

Tell the IMissingFontSignalData to discard any SetResult information. Subsequent calls to GetResult() will return kFalse.

virtual const PMString& IMissingFontSignalData::GetFontPSName () const
pure virtual

Retrieve the PostScript name of the font that the Font Manager is looking for.

Returns
PMString & The PostScript name of the font the Font Manager is looking for. Notice that this is a PMString REFERENCE, so copy it somewhere if you intend to use it outside of the scope in which you acquire it.
virtual bool16 IMissingFontSignalData::GetForceFake () const
pure virtual

Retrieve the "force fake" flag.

Returns
bool16 If this flag is set then the font is intended to serve as a substitute font.
virtual IPMFont* IMissingFontSignalData::GetResult () const
pure virtual

Retrieve the last font set through the SetResult method. Normally only used by the Font Manager.

Returns
IPMFont * The font supplied by a responder as a suitable representative of the font needed by the Font manager. Recipient must Release() the IPMFont * when done with it.
virtual PMReal IMissingFontSignalData::GetSmallCapScale () const
pure virtual

Retrieve the scale factor of the small caps synthesis. This is only relevant if FontStyleBits contains kSmallCaps.

Returns
PMReal What to multiply full-sized characters by to synthesize small caps.
virtual IFontMgr::FontStyleBits IMissingFontSignalData::GetStyleBits () const
pure virtual

Retrieve the style bits describing characteristics of the font that the Font Manager is looking for.

Returns
FontStyleBits Whether book, italic, bold, etc. See IFontMgr.
virtual int32 IMissingFontSignalData::GetWritingScript () const
pure virtual

Retrieve the writing script that the font has been created to serve. Values for script can be found in SDKDef.h

Returns
int32 Which writing script (kSDKRomanScript, kSDKJapaneseScript, etc.) the needed font serves.
virtual bool16 IMissingFontSignalData::HaveResult () const
pure virtual

Tells whether any responder fulfilled the request for a font.

Returns
bool16 Return kTrue if any responder called "SetResult".
virtual void IMissingFontSignalData::SetFontByPSName (const PMStringfontName,
IFontMgr::FontStyleBits styleBits,
int32 writingScript,
PMReal smallCapScale,
bool16 forceFake 
)
pure virtual

Supply the information needed to specify the font. Normally this should not be called by responders, but only by the Font Manager.

Parameters
fontNameIN: The PostScript name of the needed font.
styleBitsIN: Whether book, italic, bold, etc.
writingScriptIN: Whether Roman, Cyrillic, Japanese, etc. Values for script can be found in SDKDef.h.
smallCapScaleIN: When styleBits specifies kSmallCaps, smallCapScale supplies the scale factor.
forceFakeIN: Signals that the intended font should be a substitution font (IFontMgr::kInternal_Substitution)
virtual void IMissingFontSignalData::SetResult (IPMFontresult)
pure virtual

If the responder is able to fulfill the request, it should notify the Font Manager via SetResult.

Parameters
resultAn IPMFont that fulfills the Font Manager's request for a font as described by the "Get" methods. The recipient owns the IMPFont pointer and will dereference it when no longer needed.