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

Classes | |
| struct | FontFaceMappingInfo |
Public Types | |
| enum | { kDefaultIID = IID_IFONTFAMILY } |
Public Member Functions | |
| virtual void | SetFamilyName (const PMString &familyName, const PMString &familyNameNative, bool16 missing, const FontEntry *fontEntry=nil)=0 |
| virtual PMString | GetFamilyName () const =0 |
| virtual PMString | GetFamilyNameNative () const =0 |
| virtual int32 | GetWritingScript () const =0 |
| virtual bool16 | UpdateFontState (IUsedFontList *docFontList)=0 |
| virtual int32 | CountFontFaces (bool16 getForDysfunctional=kFalse) const =0 |
| virtual void | AppendFontName (int32 i, PMString &s) const =0 |
| virtual void | AppendFullName (int32 i, PMString &s) const =0 |
| virtual void | AppendStyleName (int32 i, PMString &s) const =0 |
| virtual void | AppendStyleNameNative (int32 i, PMString &s) const =0 |
| virtual void | AppendFullNameNative (int32 i, PMString &s) const =0 |
| virtual int32 | CorrectVariantIndex (const PMString &face) const =0 |
| virtual IPMFont * | QueryFace (const PMString &face, IFontMgr::FontStyleBits style=IFontMgr::kNormal, PMReal smallcapscale=0.7)=0 |
| virtual bool16 | AttemptAutoActivation (const PMString &face, IFontMgr::FontStyleBits style=IFontMgr::kNormal, PMReal smallcapscale=0.7)=0 |
| virtual bool16 | IsFaceAvailable (const PMString &face, IFontMgr::FontStyleBits style=IFontMgr::kNormal, PMReal smallcapscale=0.7, int32 *oldTech=nil, int32 *newTech=nil, bool16 resetTechnology=kFalse)=0 |
| virtual bool16 | IsDysfunctional () const =0 |
| virtual PMString | GetFacePostscriptName (const PMString &face, bool16 getOnlyRealPSName=kFalse) const =0 |
| virtual PMString | ToggleBoldItalic (const PMString &face, IFontMgr::FontStyleBits toggle)=0 |
| virtual PMString | GetFaceNativeName (const PMString &face, IFontMgr::FontStyleBits style=IFontMgr::kNormal, PMReal smallcapscale=0.7)=0 |
| virtual PMString | GetDisplayFullName (const PMString &faceName, PMString &fontString)=0 |
| virtual void | SetFontFaceMappingInfo (FontFaceMappingInfo &FontFaceMappingInfo)=0 |
| virtual const FontFaceMappingInfo & | GetFontFaceMappingInfo (const PMString &faceName) const =0 |
| virtual bool16 | FontFaceMappingInfoIsSet (const PMString &faceName) const =0 |
| virtual UID | GetDependentFamily () const =0 |
| virtual bool16 | IsFlattened () const =0 |
| virtual IFontGroupId * | QueryFontGroupUniqueID () const =0 |
| virtual void | SetFamilyWithFontGroupID (const IFontGroupId *fontGroupIDPtr)=0 |
| virtual bool16 | IsBadFont (const PMString &styleName, PMString &badFontPath) const =0 |
| virtual const PMString | GetDisplayFamilyName () const =0 |
| virtual IPMFont::FontType | GetFontType (const PMString &styleName) const =0 |
| virtual int32 | GetDefaultStyleIndex () const =0 |
| virtual WideString | GetFontVersion (const PMString &styleName) const =0 |
| virtual void | UpdateFontVersions ()=0 |
| virtual int32 | GetVariantIndex (const PMString &face) const =0 |
| virtual void | AddMissingFontEntry (const FontEntry &fontEntry)=0 |
| virtual bool16 | IsTypekitFont (const PMString &styleName) const =0 |
| virtual PMString | GetTypekitFontID (const PMString &styleName) const =0 |
| virtual PMString | GetStyleNameFromDesignAxes (const Fixed *designAxes, int32 numAxes, PMString parentStyleName)=0 |
| virtual Fixed * | GetDesignAxesFromStyleName (const PMString &styleName, int32 &numAxes)=0 |
| virtual bool16 | IsVariableFont ()=0 |
| virtual bool16 | IsCustomVariableFont (const PMString &variant)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This plus the style name is used to identify an IPMFont in the document. IFontFamily plus style name are saved as attributes in the document.
| pure virtual |
This is to be used only by internal font management code.
| &fontEntry |
| pure virtual |
Appends the postscript name to string
| i | Index into font family. From 0 to < CountFontFaces |
| s | String to append name to. |
| pure virtual |
Appends the full font name to string. Full name can be family name plus style name but it is not always.
| i | Index into font family. From 0 to < CountFontFaces |
| s | String to append name to. |
| pure virtual |
Appends the native full font name to string. Full name can be family name plus style name but it is not always. This is the full font name for the writing script. So if the font is Japanese writing script the Native name will be Japanese.
| i | Index into font family. From 0 to < CountFontFaces |
| s | String to append name to. Be careful. s may have a different script than the writingscript of the font and the Append will not work correctly |
| pure virtual |
Appends the roman font style name to string
| i | Index into font family. From 0 to < CountFontFaces |
| s | String to append name to. |
| pure virtual |
Appends the native font style name to string. This is the style name for the writing script. So if the font is Japanese writing script the Native name will be Japanese.
| i | Index into font family. From 0 to < CountFontFaces |
| s | String to append name to. Be careful. s may have a different script than the writingscript of the font and the Append will not work correctly |
| pure virtual |
Attempt to auto activate the font. If a font is missing you can call this to see if the font can be activated.
| face | name of the font style. only works for non native style names |
| style | font style bits |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| pure virtual |
This will give you an index into the font family for the face given. If you want only the plain or regular style and to fail otherwise call CorrectVariantIndex with "Regular". You will then get -1 if no regular style. Regular style is either - "R", "Roman", "Regular", "Book", "Plain", "Normal". Likewise if you want Italic style call with face = "Italic", for bold face = "Bold" for bold italic face = "Bold Italic". These will match against other names for italic, bold and bold italic. Then call AppendStyleName with index to find the actual name the family uses for italic, bold or bold italic.
WARNING: In the face of Document-installed fonts, the index returned is problematic and deprecated. The face may be available yet this function may still return -1.
| face | Face to find. Do not pass native style names as they will not be found. -1 is returned if face name is not found. |
| pure virtual |
Count number of font styles in this font family WARNING: The count returned may not reflect all available faces. It merely returns one beyond the highest index usable in functions taking an index.
| getForDysfunctional | if true return count of faces in dysfunctional family if false return -1 for dysfunctional family |
| pure virtual |
Only used by dysfunctional fonts
| faceName |
| pure virtual |
This will give you an index into the font family for the default style. This will be the plain or regular style when available. If no plain or regular style it will be the first style. Regular style is either - "R", "Roman", "Regular", "Book", "Plain", "Normal". If you want only the plain or regular style and to fail otherwise call CorrectVariantIndex with "Regular". You will then get -1 if no regular style.
| pure virtual |
Only used by codependent fonts. All other return kInvalidUID
| pure virtual |
Get design axes of font instance, given style name. To be called only for custom instances of variable fonts having single dict.
| pure virtual |
Get the name of the family to display in the ui. For families that have the same name as another family the font type is added. Ex. (TT) for TrueType
| pure virtual |
sets the best full name to fontString, returns fontString, sets translation and script; called i.e. by DocumentFontUsage and MissingFontsController.
| faceName | |
| &fontString |
| pure virtual |
Gets the native font style name
| face | name of the font style. only works for non native style names |
| style | font style bits |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| pure virtual |
Get postscript font name for this font style name.
| face | name of the font style. only works for non native style names |
| getOnlyRealPSName | if true only real name returned if not available kNullString is returned. false will return either the default postscript font name(for the family) or if that is not available(as in dysfunctional fonts) it returns the fontfamily name. |
| pure virtual |
Gets the roman family name
| pure virtual |
Gets the native family name. This is the full font name for the writing script. So if the font is Japanese writing script the Native name will be Japanese.
| pure virtual |
| pure virtual |
Get font type for index in family. dysfuntional and codependent will always return kUnknownFontType. This will return values for missing families for the font that used to be installed
| styleName | style name of font. |
| pure virtual |
Get font version for index in family. dysfuntional and codependent will always return empty string. This will return values for missing families for the font that used to be installed
| styleName | style name of font. |
| pure virtual |
Get Style name, given design axes of font instance. To be called only for custom instances of variable fonts having single dict.
Get the typekit ID of the font
| pure virtual |
This will give you an index into the font family for the face given. Regular style is either - "R", "Roman", "Regular", "Book", "Plain", "Normal". Likewise if you want Italic style call with face = "Italic", for bold face = "Bold" for bold italic face = "Bold Italic". These will match against other names for italic, bold and bold italic. Then call AppendStyleName with index to find the actual name the family uses for italic, bold or bold italic.
This function differs from CorrectVariantIndex in that it returns an index even when the font is missing.
WARNING: In the face of Document-installed fonts, the index returned is problematic and deprecated. The face may be available yet this function may still return -1.
| face | Face to find. Do not pass native style names as they will not be found. -1 is returned if face name is not found. |
| pure virtual |
Call GetWritingScript if a font is missing and you want to find the writingScript from the family. To get the writing script of a font your first choice should be to call IPMFont::GetWritingScript.
| pure virtual |
Given a style name reports if that font is bad and what is the file path to the bad font
| styleName | font to evaluate |
| badFontPath | OUT if font is bad the file path is returned. Trying to QueryFont and using IPMFont->GetFullPath will not return the correct path for bad fonts. |
| pure virtual |
Checks whether a given variant is a Named Instance or Custom Instance of variable font family. If called for non-variable font families, it always returns kFalse.
| pure virtual |
Dysfunctional fonts are a special kind of missing font.
There are 2 reasons a family is dysfunctional.
| pure virtual |
Returns true if font face name is available in family. WARNING: A true result does NOT imply that GetVariantIndex or CorrectVariantIndex will return a non-negative integer. In the face of Document-installed fonts, such an index is problematic and deprecated.
| face | face check if available in family |
| style | style bits |
| smallcapscale | |
| oldTech | OBSOLETE. was used to change font type in family. Now family must always keep original font type. |
| newTech | OBSOLETE. was used to change font type in family. Now family must always keep original font type. |
| resetTechnology | OBSOLETE. was used to change font type in family. Now family must always keep original font type. |
| pure virtual |
Whether this font should be flattened in the font menu. This is true for non-OTF Japanese fonts.
| pure virtual |
Get the Typekit status of font for index in family. dysfuntional and codependent will always return kFalse. This will return values for missing families for the font that used to be installed
| styleName | style name of font. |
| pure virtual |
Checks whether a font family is variable font family or not
If called for fonts that are not available (missing, dysfunctional etc), returns kFalse.
| pure virtual |
Retrieve a font from this family using a non native style name
| face | name of the font style. only works for non native style names |
| style | font style bits |
| smallcapscale | used when style bits are set to kSmallCaps to set small cap scale |
| pure virtual |
Get a unique identifier for this font family
| pure virtual |
Shouldn't be called by anything but the font management system
| familyName | |
| familyNameNative | |
| missing |
| pure virtual |
Set a unique identifier for this font family
| fontGroupID |
| pure virtual |
Only used by dysfunctional fonts
| FontFaceMappingInfo |
| pure virtual |
Returns a string containing the non native font style name that is the opposite of the face passed in. So passing in "Bold" with Bold toggle gives you "Regular".
| face | font style to toggle |
| toggle | how to toggle the font style |
| pure virtual |
This will throw away all the font data and get the information again. Only should be called by the font management system when the font system has changed.
| *docFontList |
| pure virtual |
Updates the font versions in family to currently installed fonts. These are the versions returned by GetFontVersion. We currently only update these when a font family is copied to a new database in ConvertReference. missing families will not be reset as there is no installed font to get a version from.