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

#include <IPMFont.h>

Inheritance diagram for IPMFont:
grRefCountedObj

Public Types

enum  { kMaxDesignVectorSize = 5 }
 
enum  FontProtection {
  kInvalid = 0, kNormal, kNoOutlines, kNoPrinting,
  kNoEmbedding, kNoPDFEmbedding, kRestrictedPrinting
}
 
enum  FontStatus {
  kFontInstalled = 0x01, kFontNotAvailable = 0x10, kFontFauxed = 0x11, kFontSubstituted = 0x12,
  kFontUnknown = 0xFF
}
 
enum  FontTechnology {
  kType1Font, kTrueTypeFont, kCIDFont, kBitmapFont,
  kATCFont, kUnknownTechnology = -1
}
 
enum  FontType {
  kType1FontType, kTrueTypeFontType, kCIDFontType, kATCFontType,
  kBitmapFontType, kOCFFontType, kOpenTypeCFFFontType, kOpenTypeCIDFontType,
  kOpenTypeTTFontType, kUnknownFontType = -1
}
 
enum  BaselineType {
  kBaselineDefault, kBaselineRoman, kBaselineEmBoxTop, kBaselineEmBoxBottom,
  kBaselineEmBoxCenter, kBaselineICFBoxTop, kBaselineICFBoxBottom, kBaselineICFBoxCenter,
  kNumBaselines, kBaselineInvalid = 0x7fffFFFF
}
 
enum  FontWeightType {
  kFontWeightThin = 100, kFontWeightExtraLight = 200, kFontWeightLight = 300, kFontWeightNormal = 400,
  kFontWeightMedium = 500, kFontWeightSemiBold = 600, kFontWeightBold = 700, kFontWeightExtraBold = 800,
  kFontWeightHeavy = 900, kFontWeight_Unknown = 0xFFFFFFFF
}
 
enum  FontWidthType {
  kFontWidthUltraCondensed = 100, kFontWidthExtraCondensed = 200, kFontWidthCondensed = 300, kFontWidthSemiCondensed = 400,
  kFontWidthMedium = 500, kFontWidthSemiExpanded = 600, kFontWidthExpanded = 700, kFontWidthExtraExpanded = 800,
  kFontWidthUltraExpanded = 900, kFontWidth_Unknown = 0xFFFFFFFF
}
 
enum  FontXHeightType {
  kFontXHeightAny = 100, kFontXHeightNoFit = 200, kFontXHeightConstantSmall = 300, kFontXHeightConstantStandard = 400,
  kFontXHeightConstantLarge = 500, kFontXHeightDuckingSmall = 600, kFontXHeightDuckingStandard = 700, kFontXHeightDuckingLarge = 800,
  kFontXHeight_Unknown = 0xFFFFFFFF
}
 
enum  FontContrastType {
  kFontContrastAny = 100, kFontContrastNoFit = 200, kFontContrastNone = 300, kFontContrastVeryLow = 400,
  kFontContrastLow = 500, kFontContrastMediumLow = 600, kFontContrastMedium = 700, kFontContrastMediumHigh = 800,
  kFontContrastHigh = 900, kFontContrastVeryHigh = 1000, kFontContrast_Unknown = 0xFFFFFFFF
}
 
enum  FontCapStyleType { kFontCapStyleNone = 100, kFontCapStyleStandard = 200, kFontCapStyleCapsOnly = 300, kFontCapStyleUnknown = 0xffffffff }
 
enum  FontNumberStyleType { kFontNumberStyleNone = 100, kFontNumberStyleLowerCase = 200, kFontNumberStyleUpperCase = 300, kFontNumberStyleUnknown = 0xffffffff }
 

Public Member Functions

virtual CTFontDict * GetCTFontDict () const =0
 
virtual std::string GetPostScriptName () const =0
 
virtual void AppendFullName (PMString &s) const =0
 
virtual void AppendFullNameNative (PMString &s) const =0
 
virtual void AppendFamilyName (PMString &s) const =0
 
virtual void AppendFamilyNameNative (PMString &s) const =0
 
virtual void AppendStyleName (PMString &s) const =0
 
virtual void AppendStyleNameNative (PMString &s) const =0
 
virtual void AppendFontName (PMString &s, bool16 originalNameWhenMissing=kFalse) const =0
 
virtual int32 GetNumDesignAxes () const =0
 
virtual void AppendNthDesignAxisName (int32 index, PMString &s) const =0
 
virtual void GetNthDesignAxisLimits (int32 index, Fixed *min, Fixed *max) const =0
 
virtual Fixed * AccessDesignVector ()=0
 
virtual const Fixed * AccessDesignVector () const =0
 
virtual int32 FillOutMMInstances (Fixed *array, int32 *numberFit) const =0
 
virtual void AppendMMInstanceName (int32 which, PMString &s) const =0
 
virtual PMRect GetFontBBox () const =0
 
virtual Text::GlyphID GetNotDefinedGlyph () const =0
 
virtual int32 GetNumGlyphs () const =0
 
virtual bool16 UsesStandardEncoding () const =0
 
virtual int32 GetWritingScript () const =0
 
virtual bool16 AppendVersion (PMString &s) const =0
 
virtual K2Vector< PMString > * GetFullPath () const =0
 
virtual K2Vector
< FontProtection > * 
GetProtection () const =0
 
virtual FontStatus GetFontStatus () const =0
 
virtual FontTechnology GetFontTechnology () const =0
 
virtual IPMFont::FontTechnology GetGlyphTechnology (Text::GlyphID glyphID) const =0
 
virtual FontType GetFontType () const =0
 
virtual IFontMgr::FontStyleBits GetFontStyle () const =0
 
virtual PMReal GetAscent (PMReal pointsize) const =0
 
virtual PMReal GetDescent (PMReal pointsize) const =0
 
virtual PMReal GetCapHeight (PMReal pointsize) const =0
 
virtual PMReal GetXHeight (PMReal pointsize) const =0
 
