Mako 7.5.0 API
Loading...
Searching...
No Matches
IDOMGlyphs Class Referenceabstract

An abstract class providing an interface to a "Glyphs" node. Glyphs nodes are used to represent a run of uniformly formatted text from a single font. Text runs are broken by line advances and formatting changes. When a text run is broken, a new Glyphs node will be created to describe the text from the change point onwards. More...

#include <idomglyphs.h>

Inheritance diagram for IDOMGlyphs:

Classes

class  Data
 Initialization data. More...
 

Public Types

enum  eStyleSimulations
 Specifies a style simulation for a glyphs node.
 

Public Member Functions

virtual uint8 getBidiLevel () const =0
 Retrieves the bidiLevel of the text run.
 
virtual void setBidiLevel (uint8 bidiLevel)=0
 Sets the bidiLevel for this run of text.
 
virtual const EDLSysString & getCaretStops () const =0
 Retrieves the XPS-specific caret stop specification for a run of glyphs.
 
virtual void setCaretStops (const EDLSysString &caretStops)=0
 Sets the XPS-specific caret stop specification for a run of glyphs.
 
virtual const EDLString & getDeviceFontName () const =0
 Retrieves the XPS-specific device font name. The device font name, which uniquely identifies a specific device font. The identifier is typically defined by a hardware vendor or font vendor.
 
virtual void setDeviceFontName (const EDLString &name)=0
 Sets the the XPS-specific device font name The device font name, which uniquely identifies a specific device font. The identifier is typically defined by a hardware vendor or font vendor.
 
virtual double getFontRenderingEmSize () const =0
 Retrieves the font rendering em size in drawing surface units. The font rendering em size is expressed as a floating point value in units of the effective coordinate space. A value of 0 results in no visible text.
 
virtual void setFontRenderingEmSize (double emSize)=0
 Sets the font rendering em size in drawing surface units. The font rendering em size is expressed as a floating point value in units of the effective coordinate space. A value of 0 results in no visible text.
 
virtual IDOMFontPtr getFont () const =0
 Retrieves a pointer to the font object describing the font in which the text is displayed.
 
virtual void setFont (const IDOMFontPtr &font)=0
 Sets the font object to be used to display the text.
 
virtual uint32 getFontIndex () const =0
 Retrieves the font index.
 
virtual void setFontIndex (uint32 index)=0
 Sets the font index.
 
virtual double getOriginX () const =0
 Retrieves the x-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.
 
virtual void setOriginX (double originX)=0
 Sets the x-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.
 
virtual double getOriginY () const =0
 Retrieves the y-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.
 
virtual void setOriginY (double originY)=0
 Sets the y-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.
 
virtual bool getIsSideways () const =0
 Indicates that a glyph is turned on its side, with the origin being defined as the top center of the unturned glyph.
 
virtual void setIsSideways (bool isSideways)=0
 Sets the IsSideways value. See getIsSideways for a description of the effects of IsSideways.
 
virtual const EDLSysString & getIndices () const =0
 Retrieves a Unicode string that represents the text of the run of glyphs.
 
virtual void setIndices (const EDLSysString &indices)=0
 Sets the glyphs indices.
 
virtual const EDLString & getUnicodeString () const =0
 Gets the Unicode string that represents the text of the run of glyphs.
 
virtual void setUnicodeString (const EDLString &unicodeString)=0
 Sets the Unicode string that represents the text of the run of glyphs.
 
virtual IGlyphsClustersPtr getClusters () const =0
 Unpack the UnicodeString and Indices strings into a set of clusters representing the smallest units of information in the text. This form combines the unicode and indices information such that they are more easily edited together. The returned IGlyphsCluster instance can be edited freely; a new instance is returned on every call. However, for the changes to have effect, setClusters() must be called to repopulate the UnicodeString and Indices.
 
virtual void setClusters (const IGlyphsClustersPtr &clusters)=0
 Populate the glyphs node UnicodeString and Indices from the given set of glyphs clusters.
 
virtual eStyleSimulations getStyleSimulations () const =0
 Retrieves the style simulation value.
 
virtual void setStyleSimulations (eStyleSimulations styleSimulations)=0
 Retrieves the style simulation value.
 
virtual const FMatrixgetRenderTransform () const =0
 Retrieves the render transform matrix of the Glyphs node and its children. The render transform establishes a new coordinate frame for the child and descendants of the Glyphs node. The render transform also affects clip and opacity masks, fill, x-origin, y-origin, the actual shape of the individual glyphs and the advance widths. The render transform also affects the font size and values specified by the indices setting.
 
virtual void setRenderTransform (const FMatrix &matrix)=0
 Sets the render transform matrix of the Glyphs node and its children. The render transform establishes a new coordinate frame for the child and descendants of the Glyphs node. The render transform also affects clip and opacity masks, fill, x-origin, y-origin, the actual shape of the individual glyphs and the advance widths. The render transform also affects the font size and values specified by the indices setting.
 
virtual float getOpacity () const =0
 Retrieves the opacity value of the Glyphs node. The opacity value defines the uniform transparency of the canvas. The opacity value is a number between 0 (fully transparent) and 1 (fully opaque). Values outside this range are invalid. The default value is 1.0.
 
