InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDocFontMgr.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: ekenning
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IDocFontMgr__
25 #define __IDocFontMgr__
26 
27 #include "IPMUnknown.h"
28 #include "FontMgrID.h"
29 #include "IFontMgr.h" // FontNameInfo
30 #include "IFontFamily.h"
31 
32 class IFontGroupId;
33 class PMString;
34 
40 class IDocFontMgr : public IPMUnknown
41 {
42  public:
43  enum { kDefaultIID = IID_IDOCFONTMGR };
44 
45 
46  //---------GET FONT FAMILY UID-----------------
47 
54  virtual UID GetFontFamilyUID(const IFontGroupId *fontGroupIDPtr, bool16 makeOneIfNecessary = kTrue) = 0;
55 
67  virtual UID GetFontGroupUID(IFontFamily * sourceFontFamily, bool16 makeOneIfNecessary = kTrue) = 0;
68 
69 
76  virtual UID GetFontFamilyUID(const IPMFont *font, bool16 makeOneIfNecessary = kTrue) = 0;
77 
93  virtual UID GetFontFamilyUID(const PMString &displayFamilyName, PMString &fontStyle, bool16 makeOneIfNecessary = kTrue) = 0;
94 
102  virtual UID GetFontGroupUIDWithFontFaceMappingInfo(const PMString& groupName,
103  IFontFamily::FontFaceMappingInfo& FontFaceMappingInfo) = 0;
104 
116  virtual UID GetFontFamilyUIDWithPostscriptName(const PMString& familyName, const FontEntry &fontEntry) = 0;
117 
125  virtual IFontFamily* QueryFontGroup(const PMString& groupName, bool16 makeOneIfNecessary = kTrue) = 0;
126 
132  virtual UID GetDefaultFamilyUID() = 0;
133 
134 
135  //---------ADD/REMOVE UID-----------------
136 
142  virtual void Append(UID groupUID) = 0;
148  virtual void Remove(UID groupUID) = 0;
149 
150 
151  //---------ACCESS ROUTINES-----------------
152 
158  virtual int32 GetFontGroupCount() const = 0;
166  virtual UID GetNthFontGroupUID( int32 i) const = 0;
167 
168 
169  //---------UPDATE-----------------
170 
174  virtual void FontSystemChanged(void) = 0;
175 
176  typedef enum {
177  kDoNotUpdateDysfunctionalFamilies,
178  kUpdateOnlyDysfunctionalFamilies
179  } UpdateFlags;
180 
188  virtual bool16 UpdateCache(IUsedFontList *usedFontList, UpdateFlags updateFlag = kDoNotUpdateDysfunctionalFamilies) = 0;
189 
190 
191  //----------DISCOURAGED ROUTINES---------------
192  //
204  virtual UID GetFontGroupUID(const PMString& groupName, bool16 makeOneIfNecessary = kTrue) = 0;
205 
219  virtual UID GetFontGroupUIDWithFontEntry( const IFontMgr::FontNameInfo& fontNames ) = 0;
220 
221  /*
222  */
223  virtual PMString GetTypekitFontID(const PMString& familyName, const PMString& styleName) = 0;
224 };
225 
226 #endif
227  // __IDocFontMgr__
228 
229