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

#include <IFontMetricsTable.h>

Inheritance diagram for IFontMetricsTable:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IFONTMETRICSTABLE }
 

Public Member Functions

virtual bool16 GetTsumeHorizontal (const PMMatrix &matrix, Text::GlyphID glyph, PMReal *before, PMReal *after)=0
 
virtual bool16 GetTsumeVertical (const PMMatrix &matrix, Text::GlyphID glyph, PMReal *above, PMReal *below)=0
 
virtual void ClearTable ()=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

In the Japanese version of InDesign a feature called "Tsume" is available. This feature removes a percentage of the whitespace from either side of a glyph. It works by getting the exact ink bounding box of a particular glyph and comparing that with the pen-advance. Because this data is completely unavailable when the font is missing, we store the values, as they are used, in this table. Each font that has been used with Tsume has its own table. These tables are available from the IFontMetricTableList.

See Also
IFontMetricsTableList

Member Function Documentation

virtual void IFontMetricsTable::ClearTable ()
pure virtual

Clear the table of saved side-bearings for this font. This function is generally only called by IFontMetricsTableList::ClearFontMetricsTable which is called by the composite font system.

virtual bool16 IFontMetricsTable::GetTsumeHorizontal (const PMMatrixmatrix,
Text::GlyphID glyph,
PMRealbefore,
PMRealafter 
)
pure virtual

For a glyphID at a particular size, get the amount of white space before & after the actual ink bounds in the horizontal direction.

Parameters
matrixspecifies the character matrix being considered. Only the 2x2 matrix is used.
glyphis the glyphID of requested.
beforeRETURNS the amount of whitespace before the glyph. Can be nil.
afterRETURNS the amount of whitespace after the glyph. Can be nil.
Returns
kFalse if the font was missing or the glyph was unavailable in some way.
virtual bool16 IFontMetricsTable::GetTsumeVertical (const PMMatrixmatrix,
Text::GlyphID glyph,
PMRealabove,
PMRealbelow 
)
pure virtual

For a glyphID at a particular size, get the amount of white space above & below the actual ink bounds in the vertical direction.

Parameters
matrixspecifies the character matrix being considered. Only the 2x2 matrix is used.
glyphis the glyphID of requested.
aboveRETURNS the amount of whitespace above the glyph. Can be nil.
belowRETURNS the amount of whitespace below the glyph. Can be nil.
Returns
kFalse if the font was missing or the glyph was unavailable in some way.