virtual PMReal GetEmBoxHeight (PMReal pointsize, bool16 vertical) const =0
 
virtual void GetICFBoxInsets (PMReal pointsize, PMReal *fromLineTop, PMReal *fromLineBottom, bool16 vertical) const =0
 
virtual PMRect GetEmBox () const =0
 
virtual PMRect GetICFBox () const =0
 
virtual void TranslateBaseline (PMRealGlyphPoint *strikes, int32 numStrikes, PMMatrix *matrix, BaselineType fromBaseline, BaselineType toBaseline, IFontMgr::WritingDirection writingDirection) const =0
 
virtual PMReal GetHorizEmBoxDepth () const =0
 
virtual PMReal GetHorizICFBoxDepth () const =0
 
virtual bool16 VerticalMetricsProportionalByDefault () const =0
 
virtual bool16 HorizontalMetricsProportionalByDefault () const =0
 
virtual void GetUnderlinePosition (PMReal *yOffset, PMReal *thickness, PMReal xScale=1.0, PMReal yScale=1.0, bool16 vertical=kFalse, bool16 isTcy=kFalse) const =0
 
virtual bool16 AllowFakeLigatureSubstitutions () const =0
 
virtual int32 DoLigatures (PMRealGlyphPoint *strikes, int32 *numStrikes, char *changeAttr=nil, bool16 tryOpenType=kTrue) const =0
 
virtual bool16 HasOTFeature (const char feature[4], const char script[4]=0, const char language[4]=kDefaultLanguageTag) const =0
 
virtual int32 CountOTFeatures (const char script[4]=0, const char language[4]=kDefaultLanguageTag) const =0
 
virtual const char * NewOTFeaturesList (const char script[4]=0, const char language[4]=kDefaultLanguageTag) const =0
 
virtual bool16 GetIsEPSFont () const =0
 
virtual bool16 GetIsEmbeddedFont () const =0
 
virtual bool16 GetHasOutlines () const =0
 
virtual bool16 GetFontRegistry (PMString *fontRegistryString) const =0
 
virtual bool16 GetFontOrdering (PMString *fontOrderingString) const =0
 
virtual int32 GetFontCIDSupplementNumber () const =0
 
virtual bool16 IsValidGlyphID (Text::GlyphID checkGlyphID) const =0
 
virtual PMString GetPlatformDependentName (IFontMgr::OriginalOS platformOS=IFontMgr::kOriginalUnknownOS) const =0
 
virtual void GetGlyphIDs (const WideString &textString, K2Vector< Text::GlyphID > &glyphIDs, bool16 vertical=kFalse) const =0
 
virtual void AppendGlyphIDs (const UTF16TextChar *textBuffer, int32 numUTF16Chars, K2Vector< Text::GlyphID > &glyphIDs, bool16 vertical=kFalse) const =0
 
virtual Text::GlyphID GetGlyphID (UTF32TextChar character, bool16 vertical=kFalse) const =0
 
virtual Text::GlyphID GetPlatformGlyphID (const char *charString, int32 bytesPerChar=1, bool16 vertical=kFalse, CTEncoding *encoding=nil) const =0
 
virtual void GetPlatformGlyphIDs (const char *charString, int32 stringLength, K2Vector< Text::GlyphID > &glyphIDs, bool16 vertical=kFalse, CTEncoding *encoding=nil) const =0
 
virtual void GetCharacterBoundaries (const UTF16TextChar *text, int32 utf16WordLength, K2Vector< size_t > &offsets) const =0
 
virtual bool16 IsDefinedAndValidGlyph (Text::GlyphID checkGlyphID) const =0
 
virtual int32 GetNumValidGlyphIDRanges () const =0
 
virtual void GetNthValidGlyphIDRange (int32 nthRange, Text::GlyphID &firstGlyphID, Text::GlyphID &lastGlyphID) const =0
 
virtual bool16 IsEqual (const IPMFont *compareFont) const =0
 
virtual bool16 GetOTGlyphAccess (Text::GlyphID glyphID, GlyphAccessData *glyphAccessData, int32 featureToSearchCount, const char *featuresToSearch) const =0
 
virtual bool16 GetAllOTGlyphAccess (Text::GlyphID glyphID, K2Vector< GlyphAccessData > &glyphAccessData) const =0
 
virtual void GetFontFiles (K2Vector< IDFile > &outFiles) const =0
 
virtual bool16 GetCIDMojikumiTsume (Text::GlyphID cid, bool16 vertical, PMReal &leftTsume, PMReal &rightTsume) const =0
 
virtual bool16 GetCIDMojikumiClass (Text::GlyphID cid, bool16 vertical, MojikumiClass &mojikumiClass) const =0
 
virtual int32 GetNumAlternates (Text::GlyphID glyphID, const char *feature) const =0
 
virtual IPMFontQueryComponentFontAndGlyphID (Text::GlyphID glyphID, Text::GlyphID &componentGlyphID) const =0
 
virtual int32 GetNumGlyphNames () const =0
 
virtual std::string GetGlyphName (Text::GlyphID glyphID) const =0
 
virtual CTEncoding * GetCTEncoding () const =0
 
virtual bool16 IsCFF () const =0
 
virtual PMReal GetATCBaselineShift (Text::GlyphID glyphID) const =0
 
virtual bool16 AppendVendorID (PMString &vendorName) const =0
 
virtual bool16 AppendCopyrightString (PMString &s) const =0
 
virtual bool16 AppendLicenseInfoURL (PMString &s) const =0
 
virtual bool16 IsSVGFont () const =0
 
virtual bool16 IsSBIXFont () const =0
 
virtual bool16 IsColorFont () const =0
 
virtual bool16 HasValidSVGOTDescForGlyph (Text::GlyphID glyphId) const =0
 
virtual bool16 IsEmojiFont () const =0
 
virtual bool16 IsTypekitDesktopFont () const =0
 
virtual PMString GetTypekitFontID () const =0
 
