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.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: pdftron.PDF
Assembly: PDFTronDotNet.dll
Syntax
public class ShapedText : IDisposable

Constructors

ShapedText(IntPtr)

Declaration
public ShapedText(IntPtr impl_ptr)
Parameters
Type Name Description
System.IntPtr impl_ptr

Methods

Destroy()

Declaration
public void Destroy()

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

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

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
System.UInt32 index

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

Returns
Type Description
System.UInt32

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

GetGlyphXPos(UInt32)

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
System.UInt32 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(UInt32)

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