#include <ShapedText.h>
Public Types | |
enum | ShapingStatus { e_FullShaping = 0, e_PartialShaping = 1, e_NoShaping = 2 } |
enum | FailureReason { e_NoFailure = 0, e_UnsupportedFontType = 1, e_NotIndexEncoded = 2, e_FontDataNotFound = 3 } |
Public Member Functions | |
ShapedText () | |
ShapedText (const ShapedText &other) | |
ShapedText (TRN_ShapedText impl) | |
ShapedText & | operator= (const ShapedText &other) |
~ShapedText () | |
void | Destroy () |
double | GetScale () const |
ShapingStatus | GetShapingStatus () const |
FailureReason | GetFailureReason () const |
UString | GetText () const |
int | GetNumGlyphs () const |
UInt32 | GetGlyph (UInt32 index) const |
double | GetGlyphXPos (UInt32 index) const |
double | GetGlyphYPos (UInt32 index) const |
Public Attributes | |
TRN_ShapedText | m_impl |
The class ShapedText. A sequence of positioned glyphs – the visual representation of a given text string
Definition at line 23 of file ShapedText.h.
Enumerator | |
---|---|
e_NoFailure | |
e_UnsupportedFontType | |
e_NotIndexEncoded | |
e_FontDataNotFound |
Definition at line 32 of file ShapedText.h.
Enumerator | |
---|---|
e_FullShaping | |
e_PartialShaping | |
e_NoShaping |
Definition at line 27 of file ShapedText.h.
pdftron::PDF::ShapedText::ShapedText | ( | ) |
pdftron::PDF::ShapedText::ShapedText | ( | const ShapedText & | other | ) |
pdftron::PDF::ShapedText::ShapedText | ( | TRN_ShapedText | impl | ) |
pdftron::PDF::ShapedText::~ShapedText | ( | ) |
void pdftron::PDF::ShapedText::Destroy | ( | ) |
FailureReason pdftron::PDF::ShapedText::GetFailureReason | ( | ) | const |
In the case where GetShapingStatus() returns something other than FullShaping, this method will return a more detailed reason behind the failure.
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.
index | – the index of the glyph to be retrieved. Must be less than GetNumGlyphs(). |
double pdftron::PDF::ShapedText::GetGlyphXPos | ( | UInt32 | index | ) | const |
The X position of the glyph at the requested index. This number has been scaled by GetScale().
index | – the index of the glyph position to be retrieved. Must be less than GetNumGlyphs(). |
double pdftron::PDF::ShapedText::GetGlyphYPos | ( | UInt32 | index | ) | const |
The Y position of the glyph at the requested index. This number has been scaled by GetScale().
index | – the index of the glyph position to be retrieved. Must be less than GetNumGlyphs(). |
int pdftron::PDF::ShapedText::GetNumGlyphs | ( | ) | const |
Number of glyphs present in the shaped text. Might be different from the .
double pdftron::PDF::ShapedText::GetScale | ( | ) | const |
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.
ShapingStatus pdftron::PDF::ShapedText::GetShapingStatus | ( | ) | const |
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.
UString pdftron::PDF::ShapedText::GetText | ( | ) | const |
The original source text string.
ShapedText& pdftron::PDF::ShapedText::operator= | ( | const ShapedText & | other | ) |
TRN_ShapedText pdftron::PDF::ShapedText::m_impl |
Definition at line 108 of file ShapedText.h.