virtual PMString GetFontSytlisticName (const char featureTag[4]) const =0
 
virtual bool16 IsColorTextAvailable () const =0
 
virtual bool16 GetFontInstallTime (std::time_t &installTime)=0
 
virtual FontWeightType GetFontWeight () const =0
 
virtual FontWidthType GetFontWidth () const =0
 
virtual FontXHeightType GetFontXHeight () const =0
 
virtual FontContrastType GetFontContrast () const =0
 
virtual FontCapStyleType GetFontCapStyleType ()=0
 
virtual FontNumberStyleType GetFontNumberStyleType ()=0
 
virtual bool16 IsVariableFont () const =0
 
virtual bool16 SetNthVariableDesignAxes (int32 n)=0
 
virtual void SetNthVariableDesignAxes (Fixed *designAxes)=0
 
virtual bool16 IsNthDesignAxisHidden (int32 n)=0
 
- Public Member Functions inherited from grRefCountedObj
 grRefCountedObj ()
 
virtual ~grRefCountedObj ()=0
 
virtual void AddRef () const
 
virtual void Release () const
 

Additional Inherited Members

- Protected Attributes inherited from grRefCountedObj
int32 fRefCount
 

Detailed Description

This is a shell over the CoolType API for fonts. The native CoolType api is in the form of ::GetFontValue(font, key, void*, length) This interface makes fonts much easier to deal with.

Member Enumeration Documentation

Enumerator
kFontContrastNoFit 

No Fit

kFontContrastNone 

None

kFontContrastVeryLow 

Very Low

kFontContrastLow 

Low

kFontContrastMediumLow 

Medium Low

kFontContrastMedium 

Medium

kFontContrastMediumHigh 

Medium High

kFontContrastHigh 

High

kFontContrastVeryHigh 

Very High

kFontContrast_Unknown 

Invalid/not set value

Font Protection

See Also
GetProtection
Enumerator
kNoOutlines 

If this is set, the outlines can be used for rasterization, but the control points are not allowed to be exposed to users.

kNoPrinting 

If this is set, then the hinted outlines cannot be downloaded to a printer; however, if kNoOutlines is not set, unhinted outlines can be downloaded.

kNoEmbedding 

If a font allows "editable embedding," then that font may be embedded in a document format where the embedded font can be used to edit the document. In PDFs, fonts that are associated with forms or annotations may be used in this way. This flag is set when the font cannot be embedded in such a document.

kNoPDFEmbedding 

If a font allows "print-and-preview embedding", then that font may be embedded in a document format where the embedded font will only be used for printing or for document viewing. That is, the embedded font will not be used for document editting. For example, most fonts that are embedded in PDF are only used for document viewing and printing. This flag is set when the font cannot be embedded in such a document.

kRestrictedPrinting 

Obsolete. No longer used.

Font Status

See Also
GetFontStatus

Font Technologies

See Also
GetFontTechnology
Enumerator
kType1Font 

a roman encoded, Adobe Type1 font

kTrueTypeFont 

a TrueType font

kCIDFont 

a CID-Keyed font

kBitmapFont 

a platform dependent font

kATCFont 

an Adobe Type Composer font (Rearranged CID font)

kUnknownTechnology 

Technology is not known

Font Types

See Also
GetFontType
Enumerator
kType1FontType 

technology=kType1Font

kTrueTypeFontType 

technology=kTrueTypeFont, DSIG table absent

kCIDFontType 

technology=kCIDFont, fontiscff =false

kATCFontType 

technology=kATCFont

kBitmapFontType 

technology=kBitmapFont, hasoutlines=false

kOCFFontType 

technology=kCTBitmapFont, hasoutlines=true

kOpenTypeCFFFontType 

technology=kCTType1Font, fontiscff=true

kOpenTypeCIDFontType 

technology=kCTCIDFont, fontiscff =true

kOpenTypeTTFontType 

technology=kCTTrueTypeFont, DSIG table present

kUnknownFontType 

Type is not known

Enum for the font weight.

Enumerator
kFontWidthExtraCondensed 

Extra-condensed

kFontWidthCondensed 

Condensed

kFontWidthSemiCondensed 

Semi-condensed

kFontWidthMedium 

Medium (Normal)

kFontWidthSemiExpanded 

Semi-expanded

kFontWidthExpanded 

Expanded

kFontWidthExtraExpanded 

Extra-expanded

kFontWidthUltraExpanded 

Ultra-expanded

kFontWidth_Unknown 

Invalid/not set value

Enumerator
kFontXHeightNoFit 

No Fit

kFontXHeightConstantSmall 

Constant/Small

kFontXHeightConstantStandard 

Constant/Standard

kFontXHeightConstantLarge 

Constant/Large

kFontXHeightDuckingSmall 

Ducking/Small

kFontXHeightDuckingStandard 

Ducking/Standard

kFontXHeightDuckingLarge 

Ducking/Large

kFontXHeight_Unknown 

Invalid/not set value

Member Function Documentation

virtual Fixed* IPMFont::AccessDesignVector ()
pure virtual

Access the design vector this IPMFont is using. This method is also used to set the value.

Returns
Fixed* current design vector IPMFont is using
virtual const Fixed* IPMFont::AccessDesignVector () const
pure virtual

Access the design vector this IPMFont is using. This method does not allow you to set the value.

Returns
Fixed* current design vector IPMFont is using
virtual bool16 IPMFont::AllowFakeLigatureSubstitutions () const
pure virtual

AllowFakeLigatureSubstitutions

Returns
whether this font accepts faking a ligature substitution (when available) for fi, fl, etc.
virtual bool16 IPMFont::AppendCopyrightString (PMStrings) const
pure virtual

Gets the copyright string from the font.

Parameters
scopyright string
Returns
bool16 kFalse when not found
virtual void IPMFont::AppendFamilyName (PMStrings) const
pure virtual

Family name

Parameters
sString to append name to.
virtual void IPMFont::AppendFamilyNameNative (PMStrings) const
pure virtual