virtual void setOpacity (float opc)=0
 Sets the opacity value of the Glyphs node. The opacity value defines the uniform transparency of the canvas. The opacity value is a number between 0 (fully transparent) and 1 (fully opaque). Values outside this range are invalid. The default value is 1.0. Will return 0.0 if the node is intended to be inivisible (see #setIsInivisible()).
 
virtual eBlendMode getBlendMode () const =0
 Gets the blend mode to be used for rendering this node.
 
virtual void setBlendMode (eBlendMode blendMode)=0
 Sets the blend mode to be used for rendering this node. Note: modes other than Normal are not directly representable in XPS.
 
virtual IDOMTargetPtr getNavigateLink () const =0
 Retrieves the target of a hyperlink.
 
virtual void setNavigateLink (const IDOMTargetPtr &target)=0
 Sets the target of a hyperlink.
 
virtual const EDLString & getLanguage () const =0
 Retrieves the default language of the Glyphs element and any of its children.
 
virtual void setLanguage (const EDLString &lang)=0
 Sets the default language of the Glyphs element and any of its children.
 
virtual IDOMBrushPtr getOpacityMask () const =0
 Retrieves the opacity mask for the node. The opacity mask specifies a mask of alpha values that is applied to the glyphs in the same fashion as the opacity setting, but allowing different alpha values for different areas of the canvas.
 
virtual void setOpacityMask (const IDOMBrushPtr &ptrOpacityMask)=0
 Sets the opacity mask for the node. The opacity mask specifies a mask of alpha values that is applied to the glyphs in the same fashion as the opacity setting, but allowing different alpha values for different areas of the canvas.
 
virtual IDOMPathGeometryPtr getClip () const =0
 Retrieves the clip for the Glyphs node. The clip limits the rendered region of the glyph.
 
virtual void setClip (const IDOMPathGeometryPtr &ptrClip)=0
 Sets the clip for the Glyphs node. The clip limits the rendered region of the glyph.
 
virtual IDOMBrushPtr getFill () const =0
 Retrieves the fill brush used to fill the shape of the rendered glyphs.
 
virtual void setFill (const IDOMBrushPtr &ptrFill)=0
 Sets the fill brush used to fill the shape of the rendered glyphs.
 
virtual IDOMGlyph::CDOMGlyphDataVect getFlattenedGlyphInfo () const =0
 Retrieves the flattened glyph information, indicating every glyph that results from painting this glyphs nodes. The results are provided as a simple vector of IDOMGlyph::Data objects, laid out according to the glyphs node with offsets, glyph positioning, advance, bounds, unicode (if present) and glyph ID information computed.
 
virtual bool getIsCharPath () const =0
 Retrieves a Boolean value which indicates if this Glyphs node is intended to draw a path.
 
virtual void setIsCharPath (bool isCharPath)=0
 Sets the flag to indicate if this glyph is intended to draw a path.
 
virtual bool getIsInvisible () const =0
 Retrieves a Boolean value which indicates if this Glyphs node is intended to be invisible.
 
virtual void setIsInvisible (bool isInvisible)=0
 Sets the flag to indicate if this glyph is intended to be invisible.
 
virtual IDOMPathNodePtr getEquivalentPath () const =0
 Get a graphically equivalent path node for the glyphs node, with all glyphs converted to path geometry. Not possible for glyphs nodes using Type 3 fonts, and will result in an exception.
 
virtual IDOMNodePtr split () const =0
 Split the glyphs node into a series of glyph nodes each consisting of the smallest possible unit.
 
virtual IDOMNodePtr hardSplit () const =0
 Split the glyphs node into a series of glyph nodes each consisting of single glyphs.
 
virtual bool validateInstructions () const =0
 Validate glyph instructions.
 
virtual bool getFillOverprints () const =0
 Retrieves whether or not the fill should overprint. Overprinting is honored only for rendering, PDF and PostScript output. It will also be honored should any output need to render as part of producing the output.
 
virtual void setFillOverprints (bool overprint=true)=0
 Sets whether or not the fill should overprint. Overprinting is honored only for rendering, PDF and PostScript output. It will also be honored should any output need to render as part of producing the output.
 
virtual bool getOverprintMode () const =0
 Retrieves whether or not overprint should obey PDF/PS overprint mode semantics. PDF and PostScript support a manner of overprinting for CMYK scenarios where an individual CMYK component may overprint if that channel is zero and the rendering target is also the same CMYK color space (excluding some transparency group scenarios). Setting overprint mode to true enables this feature.
 
virtual void setOverprintMode (bool mode=true)=0
 Sets whether or not overprint should obey PDF/PS overprint mode semantics. PDF and PostScript support a manner of overprinting for CMYK scenarios where an individual CMYK component may overprint if that channel is zero and the rendering target is also the same CMYK color space (excluding some transparency group scenarios). Setting overprint mode to true enables this feature.
 
virtual eRenderingIntent getRenderingIntent () const =0
 Get the rendering intent for the node if present. The rendering intent is used whenever the node requires color conversion to a different color space. Set eRenderingIntentUnset to unset the rendering intent, in which a default will be chosen based on the color space in use. This setting is honored only for rendering, color conversion, PDF or PostScript output.
 
virtual void setRenderingIntent (eRenderingIntent intent)=0
 Set or clear the rendering intent for the node. The rendering intent is used whenever the node requires color conversion to a different color space. Set eRenderingIntentUnset to unset the rendering intent, in which a default will be chosen based on the color space in use. This setting is honored only for rendering, color conversion, PDF or PostScript output.
 
virtual eBlackPointCompensation getBlackPointCompensation () const =0
 Get the black point compensation for the node. The black point compensation setting is used whenever the node requires color conversion to a different color space and affects how dark regions are handled. This setting is honored only for rendering, color conversion, PDF or PostScript output.
 
virtual void setBlackPointCompensation (eBlackPointCompensation compensation)=0
 Set the black point compensation for the node. The black point compensation setting is used whenever the node requires color conversion to a different color space and affects how dark regions are handled. This setting is honored only for rendering, color conversion, PDF or PostScript output.
 
- Public Member Functions inherited from IDOMNode
virtual ~IDOMNode ()
 virtual destructor
 
virtual DOMid getDOMid () const =0
 Retrieves the node ID.
 
virtual void setDOMid (DOMid id)=0
 Sets the node ID.
 
virtual eDOMNodeType getNodeType () const =0
 Retrieves the DOM node type.
 
virtual bool getProperty (const EDLSysString &propertyName, PValue &propertyValue) const =0
 Retrieves the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on.
 
virtual void setProperty (const EDLSysString &propertyName, const PValue &propertyValue)=0
 Sets the value of a property. The EDL DOM node can store non-content or relationship information through the use of the "properties" feature of the node. The data is represented as key-value pairs; the key being a string and the value being an abstract container called a PValue. PValues can represent integers, strings, DOM nodes, and so on.
 
virtual void removeProperty (const EDLSysString &propertyName)=0
 Removes property.
 
virtual IEDLSysStringCollectionEnumPtr getPropertyCollectionEnum ()=0
 Retrieves a navigable list of the property names stored on this node.
 
virtual bool hasChildNodes () const =0
 Function that indicates whether this node is a parent to other nodes.
 
virtual IDOMNodePtr getParentNode () const =0
 Gets the parent node of this node.
 
virtual IDOMNodePtr getFirstChild () const =0
 Gets the first child node of this node.
 
virtual IDOMNodePtr getLastChild () const =0
 Gets the last child node of this node.
 
virtual IDOMNodePtr getNextChild (const IDOMNodePtr &child) const =0
 Gets the child node which follows the node passed in.
 
virtual IDOMNodePtr getPreviousChild (const IDOMNodePtr &child) const =0
 Gets the child node which precedes the node passed in.
 
virtual IDOMNodePtr getPreviousSibling () const =0
 Retrieves the node's previous sibling node.
 
virtual IDOMNodePtr getNextSibling () const =0
 Retrieves node's next sibling node.
 
virtual void appendChild (const IDOMNodePtr &child)=0
 Appends a node to the end of the node's child list.
 
virtual void insertChild (const IDOMNodePtr &ptrPreviousSibling, const IDOMNodePtr &child, bool bCheckComplete=true)=0
 Insert a child node after ptrPreviousSibling.
 
virtual IDOMNodePtr extractChild (const IDOMNodePtr &child)=0
 Extracts (that is, finds and removes) a child node from the node children. After extraction the child node is no longer a part of the DOM. If no node is specified, the first available node will be extracted from the node's children.
 
virtual void replaceChild (const IDOMNodePtr &oldChild, const IDOMNodePtr &newChild)=0
 Replaces the child node with another.
 
virtual bool isComplete () const =0
 Signals the completeness of the node.
A complete node is one that has no more children to be added to it.
 
virtual void setComplete ()=0
 Sets the node's completeness status to "true".
 
virtual IDOMNodeFlagsgetFlags ()=0
 Retrieves the node's flags property.
 
virtual void setParentNode (const IDOMNodePtr &ptrParent)=0
 Sets the parent node.
 
virtual void setPreviousSibling (const IDOMNodePtr &ptrPreviousSibling)=0
 Sets the previous sibling node.
 
virtual void setNextSibling (const IDOMNodePtr &ptrNextSibling)=0
 Sets the next sibling node.
 
virtual bool isAncestor (const IDOMNodePtr &ptrCandidate)=0
 Function tests whether a candidate node is a descendant of the node.
 
virtual FRect getBounds (bool applyTransform=true, bool applyClip=true)
 Find the conservative bounding box of the marking content of the node.
 
virtual bool copyNodeData (IDOMNode *pSourceNode)=0
 Copy the properties collection, the flags and the DOM ID from the given source node to this one.
 
virtual IDOMNodePtr cloneNode (IEDLClassFactory *pFactory) const =0
 Simpified node cloning. An exception of type IEDLError will be thrown on failure.
 
virtual IDOMNodePtr cloneTree (IEDLClassFactory *pFactory) const =0
 Clone the tree of nodes beginning at this node. An exception of type IEDLError will be thrown on failure.
 
virtual void cloneTreeAndAppend (IEDLClassFactory *pFactory, const IDOMNodePtr &dest) const =0
 Clone the tree of nodes beginning at this node, and append the result to the destination tree.
 
virtual void completeTree ()=0
 Mark the entire tree from this point as complete. You should not ordinarily need to call this function.
 
virtual void removeCompleteFlagFromTree ()=0
 Mark the entire tree from this point as complete.
 
virtual void findChildrenOfType (eDOMNodeType type, CDOMNodeVect &nodes, bool searchForms=false)=0
 Find all children of this node with the given type, appending to the given vector. Does not descend into brushes.
 
virtual void walkTree (WalkTreeFunc func, void *priv, bool descendIntoBrushes=false, bool descendIntoForms=false)=0
 Walk through the DOM calling a given function on each node. The function is allowed to:
 
virtual void notifyOnDestruct (NodeDeleteFunc func, void *priv)=0
 Register interest in being told when this node is about to be destroyed.
 
virtual void unregisterNotify (NodeDeleteFunc func, void *priv)=0
 Unregister interest in being told when this node is about to be destroyed.
 
- Public Member Functions inherited from IEDLObject
virtual const CClassIDgetClassID () const =0
 Returns class ID of IEDLObject.
 
virtual bool init (CClassParams *pData)
 The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory.
 
virtual bool clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
 Create a copy of EDLObject.
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to.
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to.
 

Static Public Member Functions

static EDL_API IDOMGlyphsPtr create (IEDLClassFactory *pFactory, const EDLString &unicodeString, double size, const FPoint &position, const IDOMBrushPtr &brush, const IDOMFontPtr &font, uint32 fontIndex=0, eStyleSimulations styleSimulations=eSSNone, const FMatrix renderTransform=FMatrix(), const IDOMPathGeometryPtr &clip=IDOMPathGeometryPtr(), float opacity=1.0f)
 Simplified creator for a glyphs object Throws an IEDLError on failure.
 
static const CClassIDclassID ()
 Retrieves class id of IDOM.
 
- Static Public Member Functions inherited from IDOMNode
static EDL_API FMatrix effectiveTransformationOfNode (const IDOMNodePtr &node)
 Attempt to find the effective transformation matrix external to the specified node relative to either a containing page or ultimate parent.
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

An abstract class providing an interface to a "Glyphs" node. Glyphs nodes are used to represent a run of uniformly formatted text from a single font. Text runs are broken by line advances and formatting changes. When a text run is broken, a new Glyphs node will be created to describe the text from the change point onwards.

A Glyphs node may describe an extended run of text or a single character, depending on the document formatting. The set of properties of a Glyphs node allows for a complete description of the glyph characteristics, such as the fill and opacity of the text, as well as clipping information.

A Glyphs node also allows the specification of a Unicode string and supports bidirectional and vertical text.

Some properties of the Glyphs node are composable, meaning that the markings rendered to the page are determined by a combination of the property and all the like-named properties of the Glyphs node's parent.

Errors are via exceptions of type IEDLError.

Member Function Documentation

◆ classID()

static const CClassID & IDOMGlyphs::classID ( )
inlinestatic

Retrieves class id of IDOM.

Returns
CClassID Class id of the element

◆ create()

static EDL_API IDOMGlyphsPtr IDOMGlyphs::create ( IEDLClassFactory * pFactory,
const EDLString & unicodeString,
double size,
const FPoint & position,
const IDOMBrushPtr & brush,
const IDOMFontPtr & font,
uint32 fontIndex = 0,
eStyleSimulations styleSimulations = eSSNone,
const FMatrix renderTransform = FMatrix(),
const IDOMPathGeometryPtr & clip = IDOMPathGeometryPtr(),
float opacity = 1.0f )
static

Simplified creator for a glyphs object Throws an IEDLError on failure.

Parameters
pFactoryThe factory to use.
positionThe desired position for the glyphs.
unicodeStringThe text to be used.
sizeThe font size to use, in ems.
brushThe fill brush to use.
fontThe font to use.
fontIndexThe index of the font to use, if the font is within a truetype collection.
styleSimulationsThe desired style simulations effect.
renderTransformThe render transform to use.
clipThe geometry to use for clipping. NULL if no clip.
opacityThe opacity to use.
Returns
IDOMGlyphsPtr The new glyphs object.

◆ getBidiLevel()

virtual uint8 IDOMGlyphs::getBidiLevel ( ) const
pure virtual

Retrieves the bidiLevel of the text run.

The bidi (bi-directional) level specifies the Unicode bi-directional nesting level. A value of 0 implies left-to-right text, while a value of 1 implies right-to-left text. Right-to-left text places the run origin at the right side of the first glyph, with positive advance widths representing advances to the left, so that subsequent glyphs are placed to the left of the previous glyph.

Returns
uint8 The bidiLevel value.

◆ getBlackPointCompensation()

virtual eBlackPointCompensation IDOMGlyphs::getBlackPointCompensation ( ) const
pure virtual

Get the black point compensation for the node. The black point compensation setting is used whenever the node requires color conversion to a different color space and affects how dark regions are handled. This setting is honored only for rendering, color conversion, PDF or PostScript output.

Returns
eBlackPointCompensation The black point compensation, or eBPCUnset if not present.

◆ getBlendMode()

virtual eBlendMode IDOMGlyphs::getBlendMode ( ) const
pure virtual

Gets the blend mode to be used for rendering this node.

Returns
eBlendMode The current blend mode.

◆ getCaretStops()

virtual const EDLSysString & IDOMGlyphs::getCaretStops ( ) const
pure virtual

Retrieves the XPS-specific caret stop specification for a run of glyphs.

Caret stops identify the positions within the sequence of Unicode characters at which a text-selection tool may place a text-editing caret. Potential caret-stop positions are identified by their indices into the UTF-16 code units represented by the unicodeString attribute value. When this value is missing, the test in the UnicodeString attribute must be interpreted as having a caret stop between every Unicode UTF-16 code unit and at the beginning and end of the text.

Because it is legal to place the caret before any of the UTF-16 code units in the Unicode string if the caretStops attribute is omitted, omitting the caretStops attribute is equivalent to specifying a string that has all the bits set to 1.

If there are insufficient flags in the caretStops string to correspond to all the UTF-16 code units in the Unicode string, all remaining UTF-16 code units in the Unicode string MUST be considered valid caret stops.

Returns
EDLSysString The caret stops specification string, or an empty string if not present. See setCaretStops() for a description of the format of the specification string.

◆ getClip()

virtual IDOMPathGeometryPtr IDOMGlyphs::getClip ( ) const
pure virtual

Retrieves the clip for the Glyphs node. The clip limits the rendered region of the glyph.

Returns
IDOMPathGeometryPtr The clip, or NULL if there is no clip set.

◆ getClusters()

virtual IGlyphsClustersPtr IDOMGlyphs::getClusters ( ) const
pure virtual

Unpack the UnicodeString and Indices strings into a set of clusters representing the smallest units of information in the text. This form combines the unicode and indices information such that they are more easily edited together. The returned IGlyphsCluster instance can be edited freely; a new instance is returned on every call. However, for the changes to have effect, setClusters() must be called to repopulate the UnicodeString and Indices.

Returns
IGlyphsClustersPtr The glyphs clusters.

◆ getDeviceFontName()

virtual const EDLString & IDOMGlyphs::getDeviceFontName ( ) const
pure virtual

Retrieves the XPS-specific device font name. The device font name, which uniquely identifies a specific device font. The identifier is typically defined by a hardware vendor or font vendor.

Returns
EDLString The device font name, or an empty string if there is no device font name.

◆ getEquivalentPath()

virtual IDOMPathNodePtr IDOMGlyphs::getEquivalentPath ( ) const
pure virtual

Get a graphically equivalent path node for the glyphs node, with all glyphs converted to path geometry. Not possible for glyphs nodes using Type 3 fonts, and will result in an exception.

Returns
IDOMPathNodePtr The equivalent path.

◆ getFill()

virtual IDOMBrushPtr IDOMGlyphs::getFill ( ) const
pure virtual

Retrieves the fill brush used to fill the shape of the rendered glyphs.

Returns
IDOMBrushPtr The brush, or NULL if there is no fill brush set.

◆ getFillOverprints()

virtual bool IDOMGlyphs::getFillOverprints ( ) const
pure virtual

Retrieves whether or not the fill should overprint. Overprinting is honored only for rendering, PDF and PostScript output. It will also be honored should any output need to render as part of producing the output.

Returns
bool True if the fill should overprint, false otherwise.

◆ getFlattenedGlyphInfo()

virtual IDOMGlyph::CDOMGlyphDataVect IDOMGlyphs::getFlattenedGlyphInfo ( ) const
pure virtual

Retrieves the flattened glyph information, indicating every glyph that results from painting this glyphs nodes. The results are provided as a simple vector of IDOMGlyph::Data objects, laid out according to the glyphs node with offsets, glyph positioning, advance, bounds, unicode (if present) and glyph ID information computed.

Returns
IDOMGlyph::CDOMGlyphDataVect The flattened glyph information.

◆ getFont()

virtual IDOMFontPtr IDOMGlyphs::getFont ( ) const
pure virtual

Retrieves a pointer to the font object describing the font in which the text is displayed.

Returns
IDOMFontPtr A smart pointer to the text's font object. Will not be NULL.

◆ getFontIndex()

virtual uint32 IDOMGlyphs::getFontIndex ( ) const
pure virtual

Retrieves the font index.

Returns
uint32 The font index.

◆ getFontRenderingEmSize()

virtual double IDOMGlyphs::getFontRenderingEmSize ( ) const
pure virtual

Retrieves the font rendering em size in drawing surface units. The font rendering em size is expressed as a floating point value in units of the effective coordinate space. A value of 0 results in no visible text.

Returns
double The font rendering em size.

◆ getIndices()

virtual const EDLSysString & IDOMGlyphs::getIndices ( ) const
pure virtual

Retrieves a Unicode string that represents the text of the run of glyphs.

Returns
EDLSysString The indices, or an empty string if the indices string is not present or empty.

◆ getIsCharPath()

virtual bool IDOMGlyphs::getIsCharPath ( ) const
pure virtual

Retrieves a Boolean value which indicates if this Glyphs node is intended to draw a path.

Returns
bool True if this node is a charpath , false otherwise.

◆ getIsInvisible()

virtual bool IDOMGlyphs::getIsInvisible ( ) const
pure virtual

Retrieves a Boolean value which indicates if this Glyphs node is intended to be invisible.

Returns
bool True if this node is intended to be invisible, false otherwise.

◆ getIsSideways()

virtual bool IDOMGlyphs::getIsSideways ( ) const
pure virtual

Indicates that a glyph is turned on its side, with the origin being defined as the top center of the unturned glyph.

Glyphs for text in vertical writing are normally represented by rotating the co-ordinate system and using the isSideways attribute. Glyph runs with isSideways set to true will be rotated 90 degrees counter-clockwise and placed so that the sideways baseline origin is coincident with the normal origin of the character, as modified by the offset vector in the indices attribute. The advance setting places the nominal origin of the next character a distance along the direction of the progression of the run. The direction of the advance setting is unaffected by isSideways, however the method by which the size of the advance vector is chosen is different.

For example, to represent a run of characters top to bottom of a page, a render transform can be used to rotate the coordinate system 90 degrees clockwise. originX and originY can be used to specify a position at the top of the column of text. Text from a vertical writing system can then be written using a glyphs run with isSideways set to true. The individual glyphs appear in the normal orientation because the rotation is effected by the isSideways attribute undoes the effect of the render transform.

Returns
bool The IsSideways value

◆ getLanguage()

virtual const EDLString & IDOMGlyphs::getLanguage ( ) const
pure virtual

Retrieves the default language of the Glyphs element and any of its children.

      The default language is specified according to RFC 3066. English is defined as en_GB and American
      English as en_US. There is no default setting. If the language is not known it is
      set to und (undetermined). For further information see
      http://www.w3.org/International/articles/language-tags/
Returns
EDLString The language.

◆ getNavigateLink()

virtual IDOMTargetPtr IDOMGlyphs::getNavigateLink ( ) const
pure virtual

Retrieves the target of a hyperlink.

Returns
IDOMTargetPtr the target, or NULL if there is no target.

◆ getOpacity()

virtual float IDOMGlyphs::getOpacity ( ) const
pure virtual

Retrieves the opacity value of the Glyphs node. The opacity value defines the uniform transparency of the canvas. The opacity value is a number between 0 (fully transparent) and 1 (fully opaque). Values outside this range are invalid. The default value is 1.0.

Returns
float Returns the opacity value.

◆ getOpacityMask()

virtual IDOMBrushPtr IDOMGlyphs::getOpacityMask ( ) const
pure virtual

Retrieves the opacity mask for the node. The opacity mask specifies a mask of alpha values that is applied to the glyphs in the same fashion as the opacity setting, but allowing different alpha values for different areas of the canvas.

Returns
IDOMBrushPtr The opacity mask, or NULL if there is no opacity mask set.

◆ getOriginX()

virtual double IDOMGlyphs::getOriginX ( ) const
pure virtual

Retrieves the x-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.

Returns
double The first glyph's x-coordinate.

◆ getOriginY()

virtual double IDOMGlyphs::getOriginY ( ) const
pure virtual

Retrieves the y-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.

Returns
double The first glyph's y-coordinate.

◆ getOverprintMode()

virtual bool IDOMGlyphs::getOverprintMode ( ) const
pure virtual

Retrieves whether or not overprint should obey PDF/PS overprint mode semantics. PDF and PostScript support a manner of overprinting for CMYK scenarios where an individual CMYK component may overprint if that channel is zero and the rendering target is also the same CMYK color space (excluding some transparency group scenarios). Setting overprint mode to true enables this feature.

Returns
bool true if the overprint mode should be enabled, false otherwise.

◆ getRenderingIntent()

virtual eRenderingIntent IDOMGlyphs::getRenderingIntent ( ) const
pure virtual

Get the rendering intent for the node if present. The rendering intent is used whenever the node requires color conversion to a different color space. Set eRenderingIntentUnset to unset the rendering intent, in which a default will be chosen based on the color space in use. This setting is honored only for rendering, color conversion, PDF or PostScript output.

Returns
eRenderingIntent The rendering intent, or eRenderingIntentUnset if not present.

◆ getRenderTransform()

virtual const FMatrix & IDOMGlyphs::getRenderTransform ( ) const
pure virtual

Retrieves the render transform matrix of the Glyphs node and its children. The render transform establishes a new coordinate frame for the child and descendants of the Glyphs node. The render transform also affects clip and opacity masks, fill, x-origin, y-origin, the actual shape of the individual glyphs and the advance widths. The render transform also affects the font size and values specified by the indices setting.

Returns
FMatrix The transformation matrix.

◆ getStyleSimulations()

virtual eStyleSimulations IDOMGlyphs::getStyleSimulations ( ) const
pure virtual

Retrieves the style simulation value.

Synthetic style simulations can be applied to the shape of the glyphs by using the Style Simulations function. Style simulations can be applied to the designed style of a font. The default value for Style Simulations is eSSNone, that is, the shapes of the glyphs are not modified. When eSSBold is set, the glyphs are geometrically widened by 1% of the em size, so that the centres of strokes remain at the same position. This leaves the baseline origin unmodified. The bounding box grows 1% all around for a total of 2% horizontal and 2% vertical. As a result the character height, and the advance width of each glyph are increased by 2% of the em size.

When eSSItalic is set, italicization is applied to glyphs with an IsSideways value of false. Italicization is applied by skewing the top edge of the bounding box by 20 degrees to the right, relative to the baseline of the character. Glyphs with an IsSideways value of true are italicized by skewing the right edge of the bounding box by 20 degrees down, relative to the baseline origin of the glyph. The character height and advance width are not modified.

It is possible to apply both bold and italic simulations to the glyphs by setting eSSBoldItalic.

Returns
eStyleSimulations The current style simulation setting.

◆ getUnicodeString()

virtual const EDLString & IDOMGlyphs::getUnicodeString ( ) const
pure virtual

Gets the Unicode string that represents the text of the run of glyphs.

Returns
EDLString The unicode string.

◆ hardSplit()

virtual IDOMNodePtr IDOMGlyphs::hardSplit ( ) const
pure virtual

Split the glyphs node into a series of glyph nodes each consisting of single glyphs.

As per split above, however here we allow unicode information to be lost in order to ensure that each glyphs node in the split result consists of a single glyph only.

The behaviour for hardSplit() only differs from split() if there is a case where one or more unicode characters is mapped to multiple glyphs in a single cluster. In this case, the cluster will be broken apart, and the unicode is lost.

Useful where it is imperative that each glyph node consists of a single glyph.

Returns
IDOMNodePtr The result of splitting the glyphs node.

◆ setBidiLevel()

virtual void IDOMGlyphs::setBidiLevel ( uint8 bidiLevel)
pure virtual

Sets the bidiLevel for this run of text.

The bidi (bi-directional) level specifies the Unicode bi-directional nesting level. A value of 0 implies left-to-right text, while a value of 1 implies right-to-left text. Right-to-left text places the run origin at the right side of the first glyph, with positive advance widths representing advances to the left, so that subsequent glyphs are placed to the left of the previous glyph.

Parameters
bidiLevelThe new bidiLevel value.

◆ setBlackPointCompensation()

virtual void IDOMGlyphs::setBlackPointCompensation ( eBlackPointCompensation compensation)
pure virtual

Set the black point compensation for the node. The black point compensation setting is used whenever the node requires color conversion to a different color space and affects how dark regions are handled. This setting is honored only for rendering, color conversion, PDF or PostScript output.

Parameters
compensationThe desired black point compensation setting, or eBPCUnset to clear.

◆ setBlendMode()

virtual void IDOMGlyphs::setBlendMode ( eBlendMode blendMode)
pure virtual

Sets the blend mode to be used for rendering this node. Note: modes other than Normal are not directly representable in XPS.

Parameters
blendModeThe new blend mode.

◆ setCaretStops()

virtual void IDOMGlyphs::setCaretStops ( const EDLSysString & caretStops)
pure virtual

Sets the XPS-specific caret stop specification for a run of glyphs.

Caret stops identify the positions within the sequence of Unicode characters at which a text-selection tool may place a text-editing caret. Potential caret-stop positions are identified by their indices into the UTF-16 code units represented by the unicodeString attribute value. When this value is missing, the test in the UnicodeString attribute must be interpreted as having a caret stop between every Unicode UTF-16 code unit and at the beginning and end of the text.

Because it is legal to place the caret before any of the UTF-16 code units in the Unicode string if the caretStops attribute is omitted, omitting the caretStops attribute is equivalent to specifying a string that has all the bits set to 1.

If there are insufficient flags in the caretStops string to correspond to all the UTF-16 code units in the Unicode string, all remaining UTF-16 code units in the Unicode string MUST be considered valid caret stops.

Parameters
caretStopsThe caret stops specification expressed as a string.

The caretStops attribute contains an array of boolean bit-flags, which is represented as a string of hexadecimal characters. The caretStops attribute includes a final flag for placement of the caret following the final UTF-16 code unit in the Unicode string. Each hexadecimal character in the caretStops value represents the flags for four UTF-16 code units in the Unicode string, with the highest-order bit representing the first UTF-16 code unit. Any unused bits in the last UTF-16 code unit must be 0. For example if caretStops is set to "f7" (that is, 1111 0111), in reference to the run of glyphs, "Not here.", it means that it is valid to place the caret stop in any position in the run of text except for directly before the "h" of "here".

◆ setClip()

virtual void IDOMGlyphs::setClip ( const IDOMPathGeometryPtr & ptrClip)
pure virtual

Sets the clip for the Glyphs node. The clip limits the rendered region of the glyph.

Parameters
ptrClipSmart pointer to the new clip information, or NULL to clear.

◆ setClusters()

virtual void IDOMGlyphs::setClusters ( const IGlyphsClustersPtr & clusters)
pure virtual

Populate the glyphs node UnicodeString and Indices from the given set of glyphs clusters.

Parameters
clustersThe clusters to use

◆ setDeviceFontName()

virtual void IDOMGlyphs::setDeviceFontName ( const EDLString & name)
pure virtual

Sets the the XPS-specific device font name The device font name, which uniquely identifies a specific device font. The identifier is typically defined by a hardware vendor or font vendor.

Parameters
nameThe new device font name, or an empty string to clear.

◆ setFill()

virtual void IDOMGlyphs::setFill ( const IDOMBrushPtr & ptrFill)
pure virtual

Sets the fill brush used to fill the shape of the rendered glyphs.

Parameters
ptrFillSmart pointer to the new fill brush.

◆ setFillOverprints()

virtual void IDOMGlyphs::setFillOverprints ( bool overprint = true)
pure virtual

Sets whether or not the fill should overprint. Overprinting is honored only for rendering, PDF and PostScript output. It will also be honored should any output need to render as part of producing the output.

Parameters
overprintThe desired overprint.

◆ setFont()

virtual void IDOMGlyphs::setFont ( const IDOMFontPtr & font)
pure virtual

Sets the font object to be used to display the text.

Parameters
fontSmart pointer to the new font object to use. Must not be NULL.

◆ setFontIndex()

virtual void IDOMGlyphs::setFontIndex ( uint32 index)
pure virtual

Sets the font index.

Parameters
indexThe new font index value.

◆ setFontRenderingEmSize()

virtual void IDOMGlyphs::setFontRenderingEmSize ( double emSize)
pure virtual

Sets the font rendering em size in drawing surface units. The font rendering em size is expressed as a floating point value in units of the effective coordinate space. A value of 0 results in no visible text.

Parameters
emSizeThe new font rendering em size value.

◆ setIndices()

virtual void IDOMGlyphs::setIndices ( const EDLSysString & indices)
pure virtual

Sets the glyphs indices.

Parameters
indicesThe string specifying the indices. Within the string, each glyph specification is separated by a semicolon.

◆ setIsCharPath()

virtual void IDOMGlyphs::setIsCharPath ( bool isCharPath)
pure virtual

Sets the flag to indicate if this glyph is intended to draw a path.

Parameters
isCharPathTrue if this node is a charpath, false otherwise.

◆ setIsInvisible()

virtual void IDOMGlyphs::setIsInvisible ( bool isInvisible)
pure virtual

Sets the flag to indicate if this glyph is intended to be invisible.

Parameters
isInvisibleTrue if this node is to be considered invisible, false otherwise.

◆ setIsSideways()

virtual void IDOMGlyphs::setIsSideways ( bool isSideways)
pure virtual

Sets the IsSideways value. See getIsSideways for a description of the effects of IsSideways.

Parameters
isSidewaysThe new IsSideways value.

◆ setLanguage()

virtual void IDOMGlyphs::setLanguage ( const EDLString & lang)
pure virtual

Sets the default language of the Glyphs element and any of its children.

      The default language is specified according to RFC 3066. English is defined as en_GB and American
      English as en_US. There is no default setting. If the language is not known it is
      set to und (undetermined). For further information see
      http://www.w3.org/International/articles/language-tags/
      @param    lang The new default language string.

◆ setNavigateLink()

virtual void IDOMGlyphs::setNavigateLink ( const IDOMTargetPtr & target)
pure virtual

Sets the target of a hyperlink.

Parameters
targetThe target to associate with the node, or NULL to clear.

◆ setOpacity()

virtual void IDOMGlyphs::setOpacity ( float opc)
pure virtual

Sets the opacity value of the Glyphs node. The opacity value defines the uniform transparency of the canvas. The opacity value is a number between 0 (fully transparent) and 1 (fully opaque). Values outside this range are invalid. The default value is 1.0. Will return 0.0 if the node is intended to be inivisible (see #setIsInivisible()).

Parameters
opcThe new opacity value.

◆ setOpacityMask()

virtual void IDOMGlyphs::setOpacityMask ( const IDOMBrushPtr & ptrOpacityMask)
pure virtual

Sets the opacity mask for the node. The opacity mask specifies a mask of alpha values that is applied to the glyphs in the same fashion as the opacity setting, but allowing different alpha values for different areas of the canvas.

Parameters
ptrOpacityMaskSmart pointer to a brush representing the new opacity mask for the node, or null to clear.

◆ setOriginX()

virtual void IDOMGlyphs::setOriginX ( double originX)
pure virtual

Sets the x-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.

Parameters
originXThe new x-coordinate for the first glyph in the text run.

◆ setOriginY()

virtual void IDOMGlyphs::setOriginY ( double originY)
pure virtual

Sets the y-coordinate of the first glyph in the run, in units of the effective coordinate space. The first glyph is placed so that the leading edge of its advance vector and its baseline intersect with the point defined by the originX and originY coordinates.

Parameters
originYThe new y-coordinate for the first glyph in the text run.

◆ setOverprintMode()

virtual void IDOMGlyphs::setOverprintMode ( bool mode = true)
pure virtual

Sets whether or not overprint should obey PDF/PS overprint mode semantics. PDF and PostScript support a manner of overprinting for CMYK scenarios where an individual CMYK component may overprint if that channel is zero and the rendering target is also the same CMYK color space (excluding some transparency group scenarios). Setting overprint mode to true enables this feature.

Parameters
modeThe desired overprint mode

◆ setRenderingIntent()

virtual void IDOMGlyphs::setRenderingIntent ( eRenderingIntent intent)
pure virtual

Set or clear the rendering intent for the node. The rendering intent is used whenever the node requires color conversion to a different color space. Set eRenderingIntentUnset to unset the rendering intent, in which a default will be chosen based on the color space in use. This setting is honored only for rendering, color conversion, PDF or PostScript output.

Parameters
intentThe desired rendering intent, or eRenderingIntentUnset to clear.

◆ setRenderTransform()

virtual void IDOMGlyphs::setRenderTransform ( const FMatrix & matrix)
pure virtual

Sets the render transform matrix of the Glyphs node and its children. The render transform establishes a new coordinate frame for the child and descendants of the Glyphs node. The render transform also affects clip and opacity masks, fill, x-origin, y-origin, the actual shape of the individual glyphs and the advance widths. The render transform also affects the font size and values specified by the indices setting.

Parameters
matrixthe new render transform matrix.

◆ setStyleSimulations()

virtual void IDOMGlyphs::setStyleSimulations ( eStyleSimulations styleSimulations)
pure virtual

Retrieves the style simulation value.

Synthetic style simulations can be applied to the shape of the glyphs by using the Style Simulations function. Style simulations can be applied to the designed style of a font. The default value for Style Simulations is eStyleSimulationsNone, that is, the shapes of the glyphs are not modified. When eSSBold is set, the glyphs are geometrically widened by 1% of the em size, so that the centres of strokes remain at the same position. This leaves the baseline origin unmodified. The bounding box grows 1% all around for a total of 2% horizontal and 2% vertical. As a result the character height, and the advance width of each glyph are increased by 2% of the em size.

When eSSItalic is set, italicization is applied to glyphs with an IsSideways value of false. Italicization is applied by skewing the top edge of the bounding box by 20 degrees to the right, relative to the baseline of the character. Glyphs with an IsSideways value of true are italicized by skewing the right edge of the bounding box by 20 degrees down, relative to the baseline origin of the glyph. The character height and advance width are not modified.

It is possible to apply both bold and italic simulations to the glyphs by setting eSSBoldItalic.

Parameters
styleSimulationsThe new style simulation setting.

◆ setUnicodeString()

virtual void IDOMGlyphs::setUnicodeString ( const EDLString & unicodeString)
pure virtual

Sets the Unicode string that represents the text of the run of glyphs.

Parameters
unicodeStringThe Unicode string to set.

◆ split()

virtual IDOMNodePtr IDOMGlyphs::split ( ) const
pure virtual

Split the glyphs node into a series of glyph nodes each consisting of the smallest possible unit.

The resulting glyphs nodes may still consist of multiple unicode codepoints per node if the combinations of code points results in a single glyph (such as for ligatures). Similarly the resulting glyphs nodes may still consist of multiple individual glyphs with a single code point (such as for combining characters). Regardless, the resulting glyphs nodes are split to the smallest form that can be interpreted on their own.

If the glyphs node cannot be further split (for example if it is already in it's simplest form), then the returned result will be this glyphs node.

If the glyphs node can be split, the returned node will be an IDOMGroupNode or one of it's subclasses, with the split glyphs present as children of that group.

Depending on the brushes or transparency that may be used with the glyphs node, the group may be a simple IDOMGroup, an IDOMCanvas or alternatively an IDOMTransparency group. In any case, the simplest form that can be used will be used. The transform for the glyphs node will be moved to the group.

Returns
IDOMNodePtr The result of splitting the glyphs node.

◆ validateInstructions()

virtual bool IDOMGlyphs::validateInstructions ( ) const
pure virtual

Validate glyph instructions.

Applies only to TrueType glyphs. Not possible for glyphs nodes using Type 3 fonts, and will result in an exception. This will attempt to detect some cases of broken instructions (hints) by rendering each glyph in the glyphs node and return a boolean value to indicate if any issues were found.

Note that while this function may be useful to detect general issues with fonts/glyph instructions it cannot detect issues seen only when rendering at a specific resolution and point size.

Returns
bool true on success, or false if invalid instructions were found.

The documentation for this class was generated from the following file: