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

#include <IPairKernDict.h>

Inheritance diagram for IPairKernDict:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPAIRKERNDICT }
 
enum  { kDefaultServiceID = kPairKerningService }
 

Public Member Functions

virtual bool16 SingleStyleKerns (bool16 vertical, const IDrawingStyle *style, const Text::GlyphID *glyphs, PMReal *xkerns, PMReal *yKerns, int32 bufSize, const WideStringConstUTF32Iter *kernChars=nil, const char *scriptTag=nil, const char *langTag=nil) const =0
 
virtual bool16 SingleStyleKern (bool16 vertical, const IDrawingStyle *style, Text::GlyphID g1, Text::GlyphID g2, PMReal *xk, PMReal *yk, const WideStringConstUTF32Iter *kernChars=nil, const char *scriptTag=nil, const char *langTag=nil) const =0
 
virtual bool16 MultiStyleKern (bool16 vertical, const IDrawingStyle *style1, Text::GlyphID g1, const IDrawingStyle *style2, Text::GlyphID g2, PMReal *xk, PMReal *yk, const WideStringConstUTF32Iter *kernChars=nil, const IDrawingStyle *paraStyle=nil, const char *scriptTag=nil, const char *langTag=nil) const =0
 
virtual bool16 SingleStyleKerns (bool16 vertical, const IDrawingStyle *style, PMRealGlyphPoint *strike, int32 number, const WideStringConstUTF32Iter *kernChars=nil, const char *scriptTag=nil, const char *langTag=nil) const =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

IPairKernDict is the interface used by text composition to calculate kern pairs.

Member Function Documentation

virtual bool16 IPairKernDict::MultiStyleKern (bool16 vertical,
const IDrawingStylestyle1,
Text::GlyphID g1,
const IDrawingStylestyle2,
Text::GlyphID g2,
PMRealxk,
PMRealyk,
const WideStringConstUTF32IterkernChars = nil,
const IDrawingStyleparaStyle = nil,
const char * scriptTag = nil,
const char * langTag = nil 
) const
pure virtual
Calculate kern pairs for a pair of glyphs using different text attributes.

Parameters
verticalis the text vertical?
styleare the attributes applied to the first character. Get the font, pointsize, etc from here. The method CanSimpleKernWith() may be used to determine if the 2 glyphs are compatible for kerning.
g1is the first glyph.
style2are the attributes applied to the second character. Get the font, pointsize, etc from here. The method CanSimpleKernWith() may be used to determine if the 2 glyphs are compatible for kerning.
g2is the second glyph.
xkshould be set the the fixed point kerning value in the horizontal axis.
ykshould be set the the fixed point kerning value in the vertical axis.
kernCharsis an iterator may point to the characters used to produce the glyphs. Mostly, the glyphs are sufficient for kerning. Other glyph substitutions (ligatures, fractions) may have already occured
paraStyleshould be set (if possible) to the root paragraph attributes for this text. This can allow kerning services to tune kerns of mixed sizes to favor the paragraph's overall color.
scriptTagspecifies the OpenType script tag. Nil -> font's default script.
langTagspecifies the OpenType language tag. Nil -> font's default language.
virtual bool16 IPairKernDict::SingleStyleKern (bool16 vertical,
const IDrawingStylestyle,
Text::GlyphID g1,
Text::GlyphID g2,
PMRealxk,
PMRealyk,
const WideStringConstUTF32IterkernChars = nil,
const char * scriptTag = nil,
const char * langTag = nil 
) const
pure virtual
Calculate a kern pair for a pair of glyphs.

Parameters
verticalis the text vertical?
styleare the attributes applied. Get the font, pointsize, etc from here.
g1is the first glyph.
g2is the second glyph.
xkshould be set the the fixed point kerning value in the horizontal axis.
ykshould be set the the fixed point kerning value in the vertical axis.
kernCharsis an iterator may point to the characters used to produce the glyphs. Mostly, the glyphs are sufficient for kerning. Other glyph substitutions (ligatures, fractions) may have already occured
scriptTagspecifies the OpenType script tag. Nil -> font's default script.
langTagspecifies the OpenType language tag. Nil -> font's default language.
virtual bool16 IPairKernDict::SingleStyleKerns (bool16 vertical,
const IDrawingStylestyle,
const Text::GlyphID * glyphs,
PMRealxkerns,
PMRealyKerns,
int32 bufSize,
const WideStringConstUTF32IterkernChars = nil,
const char * scriptTag = nil,
const char * langTag = nil 
) const
pure virtual
Calculate kern pairs for a buffer of glyphs.

Parameters
verticalis the text vertical?
styleare the attributes applied. Get the font, pointsize, etc from here.
glyphsis a buffer of glyphs.
xKernsis a buffer that will be filled with the kern pair metrics. For example, if the first 2 glyphs are the glyphs for 'W' 'A' then xKerns[0] will be kern pair value.
yKernsis a buffer that will be filled with the kern pair adjustments for vertical text.
bufSizeis the number of elements in the 3 buffers.
kernCharsis an iterator may point to the characters used to produce the glyphs. Mostly, the glyphs are sufficient for kerning. Other glyph substitutions (ligatures, fractions) may have already occured
scriptTagspecifies the OpenType script tag. Nil -> font's default script.
langTagspecifies the OpenType language tag. Nil -> font's default language.
virtual bool16 IPairKernDict::SingleStyleKerns (bool16 vertical,
const IDrawingStylestyle,
PMRealGlyphPointstrike,
int32 number,
const WideStringConstUTF32IterkernChars = nil,
const char * scriptTag = nil,
const char * langTag = nil 
) const
pure virtual
Calculate kern pairs for a buffer of PMRealGlyphPoints.

Parameters
verticalis the text vertical?
styleare the attributes applied. Get the font, pointsize, etc from here.
strikeis a buffer of PMRealGlyphPoints. Adjust the xPosition and yPosition fields directly.
numberis the number of glyph points used in the buffer.
bufSizeis the number of elements in the 3 buffers.
kernCharsis an iterator may point to the characters used to produce the glyphs. Mostly, the glyphs are sufficient for kerning. Other glyph substitutions (ligatures, fractions) may have already occured
scriptTagspecifies the OpenType script tag. Nil -> font's default script.
langTagspecifies the OpenType language tag. Nil -> font's default language.