Native family name in the language of the script of the font.

Parameters
sString to append name to.
virtual void IPMFont::AppendFontName (PMStrings,
bool16 originalNameWhenMissing = kFalse 
) const
pure virtual

Font name is postscript name of the font.

Parameters
sString to append name to.
originalNameWhenMissingIf kFalse will return the postscript name of available font that is replacing the missing font. If kTrue gives the postscript name of the missing font.
virtual void IPMFont::AppendFullName (PMStrings) const
pure virtual

Full name includes information for family name and style name. Not always the same as FamilyName+' '+StyleName. Determined by the font.

Parameters
sString to append name to.
virtual void IPMFont::AppendFullNameNative (PMStrings) const
pure virtual

Native full name includes information for family name and style name in the language of the script of the font.

Parameters
sString to append name to.
virtual void IPMFont::AppendGlyphIDs (const UTF16TextChar * textBuffer,
int32 numUTF16Chars,
K2Vector< Text::GlyphID > & glyphIDs,
bool16 vertical = kFalse 
) const
pure virtual

For a buffer append the glyphIDs.

Parameters
textBufferIN Unicode values to get glyphids from
glyphIDsOUT glyphIDs are appended
verticalIN get vertical glyphs if kTrue
virtual bool16 IPMFont::AppendLicenseInfoURL (PMStrings) const
pure virtual

Gets the license information from the font.

Parameters
slicense string
Returns
bool16 kFalse when not found
virtual void IPMFont::AppendMMInstanceName (int32 which,
PMStrings 
) const
pure virtual

Appends multiple master instance name.

Parameters
whichindex of instance. 0 based and must be less than number of instances.
sname of instance. used in font style menu.
virtual void IPMFont::AppendNthDesignAxisName (int32 index,
PMStrings 
) const
pure virtual

Get name of multiple master axis for index value. Only useful for multiple master fonts. Example of names are "OpticalSize", "Weight", and "Width"

Parameters
indexindex into multiple master axes. 0 based and must be less than GetNumDesignAxes
sname of axis.
virtual void IPMFont::AppendStyleName (PMStrings) const
pure virtual

Style name

Parameters
sString to append name to.
virtual void IPMFont::AppendStyleNameNative (PMStrings) const
pure virtual

Style name in the language of the script of the font.

Parameters
sString to append name to.
virtual bool16 IPMFont::AppendVendorID (PMStringvendorName) const
pure virtual

Gets the vendor id from the font.

Parameters
vendorNameversion id
Returns
bool16 kFalse when not found
virtual bool16 IPMFont::AppendVersion (PMStrings) const
pure virtual

Gets the version string of the font.

Parameters
sversion string
Returns
bool16 kFalse when not found
virtual int32 IPMFont::CountOTFeatures (const char script[4] = 0,
const char language[4] = kDefaultLanguageTag 
) const
pure virtual

CountOTFeatures. This is NOT an efficient call for ATC (composite) fonts. The value isn't cached because of the various script & language tags, and combining the lists from multiple component fonts isn't cheap.

Returns
numFeatures The number of OpenType features in font.
virtual int32 IPMFont::DoLigatures (PMRealGlyphPointstrikes,
int32 * numStrikes,
char * changeAttr = nil,
bool16 tryOpenType = kTrue 
) const
pure virtual

applies ligatures - non OpenType ligatures that are looked for are fi, fl, ff, ffi, ffl

Parameters
strikesIN strikes to apply ligature to. OUT ligature applied strikes.
*numStrikesIN number of strikes in strikes array. OUT number of strikes after ligature applied.
*changeAttrfilled out like in CTOTFeature
tryOpenTypetry appling opentype ligature feature "liga"
Returns
int32 error same as CTOTFeature
virtual int32 IPMFont::FillOutMMInstances (Fixed * array,
int32 * numberFit 
) const
pure virtual

Fills array with number of multiple master instances on the system for this font

Parameters
*arrayarray of axes information.
*numberFitIN number of fixed in array. OUT number actually needed. This is number of instances times the number of design axes. Pass nil array and 0 to find out size needed for array.
Returns
int32 number of instances installed
virtual bool16 IPMFont::GetAllOTGlyphAccess (Text::GlyphID glyphID,
K2Vector< GlyphAccessData > & glyphAccessData 
) const
pure virtual

Get all unicode and Opentype features that produces the glyphID passed in.

Parameters
glyphIDglyph to get access for
glyphAccessDatareturns results
Returns
bool16 kTrue if success. kFalse if an error occured
virtual PMReal IPMFont::GetAscent (PMReal pointsize) const
pure virtual

For a given pointsize get the font's ascent.

Parameters
pointsizepoint size it get ascent for
Returns
PMReal ascent
virtual PMReal IPMFont::GetATCBaselineShift (Text::GlyphID glyphID) const
pure virtual

Gets baseline shift for an ATC glyph

This returns the ATC baseline shift (in horizontal writing mode) for 'glyphID' in a 1-unit-em instance of the font. If the font is not an ATC font, or if the ATC component font that 'glyphID' is associated with does not specify a baseline shift, this method returns 0.

For example, if an ATC font is created such that a particular component font's glyphs are to be shifted upward by 200 font units (relative to a 1000-unit-em font) in horizontal writing mode, then this method will return -0.2 for all glyphs in that component font.

Most clients do not need to concern themselves with this API since other metrics APIs take the baseline shift into account. This API is useful for only those clients who set vertical text by themselves using horizontal text metrics, since they will need to adjust the vertical text by the ATC baseline shift also.

Parameters
glyphIDglyphID to get baseline shift for
Returns
PMReal baseline shift for glyphID
virtual PMReal IPMFont::GetCapHeight (PMReal pointsize) const
pure virtual

Height of a capital 'X' if outline of X is available. Otherwise bbox height.

