Class ShapedText
A sequence of positioned glyphs -- the visual representation of a given text string
Implements
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFTronDotNet.dll
Syntax
public class ShapedText : IDisposable
Constructors
ShapedText(IntPtr)
Declaration
public ShapedText(IntPtr impl_ptr)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | impl_ptr |
Methods
Destroy()
Declaration
public void Destroy()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~ShapedText()
Declaration
protected ~ShapedText()
GetFailureReason()
In the case where GetShapingStatus() returns something other than FullShaping, this method will return a more detailed reason behind the failure.
Declaration
public ShapedText.FailureReason GetFailureReason()
Returns
| Type | Description |
|---|---|
| ShapedText.FailureReason |
GetGlyph(uint)
Get the glyph ID at the indicated place in the shaped sequence. This number is specific to the font file used to generate the shaping results, and does not always have a clean mapping to a particular Unicode codepoint in the original string.
Declaration
public uint GetGlyph(uint index)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index | the index of the glyph to be retrieved. Must be less than GetNumGlyphs() |
Returns
| Type | Description |
|---|---|
| uint | returns the glyph ID for the indicated place in the shaped result |
GetGlyphXPos(uint)
The X position of the glyph at the requested index. This number has been scaled by GetScale().
Declaration
public double GetGlyphXPos(uint index)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index | the index of the glyph position to be retrieved. Must be less than GetNumGlyphs() |
Returns
| Type | Description |
|---|---|
| double | returns the X position for the glyph at the specified index |
GetGlyphYPos(uint)
The Y position of the glyph at the requested index. This number has been scaled by GetScale().
Declaration
public double GetGlyphYPos(uint index)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index | the index of the glyph position to be retrieved. Must be less than GetNumGlyphs() |
Returns
| Type | Description |
|---|---|
| double | returns the Y position for the glyph at the specified index |
GetNumGlyphs()
Number of glyphs present in the shaped text. Might be different from the .
Declaration
public int GetNumGlyphs()
Returns
| Type | Description |
|---|---|
| int | returns the number of utf32 codepoints in this shaped text |
GetScale()
Scaling factor of this shaped text relative to the em size. A scaling factor of 1 means that all units are relative to the em size. PDF scaling is typically 1000 units per em.
Declaration
public double GetScale()
Returns
| Type | Description |
|---|---|
| double | returns the scaling factor for the glyph positions |
GetShapingStatus()
Get the state of the shaping operation. Even if the shaping did not fully succeed, this object can be added to an elementbuilder, and will fallback to placing unshped text. See GetFailureReason() in the case this method returns something other than FullShaping.
Declaration
public ShapedText.ShapingStatus GetShapingStatus()
Returns
| Type | Description |
|---|---|
| ShapedText.ShapingStatus |
GetText()
The original source text string.
Declaration
public string GetText()
Returns
| Type | Description |
|---|---|
| string | returns the source text string |