com.aspose.xps

Class XpsGlyphs

  • All Implemented Interfaces:
    Iterable<XpsElement>


    public final class XpsGlyphs
    extends XpsElement

    Class incapsulating Glyphs element features. This element represents a run of uniformly-formatted text from a single font. It provides information necessary for accurate rendering and supports search and selection features in viewing consumers.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      XpsGlyphs deepClone()
      Clone this glyphs.
      int getBidiLevel()
      Returns the value specifying the Unicode algorithm bidirectional nesting level.
      XpsPathGeometry getClip()
      Returns the path geometry limitting the rendered region of the element.
      XpsBrush getFill()
      Returns the brush used to fill the shape of the rendered glyphs.
      XpsFont getFont()
      Returns the font resource for the TrueType font used to typeset elements text.
      float getFontRenderingEmSize()
      Returns the font size in drawing surface units, expressed as a float in units of the effective coordinate space.
      XpsHyperlinkTarget getHyperlinkTarget()
      Returns The hyperlink target object.
      float getOpacity()
      Returns the value defining the uniform transparency of the glyph element.
      XpsBrush getOpacityMask()
      Returns the brush specifying a mask of alpha values that is applied to the glyphs in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
      float getOriginX()
      Returns the x coordinate of the first glyph in the run, in units of the effective coordinate space.
      float getOriginY()
      Returns the y coordinate of the first glyph in the run, in units of the effective coordinate space.
      XpsMatrix getRenderTransform()
      Returns the affine transformation matrix establishing a new coordinate frame for the glyph run specified by the Glyphs element.
      XpsStyleSimulations getStyleSimulations()
      Returns the value specifying a style simulation.
      String getUnicodeString()
      Returns the string of text rendered by the Glyphs element.
      boolean isSideways()
      Returns the value indicating that a glyph is turned on its side, with the origin being defined as the top center of the unturned glyph.
      void setBidiLevel(int value)
      Sets the value specifying the Unicode algorithm bidirectional nesting level.
      void setClip(XpsPathGeometry value)
      Sets the path geometry limitting the rendered region of the element.
      void setFill(XpsBrush value)
      Sets the brush used to fill the shape of the rendered glyphs.
      void setFontRenderingEmSize(float value)
      Sets the font size in drawing surface units, expressed as a float in units of the effective coordinate space.
      void setHyperlinkTarget(XpsHyperlinkTarget value)
      Sets the hyperlink target object.
      void setOpacity(float value)
      Sets the value defining the uniform transparency of the glyph element.
      void setOpacityMask(XpsBrush value)
      Sets the brush specifying a mask of alpha values that is applied to the glyphs in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
      void setOriginX(float value)
      Sets the x coordinate of the first glyph in the run, in units of the effective coordinate space.
      void setOriginY(float value)
      Sets the y coordinate of the first glyph in the run, in units of the effective coordinate space.
      void setRenderTransform(XpsMatrix value)
      Sets the affine transformation matrix establishing a new coordinate frame for the glyph run specified by the Glyphs element.
      void setSideways(boolean value)
      Sets the value indicating that a glyph is turned on its side, with the origin being defined as the top center of the unturned glyph.
      void setStyleSimulations(XpsStyleSimulations value)
      Sets the value specifying a style simulation.
      void setUnicodeString(String value)
      Sets the string of text rendered by the Glyphs element.
    • Method Detail

      • getBidiLevel

        public int getBidiLevel()

        Returns the value specifying the Unicode algorithm bidirectional nesting level. Even values imply left-to-right layout, odd values imply right-to-left layout. Right-to-left layout places the run origin at the right side of the first glyph, with positive advance widths (representing advances to the left) placing subsequent glyphs to the left of the previous glyph.

        Returns:
        The value specifying the Unicode algorithm bidirectional nesting level.
      • setBidiLevel

        public void setBidiLevel(int value)

        Sets the value specifying the Unicode algorithm bidirectional nesting level. Even values imply left-to-right layout, odd values imply right-to-left layout. Right-to-left layout places the run origin at the right side of the first glyph, with positive advance widths (representing advances to the left) placing subsequent glyphs to the left of the previous glyph.

        Parameters:
        value - The value specifying the Unicode algorithm bidirectional nesting level.
      • getFill

        public XpsBrush getFill()

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

        Returns:
        The brush used to fill the shape of the rendered glyphs.
      • setFill

        public void setFill(XpsBrush value)

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

        Parameters:
        value - The brush used to fill the shape of the rendered glyphs.
      • getFont

        public XpsFont getFont()

        Returns the font resource for the TrueType font used to typeset elements text.

        Returns:
        The font resource for the TrueType font used to typeset elements text.
      • getFontRenderingEmSize

        public float getFontRenderingEmSize()

        Returns the font size in drawing surface units, expressed as a float in units of the effective coordinate space.

        Returns:
        The font size.
      • setFontRenderingEmSize

        public void setFontRenderingEmSize(float value)

        Sets the font size in drawing surface units, expressed as a float in units of the effective coordinate space.

        Parameters:
        value - The font size.
      • getOriginX

        public float getOriginX()

        Returns the x coordinate of the first glyph in the run, in units of the effective coordinate space.

        Returns:
        The x coordinate of the first glyph in the run, in units of the effective coordinate space.
      • setOriginX

        public void setOriginX(float value)

        Sets the x coordinate of the first glyph in the run, in units of the effective coordinate space.

        Parameters:
        value - The x coordinate of the first glyph in the run, in units of the effective coordinate space.
      • getOriginY

        public float getOriginY()

        Returns the y coordinate of the first glyph in the run, in units of the effective coordinate space.

        Returns:
        The y coordinate of the first glyph in the run, in units of the effective coordinate space.
      • setOriginY

        public void setOriginY(float value)

        Sets the y coordinate of the first glyph in the run, in units of the effective coordinate space.

        Parameters:
        value - The y coordinate of the first glyph in the run, in units of the effective coordinate space.
      • isSideways

        public boolean isSideways()

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

        Returns:
        The value indicating that a glyph is turned on its side.
      • setSideways

        public void setSideways(boolean value)

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

        Parameters:
        value - The value indicating that a glyph is turned on its side.
      • getUnicodeString

        public String getUnicodeString()

        Returns the string of text rendered by the Glyphs element. The text is specified as Unicode code points.

        Returns:
        The string of text rendered by the Glyphs element.
      • setUnicodeString

        public void setUnicodeString(String value)

        Sets the string of text rendered by the Glyphs element. The text is specified as Unicode code points.

        Parameters:
        value - The string of text rendered by the Glyphs element.
      • getStyleSimulations

        public XpsStyleSimulations getStyleSimulations()

        Returns the value specifying a style simulation.

        Returns:
        The value specifying a style simulation.
      • setStyleSimulations

        public void setStyleSimulations(XpsStyleSimulations value)

        Sets the value specifying a style simulation.

        Parameters:
        value - The value specifying a style simulation.
      • getRenderTransform

        public XpsMatrix getRenderTransform()

        Returns the affine transformation matrix establishing a new coordinate frame for the glyph run specified by the Glyphs element. The render transform affects clip, opacity mask, fill, x origin, y origin, the actual shape of individual glyphs, and the advance widths. The render transform also affects the font size and values specified in the Indices attribute.

        Returns:
        The affine transformation matrix.
      • setRenderTransform

        public void setRenderTransform(XpsMatrix value)

        Sets the affine transformation matrix establishing a new coordinate frame for the glyph run specified by the Glyphs element. The render transform affects clip, opacity mask, fill, x origin, y origin, the actual shape of individual glyphs, and the advance widths. The render transform also affects the font size and values specified in the Indices attribute.

        Parameters:
        value - The affine transformation matrix.
      • getClip

        public XpsPathGeometry getClip()

        Returns the path geometry limitting the rendered region of the element. Only portions of the Glyphs element that fall within the clip region (even partially clipped characters) produce marks on the page.

        Returns:
        The path geometry limitting the rendered region of the element.
      • setClip

        public void setClip(XpsPathGeometry value)

        Sets the path geometry limitting the rendered region of the element. Only portions of the Glyphs element that fall within the clip region (even partially clipped characters) produce marks on the page.

        Parameters:
        value - The path geometry limitting the rendered region of the element.
      • getOpacity

        public float getOpacity()

        Returns the value defining the uniform transparency of the glyph element.

        Returns:
        The value defining the uniform transparency of the glyph element.
      • setOpacity

        public void setOpacity(float value)

        Sets the value defining the uniform transparency of the glyph element.

        Parameters:
        value - The value defining the uniform transparency of the glyph element.
      • getOpacityMask

        public XpsBrush getOpacityMask()

        Returns the brush specifying a mask of alpha values that is applied to the glyphs in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.

        Returns:
        The brush specifying a mask.
      • setOpacityMask

        public void setOpacityMask(XpsBrush value)

        Sets the brush specifying a mask of alpha values that is applied to the glyphs in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.

        Parameters:
        value - The brush specifying a mask.
      • getHyperlinkTarget

        public XpsHyperlinkTarget getHyperlinkTarget()

        Returns The hyperlink target object.

        Returns:
        The hyperlink target object.
      • setHyperlinkTarget

        public void setHyperlinkTarget(XpsHyperlinkTarget value)

        Sets the hyperlink target object.

        Parameters:
        value - The hyperlink target object.
      • deepClone

        public XpsGlyphs deepClone()

        Clone this glyphs.

        Returns:
        Clone of this glyphs.