Parameters
pointsizepoint size it get cap height for
Returns
PMReal cap height
virtual void IPMFont::GetCharacterBoundaries (const UTF16TextChar * text,
int32 utf16WordLength,
K2Vector< size_t > & offsets 
) const
pure virtual

Determines boundaries of characters in a text string

For example, this may be used to determine the length of a multiple unicode value sequence encoded in unicode 3.0 encoding.

Note: GetCharacterBoundaries recognizes surrogate pairs as single characters. It also recognizes Unicode value sequences containing Apple "transcoding hints" as single characters.

Parameters
textIN unicode values to get boundries for
utf16WordLengthIN length of text
offsetsOUT Long integer array supplied by the caller. On a successful return, each integer in the array is a byte offset to the beginning of each character in the text string. One extra offset to the next byte after the last character in the text string is returned at the end. Consequently, The byte length of ith character can be calculated by offsets[i+1] - offsets[i].
virtual bool16 IPMFont::GetCIDMojikumiClass (Text::GlyphID cid,
bool16 vertical,
MojikumiClass & mojikumiClass 
) const
pure virtual

Get the mojikumi class of the given CID

Parameters
cidCID to be searched
verticalkTrue if glyph is being drawn upright in vertical text
mojikumiClassif font is CID font and has known mojikumi class info then this param will be modified to return the class
Returns
bool16 kTrue if success. kFalse if an error occured
virtual bool16 IPMFont::GetCIDMojikumiTsume (Text::GlyphID cid,
bool16 vertical,
PMRealleftTsume,
PMRealrightTsume 
) const
pure virtual

Get the mojikumi tsume of the given CID

Parameters
cidCID to be searched
verticalkTrue if glyph is being drawn upright in vertical text
leftTsumeif font is CID font and has known mojikumi tsume info then this param will be modified to return the tsume (-1.0 - 0.0)
rightTsumeif font is CID font and has known mojikumi tsume info then this param will be modified to return the tsume (-1.0 - 0.0)
Returns
bool16 kTrue if success. kFalse if an error occured
virtual CTEncoding* IPMFont::GetCTEncoding () const
pure virtual

This method is used internally

Returns
CTEncoding*
virtual CTFontDict* IPMFont::GetCTFontDict () const
pure virtual

Get Cooltype dictionary

Returns
CTFontDict* CoolType dictionary for this IPMFont
virtual PMReal IPMFont::GetDescent (PMReal pointsize) const
pure virtual

For a given pointsize get the font's descent.

Parameters
pointsizepoint size it get descent for
Returns
PMReal descent
virtual PMRect IPMFont::GetEmBox () const
pure virtual

Get font em-box. describes the left, top, right, and bottom edges (in horizontal writing mode) of the ideographic em-box of a 1-unit-em font. This value will be defined for every font (including non-CJK fonts, where it can be used to em-box-align these fonts alongside CJK fonts), barring any internal error.

Returns
PMRect em-box of font
virtual PMReal IPMFont::GetEmBoxHeight (PMReal pointsize,
bool16 vertical 
) const
pure virtual

Height of em-box

Parameters
pointsizepoint size it get em-box height for
verticalif kTrue figure out for vertical text.
Returns
PMReal height of em-box
virtual PMRect IPMFont::GetFontBBox () const
pure virtual

Get font bounding box. This is the bounding box of a 1 point font. It is the union of the bounding box of each character in the font where the character is drawn at the point <0,0>.

Returns
PMRect font bounding box
virtual FontCapStyleType IPMFont::GetFontCapStyleType ()
pure virtual

Get the caps style of the font based on some calculation heuristics. FOR INTERNAL USE ONLY.

virtual int32 IPMFont::GetFontCIDSupplementNumber () const
pure virtual

If this font is a kCIDFont technology font, then this is the supplement number for this font. Example is 4

Returns
int32 supplement number
virtual FontContrastType IPMFont::GetFontContrast () const
pure virtual

Gets the contrast class of the font. This value is retrieved from the OS/2 table of a font. Some fonts may not have the OS/2 table or the version of the table in which this value is present.

Returns
The contrast class value if it exists in the font; otherwise kCTFontContrastInvalid.
See Also
CTFontContrastClass
virtual void IPMFont::GetFontFiles (K2Vector< IDFile > & outFiles) const
pure virtual

Get the files used by this font.

Parameters
outFilesVector of files used by this font
virtual bool16 IPMFont::GetFontInstallTime (std::time_t & installTime)
pure virtual
Parameters
installTime[OUT] An integral value the representing the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC. Client code should use appropriate library methods to convert this value to a convenient human-friendly format.
Returns
true if a valid font file was found and its creation/modification time could be obtained, false otherwise.
virtual FontNumberStyleType IPMFont::GetFontNumberStyleType ()
pure virtual

Get the Numbering style of the font based on some calculation heiristics. FOR INTERNAL USE ONLY.

virtual bool16 IPMFont::GetFontOrdering (PMStringfontOrderingString) const
pure virtual

If this font is a kCIDFont technology font, then this is the CID ordering for this font. Example is "Japan1"

Parameters
fontOrderingString
Returns
bool16 kTrue if string is not empty
virtual bool16 IPMFont::GetFontRegistry (PMStringfontRegistryString) const
pure virtual

If this font is a kCIDFont technology font, then this is the CID registry for this font. Example is of Registry ordering supplement value (also know as ROS) is "Adobe-Japan1-4" so the registry is "Adobe".

Parameters
fontRegistryStringregistry
Returns
bool16 kTrue if string is not empty
virtual FontStatus IPMFont::GetFontStatus () const
pure virtual

Get status of font. Use to find out if a font is available on a machine.

Returns
FontStatus status of font
virtual IFontMgr::FontStyleBits IPMFont::GetFontStyle () const
pure virtual

Gets font style bits

Returns
IFontMgr::FontStyleBits kSmallCaps or kAllCaps. Other styles not supported
virtual PMString IPMFont::GetFontSytlisticName (const char featureTag[4]) const
pure virtual
     Get the stylisticSet name of the font

