![]() | InDesign SDK 20.5 |
#include <IFontMgr.h>

Classes | |
| struct | FontNameInfo |
Public Types | |
| enum | { kDefaultIID = IID_IFONTMGR } |
| enum | FontStyleBits { kNormal = 0x00, kItalic = 0x01, kBold = 0x02, kBoldItalic = 0x03, kSmallCaps = 0x04, kCapStyles = 0x04 } |
| enum | WritingDirection { kWD_LeftToRight = 0, kWD_RightToLeft, kWD_TopToBottom } |
| enum | InternalFake { kInternalFake_Not = 0x0000, kInternal_Substitution = 0x0001, kInternalFake_Smallcap = 0x0004 } |
| enum | OriginalOS { kOriginalMacOS, kOriginalWinOS, kOriginalUnknownOS } |
Public Member Functions | |
| virtual int32 | CurrentFontSystemSeed (bool16 fullCheck=kFalse, bool16 cooltypeSeedOnly=kFalse) const =0 |
| virtual void | CoolTypeShuttingDown ()=0 |
| virtual const PMString & | GetDefaultFontName ()=0 |
| virtual void | SetDefaultFontName (const PMString &s)=0 |
| virtual bool16 | IsFontAvailable (const PMString &fontname, int32 writingscript=kDontKnowScript)=0 |
| virtual bool16 | IsSuitableUIFont (IPMFont *pmFont)=0 |
| virtual IPMFont * | QueryFont (const std::string &fontName, FontStyleBits style=kNormal, int32 writingscript=kDontKnowScript, PMReal smallcapscale=0.7, InternalFake fake=kInternalFake_Not)=0 |
| virtual IPMFont * | QueryFont (const PMString &fontName, FontStyleBits style=kNormal, int32 writingscript=kDontKnowScript, PMReal smallcapscale=0.7, InternalFake fake=kInternalFake_Not)=0 |
| virtual IPMFont * | QueryFont (const IFontGroup *fontGroup, int32 index, FontStyleBits style=kNormal, PMReal smallcapscale=0.7, InternalFake fake=kInternalFake_Not)=0 |
| virtual IPMFont * | QueryFont (const CTFontDict *rawFont, InternalFake fake=kInternalFake_Not, int32 index=-1, bool16 bIsEPSFont=kFalse, bool16 bIsEmbeddedFont=kFalse, CCTEncoding *encoding=nil)=0 |
| virtual IPMFont * | QueryFont (const CTFontDict *rawFont, Fixed *designAxes, InternalFake fake=kInternalFake_Not, bool16 bIsEPSFont=kFalse, bool16 bIsEmbeddedFont=kFalse, CCTEncoding *encoding=nil)=0 |
| virtual IPMFont * | QueryFontPlatform (const PMString &fontName, FontStyleBits style, int32 ctScript=kDontKnowScript, OriginalOS os=kOriginalUnknownOS, FontNameInfo *outNameInfo=nil)=0 |
| virtual IFontInstance * | QueryFontInstance (const PMString &fontName, const PMMatrix &matrix, int32 writingscript=kDontKnowScript, WritingDirection dir=kWD_LeftToRight, FontStyleBits style=kNormal, Fixed *designV=nil, PMReal smallcapscale=0.7)=0 |
| virtual IFontInstance * | QueryFontInstance (const IPMFont *font, const PMMatrix &matrix, WritingDirection dir=kWD_LeftToRight)=0 |
| virtual IFontGroup * | QueryFontGroup (const PMString &groupName)=0 |
| virtual IFontGroup * | QueryFontGroup (int32 groupIndex)=0 |
| virtual int32 | GetNumFontGroups ()=0 |
| virtual void | IterateFontGroups (FontGroupIteratorCallBack *callBack)=0 |
| virtual void | ForceUpdateFontSystem ()=0 |
| virtual IPMFont * | FindVariant (IPMFont *basefont, FontStyleBits stylebits, PMReal smallCapScale, int32 technology)=0 |
| virtual void | MarkBadFont (CTFontDict *badFontDict)=0 |
| virtual IPMFont * | QueryFontFromDisplayName (const PMString &displayFamilyName, PMString &fontStyle)=0 |
| virtual void | AddFont (CTFontDict *dict)=0 |
| virtual void | DeleteFont (CTFontDict *dict)=0 |
| virtual std::string | GetDefaultFontPSName (int32 script=kDontKnowScript)=0 |
| virtual IWRFontContext * | GetWRFontContext () const =0 |
| virtual void | AllowPurge ()=0 |
| virtual void | DisallowPurge ()=0 |
| virtual void | AddDirectory (IDFile fontsPath)=0 |
| virtual void | RemoveUnusedFontsFromCache ()=0 |
| virtual ActionID | IterateTypeQuestFonts (const ActionID lastLocalActionID, IFontMenuData *fontMenuData)=0 |
| virtual HarfbuzzCooltype * | GetHarfbuzzFontAccess ()=0 |
| virtual bool16 | AddCustomOTVarInstance (IFontGroup *fontGroup, const Fixed *designAxis)=0 |
| virtual bool16 | HasExtraDefaultVariableFont (CTFontDict *dict) const =0 |
| virtual void | GetDefaultVariableFontName (PMString &fontName, CTFontDict *dict) const =0 |
| virtual IPMFont * | QueryVariableFont (const IFontGroup *fontGroup, const PMString &styleName) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Manager for fonts. CoolType is for Adobe Internal use only. All PMStrings used in IFontMgr are expected to not be translatable. If you create a PMString to pass to IFontMgr you sould set it to no translate.
| pure virtual |
Adds a font to the font set that this FontMgr manages. Each document has its own FontMgr now.
| pure virtual |
Internal Use only
| pure virtual |
Called on application quit to clean up.
| pure virtual |
returns current seed – use this to detect changes
| fullCheck | causes cooltype to check the system for font changes. |
| cooltypeSeedOnly | returns only cooltype seed. cooltype seed only changes when the font list has changed. The other seed changes when opening a document with missing fonts that are now present. |
| pure virtual |
Given a base font, find a styled variant.
| basefont | font to find variant of |
| stylebits | style bits |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| technology | use -1 for any technology |
| pure virtual |
Forces an update and re-initializes the Font Manager
| pure virtual |
Gets postscript name of default font
| pure virtual |
Gets postscript name of default font.
| ctScript | Can be any of the writing scripts. If kDontKnowScript is given, the default script for the current locale is used. values for script can be found in SDKDef.h |
| pure virtual |
Internal Use only Given a variable font dict, returns the font name of the default font instance in fontName.
| pure virtual |
Returns the number of font groups installed
| pure virtual |
Gets world ready font context
| pure virtual |
Internal Use only Returns True if a variable font dictionary has a default font instance, that is not the same as one of the named instances. For non-variable fonts, always returns False.
| pure virtual |
Returns whether a postscript font name is installed. checks that FontStatus() == IPMFont::kFontInstalled
| fontname | postscript font name to check |
| writingscript | here for completeness and is passed into QueryFont but I think it has no purpose. Recommend to use default parameter of kDontKnowScript. |
| pure virtual |
Returns whether an IPMFont is installed and suitable for general content display.
| pmFont | font instance to check |
| pure virtual |
Iterate over font groups, calling back into FontGroupIteratorCallBack...
| callBack |
| pure virtual |
Mark a font dict as bad. Most likely because font dict has errors and could crash
| badFontDict | cooltype dictionary to mark bad |
| pure virtual |
Retrieve a font using a postscript name, may return nil for fonts not found
| fontName | postscript font name |
| style | font style bits |
| writingscript | writing script will be used if font is not found to find an appropriate substitute. values for script can be found in SDKDef.h |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| fake | passing in kInternal_Substitution forces resulting IPMFont to be missing even if postscript name font is installed. Calling GetFontStatus on the IPMFont will return IPMFont::kFontSubstituted |
| pure virtual |
Retrieve a font using a postscript name, may return nil for fonts not found
| fontName | postscript font name |
| style | font style bits |
| writingscript | writing script will be used if font is not found to find an appropriate substitute. values for script can be found in SDKDef.h |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| fake | passing in kInternal_Substitution forces resulting IPMFont to be missing even if postscript name font is installed. Calling GetFontStatus on the IPMFont will return IPMFont::kFontSubstituted |
| pure virtual |
Retrieve a font using IFontGroup and font style index, may return nil for fonts not found
| fontGroup | font group |
| index | font style index |
| style | font style bits |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| fake | passing in kInternal_Substitution forces resulting IPMFont to be missing even if postscript name font is installed. Calling GetFontStatus on the IPMFont will return IPMFont::kFontSubstituted |
| pure virtual |
this method useful for converting raw CoolType fonts into InDesign style fonts
| rawFont | CoolType font dictionary |
| fake | passing in kInternal_Substitution forces resulting IPMFont to be missing even if postscript name font is installed. Calling GetFontStatus on the IPMFont will return IPMFont::kFontSubstituted |
| index | index of font style (Named Instance of variable font dict) in dictionary. Used in case of variable fonts as in variable fonts single dictionary can contain multiple styles. otherwise use -1. |
| bIsEPSFont | |
| bIsEmbeddedFont | |
| encoding |
| pure virtual |
this method useful for converting raw CoolType fonts into InDesign style fonts
| rawFont | CoolType font dictionary |
| designAxes | design axis of required variable font in rawFont (CTFontDict). if nullptr passed then Default face of font is applied. |
| fake | passing in kInternal_Substitution forces resulting IPMFont to be missing even if postscript name font is installed. Calling GetFontStatus on the IPMFont will return IPMFont::kFontSubstituted |
| bIsEPSFont | |
| bIsEmbeddedFont | |
| encoding |
| pure virtual |
Finds a font given a display family name and font style.
| displayFamilyName | family name as it shows in the menu |
| fontStyle | style of font to find |
| pure virtual |
retrieve a font group
| groupName | known as group name or family name. can be either native or non native. if more than one group with same name this returns the first one found. Calling IFontGroup->GetGroupsWithSameName will return other groups with same name. |
| pure virtual |
retrieve a font group
| groupIndex | index of group. must be less than GetNumFontGroups |
| pure virtual |
retrieve an instance of a font, will return nil for non-existant fonts
| fontName | postscript font name |
| matrix | This matrix describes the user space to device space transformation for the characters. Note that: 1. Only the first 4 values of the matrix are used. The x and y translation are ignored (it is a 2 x 2 matrix). 2. The matrix is treated as the entire user space to device space matrix (it will not be concatenated with any "current transformation matrix" before being used). matrix(12.0, 0.0, 0.0, 12.0, 0.0, 0.0) is a 12 point font instance |
| writingscript | writing script will be used if font is not found to find an appropriate substitute. values for script can be found in SDKDef.h |
| dir | writing direction |
| style | font style bits |
| designV | for multiple master font. Same as IPMFont GetNumDesignAxes |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| pure virtual |
retrieve an instance of a font, will return nil for non-existant fonts
| font | font to get instance for |
| matrix | This matrix describes the user space to device space transformation for the characters. Note that: 1. Only the first 4 values of the matrix are used. The x and y translation are ignored (it is a 2 x 2 matrix). 2. The matrix is treated as the entire user space to device space matrix (it will not be concatenated with any "current transformation matrix" before being used). matrix(12.0, 0.0, 0.0, 12.0, 0.0, 0.0) is a 12 point font instance |
| dir | writing direction |
| pure virtual |
this method is for getting InDesign fonts from edge information. If nameInfo is non nil it will be filled with info on the font. In the case that the font is installed this info is obtained from the font. In the case that the font does not exist on the system then we try to obtain this info from the FontNames.db file. outNameInfo->fFontInfoSet is set to kTrue if this info was successfully filled out.
| fontName | platform font name |
| style | font style bits |
| ctScript | Can be any of the writing scripts. If kDontKnowScript is given, the first match for a given operating system is returned. values for script can be found in SDKDef.h |
| os | operating system the platform font name came from |
| outNameInfo | OUT font information for the platform name |
| pure virtual |
Returns variable font based on Font Group and Style Name
| fontGroup | font group |
| style | Style Name |
| pure virtual |
Sets default font name. This sets the text default font this font is used in many places. DO NOT CHANGE this unless you really know what you are doing. This code will only allow you to set a font that is available and not corrupt (a bad font).
| s | postscript name of font to set as default |