Show / Hide Table of Contents

Class ShapedText

A sequence of positioned glyphs -- the visual representation of a given text string

Inheritance
System.Object
ShapedText
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public sealed class ShapedText : IDisposable

Methods

Dispose()

Declaration
public override sealed void Dispose()

Dispose(Boolean)

Declaration
[HandleProcessCorruptedStateExceptions]
protected void Dispose(bool A_0)
Parameters
Type Name Description
System.Boolean A_0

Finalize()

Declaration
protected void Finalize()

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(Int32)

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 int GetGlyph(int index)
Parameters
Type Name Description
System.Int32 index

the index of the glyph to be retrieved. Must be less than GetNumGlyphs()

Returns
Type Description
System.Int32

returns the glyph ID for the indicated place in the shaped result

GetGlyphXPos(Int32)

The X position of the glyph at the requested index. This number has been scaled by GetScale().

Declaration
public double GetGlyphXPos(int index)
Parameters
Type Name Description
System.Int32 index

the index of the glyph position to be retrieved. Must be less than GetNumGlyphs()

Returns
Type Description
System.Double

returns the X position for the glyph at the specified index

GetGlyphYPos(Int32)

The Y position of the glyph at the requested index. This number has been scaled by GetScale().

Declaration
public double GetGlyphYPos(int index)
Parameters
Type Name Description
System.Int32 index

the index of the glyph position to be retrieved. Must be less than GetNumGlyphs()

Returns
Type Description
System.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
System.Int32

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
System.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
System.String

returns the source text string

Implements

System.IDisposable
Back to top Generated by DocFX