Returns
PMString return the name of stylisticset if exist else return null string
Parameters
featureTagOpen type feature tag corresponding to the stylistic set eg: ss01,ss02

NOTE:-This API should be called only when virtual bool16 HasOTFeature(const char feature[4], const char script[4] = 0, const char language[4] = kDefaultLanguageTag) returns true for a given stylistic set feature tag

virtual FontTechnology IPMFont::GetFontTechnology () const
pure virtual

Get technology of font. See also GetFontType

Returns
FontTechnology
virtual FontType IPMFont::GetFontType () const
pure virtual

Get type of font.

Returns
FontType
virtual FontWeightType IPMFont::GetFontWeight () const
pure virtual

Gets the weight class of the font. This value is retrieved from the OS/2 table of a font. Some fonts may not have the OS/2 table or the version of the table in which this value is present.

Returns
The weight class value if it exists in the font; otherwise kCTFontWeightInvalid.
See Also
CTFontWeightClass
virtual FontWidthType IPMFont::GetFontWidth () const
pure virtual

Gets the width class of the font. This value is retrieved from the OS/2 table of a font. Some fonts may not have the OS/2 table or the version of the table in which this value is present.

Returns
The width class value if it exists in the font; otherwise kCTFontWidthInvalid.
See Also
CTFontWidthClass
virtual FontXHeightType IPMFont::GetFontXHeight () const
pure virtual

Gets the x-height class of the font. This value is retrieved from the OS/2 table of a font. Some fonts may not have the OS/2 table or the version of the table in which this value is present.

Returns
The x-height class value if it exists in the font; otherwise kCTFontXHeightInvalid.
See Also
CTFontXHeightClass
virtual K2Vector<PMString>* IPMFont::GetFullPath () const
pure virtual

Gets a vector of paths to the font file. Type 1 fonts have more than one file.

Returns
K2Vector<PMString>* vector of paths to the font file. Caller is responsible for calling delete on the returned K2Vector*.
virtual Text::GlyphID IPMFont::GetGlyphID (UTF32TextChar character,
bool16 vertical = kFalse 
) const
pure virtual

For a single unicode character get the glyphIDs.

Parameters
characterIN Unicode value to get glyphid
verticalIN get vertical glyphs if kTrue
Returns
Text::GlyphID the glyph corresponding to the character
virtual void IPMFont::GetGlyphIDs (const WideStringtextString,
K2Vector< Text::GlyphID > & glyphIDs,
bool16 vertical = kFalse 
) const
pure virtual

For a whole string or characters get the glyphIDs.

Parameters
textStringIN Unicode values to get glyphids from
glyphIDsOUT glyphIDs
verticalIN get vertical glyphs if kTrue
virtual std::string IPMFont::GetGlyphName (Text::GlyphID glyphID) const
pure virtual

Gets name of a glyph.

Returns the glyph name for the glyphid in the font.

Parameters
glyphIDglyphID to get name for
Returns
std::string name of glyph
virtual IPMFont::FontTechnology IPMFont::GetGlyphTechnology (Text::GlyphID glyphID) const
pure virtual

Get technology of font's glyph. Only different from GetFontTechnology for ATC fonts.

Returns
FontTechnology
virtual bool16 IPMFont::GetHasOutlines () const
pure virtual

This will be kFalse if outlines are not available for this font (ie, it is a pure bitmap font). It will return kTrue if outlines are available. Note that this value says nothing about the accessibility of outlines (ie, outline protected fonts will still return kTrue).

Returns
bool16 kTrue if outlines are available
virtual PMReal IPMFont::GetHorizEmBoxDepth () const
pure virtual

Returns the distance from the Roman baseline to the em-box bottom for the horizontal writing mode. This is used to calculate roman baseline offset for both horizontal and vertical text, since InDesign draws vertical text and horizontal text the same (the pen location is at the roman baseline).

Returns
PMReal horizontal em-box depth
virtual PMReal IPMFont::GetHorizICFBoxDepth () const
pure virtual

Returns the distance from the Roman baseline to the ICF box bottom for the horizontal writing mode. This is used to calculate roman baseline offset for both horizontal and vertical text, since InDesign draws vertical text and horizontal text the same (the pen location is at the roman baseline).

Returns
PMReal horizontal ICF box depth
virtual PMRect IPMFont::GetICFBox () const
pure virtual

Get ICF box. describing the left, top, right, and bottom edges (in horizontal writing mode) of the Ideographic Character Face (ICF) box of a 1-unit-em font. This value will be defined for every font (including non-CJK fonts), barring any internal error.

Returns
PMRect ICF box of font
virtual void IPMFont::GetICFBoxInsets (PMReal pointsize,
PMRealfromLineTop,
PMRealfromLineBottom,
bool16 vertical 
) const
pure virtual

Calculate inset of Ideographic Character Face (ICF) box from embox

Parameters
pointsizepoint size it get insets for
fromLineTopdistance of ICF top from embox top
fromLineBottomdistance of ICF bottom from embox bottom
verticalif kTrue figure out for vertical text.
virtual bool16 IPMFont::GetIsEmbeddedFont () const
pure virtual

Returns if this font is embedded

Returns
bool16 kTrue is font is embedded
virtual bool16 IPMFont::GetIsEPSFont () const
pure virtual

Returns if this font is from an EPS.

Returns
bool16 kTrue if font is from an EPS
virtual Text::GlyphID IPMFont::GetNotDefinedGlyph () const
pure virtual

Get glyph id of not defined glyph for this font

Returns
Text::GlyphID notdef glyph
virtual void IPMFont::GetNthDesignAxisLimits (int32 index,
Fixed * min,
Fixed * max 
) const
pure virtual

Get axis limit of multiple master font for index value. Only useful for multiple master fonts.

Parameters
indexindex into multiple master axes. 0 based and must be less than GetNumDesignAxes
minminimum value
maxmaximum value
virtual void IPMFont::GetNthValidGlyphIDRange (int32 nthRange,
Text::GlyphID & firstGlyphID,
Text::GlyphID & lastGlyphID 
) const
pure virtual

