#include <IPairKernDict.h>
|
| enum | { kDefaultIID = IID_IPAIRKERNDICT } |
| |
| enum | { kDefaultServiceID = kPairKerningService } |
| |
|
| 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 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
IPairKernDict is the interface used by text composition to calculate kern pairs.
| virtual bool16 IPairKernDict::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 |
| pure virtual |
Calculate kern pairs for a pair of glyphs using different text attributes.
- Parameters
| vertical | is the text vertical? |
| style | are 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. |
| g1 | is the first glyph. |
| style2 | are 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. |
| g2 | is the second glyph. |
| xk | should be set the the fixed point kerning value in the horizontal axis. |
| yk | should be set the the fixed point kerning value in the vertical axis. |
| kernChars | is 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 |
| paraStyle | should 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. |
| scriptTag | specifies the OpenType script tag. Nil -> font's default script. |
| langTag | specifies the OpenType language tag. Nil -> font's default language. |
| virtual bool16 IPairKernDict::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 |
| pure virtual |
Calculate a kern pair for a pair of glyphs.
- Parameters
| vertical | is the text vertical? |
| style | are the attributes applied. Get the font, pointsize, etc from here. |
| g1 | is the first glyph. |
| g2 | is the second glyph. |
| xk | should be set the the fixed point kerning value in the horizontal axis. |
| yk | should be set the the fixed point kerning value in the vertical axis. |
| kernChars | is 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 |
| scriptTag | specifies the OpenType script tag. Nil -> font's default script. |
| langTag | specifies the OpenType language tag. Nil -> font's default language. |
| virtual bool16 IPairKernDict::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 |
| pure virtual |
Calculate kern pairs for a buffer of glyphs.
- Parameters
| vertical | is the text vertical? |
| style | are the attributes applied. Get the font, pointsize, etc from here. |
| glyphs | is a buffer of glyphs. |
| xKerns | is 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. |
| yKerns | is a buffer that will be filled with the kern pair adjustments for vertical text. |
| bufSize | is the number of elements in the 3 buffers. |
| kernChars | is 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 |
| scriptTag | specifies the OpenType script tag. Nil -> font's default script. |
| langTag | specifies the OpenType language tag. Nil -> font's default language. |
Calculate kern pairs for a buffer of PMRealGlyphPoints.
- Parameters
| vertical | is the text vertical? |
| style | are the attributes applied. Get the font, pointsize, etc from here. |
| strike | is a buffer of PMRealGlyphPoints. Adjust the xPosition and yPosition fields directly. |
| number | is the number of glyph points used in the buffer. |
| bufSize | is the number of elements in the 3 buffers. |
| kernChars | is 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 |
| scriptTag | specifies the OpenType script tag. Nil -> font's default script. |
| langTag | specifies the OpenType language tag. Nil -> font's default language. |