![]() | InDesign SDK 20.5 |
#include <SLCTextGlyphNode.h>

Public Member Functions | |
| SLCTextGlyphNode (IComposeScanner *composeScanner, IDrawingStyle *drawingStyle, TextIndex startingIndex, const PMReal &xOffset) | |
| virtual | ~SLCTextGlyphNode (void) |
| virtual SLComposerStatusCode | GetGlyph (const UTF32TextChar &character, Text::GlyphID &glyphID, PMReal &glyphWidth) |
| virtual SLComposerStatusCode | BufferGlyph (const UTF32TextChar &character, const Text::GlyphID &glyphID, const PMReal &glyphWidth) |
| virtual PMReal | GetWidth (void) const |
| virtual SLComposerStatusCode | FindTextBreak (void) |
| virtual bool16 | GetTrailingWhiteSpaceWidth (PMReal &width) const |
| virtual bool16 | FitTrailingWhiteSpace (const PMReal &widthScaleFactor) |
| virtual SLComposerStatusCode | CreateWax (const IWaxLine *waxLine) const |
| virtual IWaxRun * | CreateWaxRun (void) const |
Public Member Functions inherited from SLCGlyphNode | |
| SLCGlyphNode (IComposeScanner *composeScanner, IDrawingStyle *drawingStyle, TextIndex startingIndex, const PMReal &xOffset, GlyphNodeType glyphNodeType) | |
| virtual SLComposerStatusCode | GetStatus () const |
| virtual | ~SLCGlyphNode () |
| virtual IDrawingStyle * | GetDrawingStyle () const |
| virtual const int32 & | GetTextSpan () const |
| const PMReal & | GetLeading () const |
| const PMReal & | GetAscent () const |
| const PMReal & | GetCapHeight () const |
| const PMReal & | GetXHeight () const |
| const TextIndex & | GetTextIndex () const |
| bool16 | IsTrailingWhiteSpace (const UTF32TextChar &character) const |
| virtual void | Dump (const char *msg) const |
| void | SetTextSpan (int32 count) |
Protected Member Functions | |
| const PMReal & | GetPointSize (void) const |
| SLComposerStatusCode | GrowBuffers (void) |
| void | CalculateFixedToPMRealEmDashWidthRoundingError (void) |
| const PMReal & | GetFixedToPMRealEmDashWidthRoundingError (void) const |
| const PMReal & | GetEmDashWidth (void) const |
| virtual Text::GlyphID | DetermineGlyphID (const UTF32TextChar &character) const |
| virtual PMReal | DetermineGlyphWidth (const Text::GlyphID &glyphID) const |
| virtual K2Vector< Text::GlyphID > | GetGlyphIDs (void) |
| virtual K2Vector< PMReal > | GetGlyphWidths (void) |
| virtual SLComposerStatusCode | ApplyTextBreakRules (void) |
| virtual SLComposerStatusCode | GetCharacter (int32 glyphNodeIndex, UTF32TextChar &character) const |
| virtual SLComposerStatusCode | PushOut (UTF32TextChar &lastCharacter) |
Additional Inherited Members | |
Public Types inherited from SLCGlyphNode | |
| enum | GlyphNodeType { kGNTText = 0, kGNTInlineGraphic } |
Protected Attributes inherited from SLCGlyphNode | |
| SLComposerStatusCode | fStatus |
| IComposeScanner * | fComposeScanner |
| IDrawingStyle * | fDrawingStyle |
| PMReal | fXOffset |
| TextIndex | fTextIndex |
| PMReal | fLeading |
| PMReal | fAscent |
| PMReal | fCapHeight |
| PMReal | fXHeight |
| int32 | fTextSpan |
| const GlyphNodeType | fGlyphNodeType |
Represents a run of styled text and generates its wax run object(kWaxTextRunBoss).
This class uses the style and font APIs (IDrawingStyle, IPMFont and IFontInstance) to discover essential metrics such as leading, ascent etc. It maps a character code into its corresponding GlyphID and stores it in a buffer along with its width. It understands how to locate points where Roman text can be broken across lines or tile.
| SLCTextGlyphNode::SLCTextGlyphNode | ( | IComposeScanner * | composeScanner, |
| IDrawingStyle * | drawingStyle, | ||
| TextIndex | startingIndex, | ||
| const PMReal & | xOffset | ||
| ) |
Caches the font and font metrics for the text.
| virtual |
Releases references and memory.
| protectedvirtual |
Applies rules to find where Roman text can be broken.
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| protected |
Calculate the width rounding error introduced by fixed-point math for an em-dash character in the current IFontInstance.
This rounding error is used to compensate for the fact that fixed-point math in AGM is only fully accurate to the 4th decimal place.
The internal units used by composition is Points. The measure used in Roman fonts is points so rounding error is not significant for Roman composition. However other measures such as Japanese Q units need more accuracy to round trip to the internal measure.
In AGM a fixed-point number is 32 bits long. The low-order 16 bits contain the fractional part of the number and the high-order 16 bits contain the integer part of the number. Note 1/32767 ~ 0.0000305.
The adjustment calculated here for an em-dash is applied proportionally to each fixed-point glyph width.
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| virtual |
Creates a kWaxTextRunBoss object (see SLCGlyphNode for other info).
Implements SLCGlyphNode.
| protectedvirtual |
Determine the GlyphID for a given character from the IFontInstance for this run. Handles kTextChar_SpecialGlyph character used to describe glyphs that have no corresponding Unicode character code. Such characters have text attribute kTextAttrSpecialGlyphBoss applied which is used to map in the desired GlyphID from the font. The mapping is obtained via a method on IDrawingStyle.
| character |
| protectedvirtual |
Determine the width of the given glyph.
| glyphID |
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| protectedvirtual |
Get the character code corresponding to the glyph at the given index in this object.
| glyphNodeIndex | |
| character | at the given index |
| inlineprotected |
| inlineprotected |
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| inlineprotectedvirtual |
| inlineprotected |
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| virtual |
See SLCGlyphNode.
Implements SLCGlyphNode.
| protected |
Check if the dynamic buffers in this object can take another glyph and grow them if necessary.
| protectedvirtual |
Remove the last glyph in this object from the buffer.
| lastCharacter | OUT the character associated with what is now the last glyph in this object. |