Gets the nth range of valid glyph ids. Use GetNumValidGlyphIDRanges to determine number of ranges.

Parameters
nthRangerange to get
firstGlyphIDOUT first glyph id of range
lastGlyphIDOUT last glyph id of range
virtual int32 IPMFont::GetNumAlternates (Text::GlyphID glyphID,
const char * feature 
) const
pure virtual

Find the number of alternates for this glyphID for a given feature

Parameters
glyphIDglyph to get number of alternates for
featurefeature to look for alternates
Returns
int32 number of alternates
virtual int32 IPMFont::GetNumDesignAxes () const
pure virtual

Get number of multiple master axes. 0 for non multiple master fonts.

Returns
int32 number of multiple master axes
virtual int32 IPMFont::GetNumGlyphNames () const
pure virtual

Gets the number of glyph names. If this font's technology is kType1Font then this method returns the number of the glyphs available in this font. This will also attempt to return names for TrueType fonts. Note, it's possible that some or all of the names returned are empty strings ("") because the True Type font doesn't have names available.

To get the number of glyphs in the font, use IPMFont::GetNumGlyphs.

Returns
int32 number of glyph names
virtual int32 IPMFont::GetNumGlyphs () const
pure virtual

Returns number of glyphs in font. For ATC fonts this is really max glyph id. ATC fonts do not have continuous glyph ids.

Returns
int32 number of glyphs in font
virtual int32 IPMFont::GetNumValidGlyphIDRanges () const
pure virtual

Gets number of glyph id ranges for this font. Use with GetNthValidGlyphIDRange to determine valid glyphids.

Returns
int32 Number of valid ranges
virtual bool16 IPMFont::GetOTGlyphAccess (Text::GlyphID glyphID,
GlyphAccessDataglyphAccessData,
int32 featureToSearchCount,
const char * featuresToSearch 
) const
pure virtual

Get unicode and Opentype feature that produces the glyphID passed in.

Parameters
glyphIDglyph to get access for
glyphAccessDatapass in preferences and returns results
featureToSearchCountnumber of OpenType features to search. -1 to search all available
featuresToSearchOpenType features to search. use nil if count is -1
Returns
bool16 kTrue if success. kFalse if an error occured
virtual PMString IPMFont::GetPlatformDependentName (IFontMgr::OriginalOS platformOS = IFontMgr::kOriginalUnknownOS) const
pure virtual

Provides the platform dependent name. On the Windows OS, this is the equivalent of the lfFaceName in a LOGFONT. On the Mac OS, this is the equivalent of the FOND name.

Parameters
platformOSThe operating system for which the name is needed. platformOS can be any of kOriginalMacOS, kOriginalWinOS, or kOriginalUnknownOS. If kOriginalUnknownOS is given, the first match for a given writing script is returned.
Returns
PMString platform name. If no name is found this will return an empty string.
virtual Text::GlyphID IPMFont::GetPlatformGlyphID (const char * charString,
int32 bytesPerChar = 1,
bool16 vertical = kFalse,
CTEncoding * encoding = nil 
) const
pure virtual

For a single platform character get the glyphIDs.

Parameters
characterIN value to get glyphid
stringLengthIN length of charString in bytes
verticalIN get vertical glyphs if kTrue
encodingIN encoding. If it is not provided, platform encoding is used.
Returns
Text::GlyphID the glyph corresponding to the character
virtual void IPMFont::GetPlatformGlyphIDs (const char * charString,
int32 stringLength,
K2Vector< Text::GlyphID > & glyphIDs,
bool16 vertical = kFalse,
CTEncoding * encoding = nil 
) const
pure virtual

For a char string get the glyphIDs.

Parameters
charStringIN platform values to get glyphids from
stringLengthIN length of charString in bytes
glyphIDsOUT glyphIDs
verticalIN get vertical glyphs if kTrue
encodingIN encoding. If it is not provided, platform encoding is used.
virtual std::string IPMFont::GetPostScriptName () const
pure virtual

Gets the postscript name of the font.

Returns
std::string PostScript name of the font
virtual K2Vector<FontProtection>* IPMFont::GetProtection () const
pure virtual

Get font's protection values.

Returns
K2Vector<FontProtection>* vector of font protection values. Caller is responsible for calling delete on the returned K2Vector*.
virtual PMString IPMFont::GetTypekitFontID () const
pure virtual

Get the typekit ID of the font

Returns
PMString typekit font id, if it is a typekit subscribed font, else empty string.
virtual void IPMFont::GetUnderlinePosition (PMRealyOffset,
PMRealthickness,
PMReal xScale = 1.0,
PMReal yScale = 1.0,
bool16 vertical = kFalse,
bool16 isTcy = kFalse 
) const
pure virtual

Get position for underline

Parameters
yOffset
thickness
xScale
yScale
vertical
isTcy
virtual int32 IPMFont::GetWritingScript () const
pure virtual

Get primary writing script of font. Usage of this should be phased out as fonts can now support multiple scripts and no one script may really be primary.

Returns
int32 script id
virtual PMReal IPMFont::GetXHeight (PMReal pointsize) const
pure virtual

Height of small 'x' if outline of x is available. Otherwise 2/3 of bbox height.

Parameters
pointsizepoint size it get x height for
Returns
PMReal
virtual bool16 IPMFont::HasOTFeature (const char feature[4],
const char script[4] = 0,
const char language[4] = kDefaultLanguageTag 
) const
pure virtual

Font has OpenType feature. See http://partners.adobe.com:80/asn/tech/type/opentype/feattags.jsp for listing of OpenType features.

Parameters
featurefour char's reprosenting the feature tag.
Returns
bool16 kTrue if font has feature.
virtual bool16 IPMFont::HasValidSVGOTDescForGlyph (Text::GlyphID glyphId) const
pure virtual

Whether the font has SVG glyph description for a particular glyphId.

Parameters
glyphId[IN] id of the glyph to check for SVG description
Returns
True only if there is an SVG document corresponding to the glyphId in the SVG table of the font. otherwise false.
virtual bool16 IPMFont::HorizontalMetricsProportionalByDefault () const
pure virtual

Returns true for fonts which contain proportional horizontal metrics. Set to true for CJK fonts which have proportional horizontal widths for characters that are typically full-width. For example, glyphs encoded in Unicode's Hiragana and Katakana blocks are usually full-width; in some fonts they are proportional-width. This is true for fonts like windows MS P Mincho and MS P Gothic. Only the glyphs' actual widths are checked; the client may use HasOTFeature() to check whether proportional metric layout features such as 'palt' and 'vpal' are present.

Returns
bool16 kTrue if font contains proportional horizontal metrics
virtual bool16 IPMFont::IsCFF () const
pure virtual

Whether the font is CFF (Compact Font Format)

Note that the font may be of Type 1 or CID font technology.

Returns
bool16 Returns true only if the font's glyphs are represented in CFF.
virtual bool16 IPMFont::IsColorFont () const
pure virtual

A way to tell if this is font has SVG or SBIX Table..

Returns
bool16 kTrue if font has SVG or SBIX Table, kFalse otherwise
virtual bool16 IPMFont::IsDefinedAndValidGlyph (Text::GlyphID checkGlyphID) const
pure virtual

Checks to see if checkGlyphID is in the range of glyphs for this font and that it is defined. Uses GetNthValidGlyphIDRange

Parameters
checkGlyphIDGlyph id to check
Returns
bool16 kTrue if valid. kFalse if invalid.
virtual bool16 IPMFont::IsEmojiFont () const
pure virtual

A way to tell if this is an Emoji Font..

Returns
bool16 kTrue if font is an Emoji Font, kFalse otherwise
virtual bool16 IPMFont::IsEqual (const IPMFontcompareFont) const
pure virtual

Compare the two IPMFonts to decide if they are the same. This means postscipt name, font type, and MM axis information are all the same. We compare CTFontDict and MM axis data. If the font is missing the postscript name is the name of the available font that replaces the missing one. Use AppendFontName(name, kTrue) to font out the missing postscript name.

Parameters
*compareFontfont to compare with
Returns
bool16 kTrue if same. kFalse if not
virtual bool16 IPMFont::IsNthDesignAxisHidden (int32 n)
pure virtual

Returns if the Nth design axis of variable fornt is hidden or not. If kTrue, then it is hidden.

Parameters
nis the Index of design Axis
virtual bool16 IPMFont::IsSBIXFont () const
pure virtual

A way to tell if this is font has SBIX Table..

Returns
bool16 kTrue if font has SBIX Table, kFalse otherwise
virtual bool16 IPMFont::IsSVGFont () const
pure virtual

A way to tell if this is an SVG Font..

Returns
bool16 kTrue if font is an SVG Font, kFalse otherwise
virtual bool16 IPMFont::IsTypekitDesktopFont () const
pure virtual

A way to tell if the font came from Typekit Desktop.

Returns
bool16 kTrue if font came from Typekit Desktop, kFalse otherwise
virtual bool16 IPMFont::IsValidGlyphID (Text::GlyphID checkGlyphID) const
pure virtual

Checks to see if checkGlyphID is in the range of glyphs for this font.

Parameters
checkGlyphIDGlyph id to check
Returns
bool16 kTrue if valid. kFalse if invalid.
virtual bool16 IPMFont::IsVariableFont () const
pure virtual
Returns
true if font is variable font, otherwise false.
virtual const char* IPMFont::NewOTFeaturesList (const char script[4] = 0,
const char language[4] = kDefaultLanguageTag 
) const
pure virtual

PeekOTFeatures

Returns
A buffer of the OpenType features in font, must be deleted after use.
virtual IPMFont* IPMFont::QueryComponentFontAndGlyphID (Text::GlyphID glyphID,
Text::GlyphID & componentGlyphID 
) const
pure virtual

Gets the component font for a glyph id. Only useful for ATC fonts.

Parameters
glyphIDglyphID to find font for
componentGlyphIDglyphID in component font
Returns
IPMFont* component font
virtual bool16 IPMFont::SetNthVariableDesignAxes (int32 n)
pure virtual

Sets the Nth instance's design axes of variable font.

Parameters
nIndex of instance in variable font dict
virtual void IPMFont::SetNthVariableDesignAxes (Fixed * designAxes)
pure virtual

Sets a variable instance's design axes of variable font, given design axes values.

Parameters
designAxesArray of design axis values
virtual void IPMFont::TranslateBaseline (PMRealGlyphPointstrikes,
int32 numStrikes,
PMMatrixmatrix,
BaselineType fromBaseline,
BaselineType toBaseline,
IFontMgr::WritingDirection writingDirection 
) const
pure virtual

Translate baseline

Parameters
*strikesIf non-NULL, pointer to an array of PMRealGlyphPoint's with numStrikes valid entries. Only the strikes' pt.xPosition (in the case of TopToBottom writing) or pt.yPosition (in the case of LeftToRight writing) will be read and modified. They are assumed to be in device space.
numStrikesNumber of entries in the strikes array, if the strikes parameter is non-NULL.
*matrixThe matrix that the strikes were scaled by. Pass NULL for the identity matrix.
fromBaselineThe baseline of the input strikes/points.
toBaselineThe desired baseline.
writingDirection
virtual bool16 IPMFont::UsesStandardEncoding () const
pure virtual

This is true if and only if this fonts technology key is kType1Font and the default type 1 encoding vector associated with this font is the PostScript "StandardEncoding" vector.

Returns
bool16 kTrue or kFalse
virtual bool16 IPMFont::VerticalMetricsProportionalByDefault () const
pure virtual

Returns true for fonts which contain proportional vertical metrics.

Returns
bool16 kTrue if font contains proportional vertical metrics