ImageGear for C and C++ on Windows v20.5 - Updated
IG_PDE_text_get_advance
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > Page Editing Objects and Elements > HIG_PDE_TEXT > IG_PDE_text_get_advance

Gets the advance width of a character or a text element.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_PDE_text_get_advance(
        HIG_PDE_TEXT hText,
        UINT nFlags,
        UINT nIndex,
        LPAT_PDF_FIXEDPOINT lpAdvanceWidth 
);

Arguments:

Name Type Description
hText HIG_PDE_TEXT Text object containing a character or text run whose advance width is found.
nFlags UINT enumIGPDETextFlags value that specifies whether index refers to the character offset from the beginning of the text object or the index of the text run in the text object. Must be either:
  • IG_PDE_TEXT_CHAR - for a text character
  • IG_PDE_TEXT_RUN - for a text run
In addition, set the IG_PDE_TEXT_PAGE_SPACE flag to obtain the advance width in user space. If it is not set, the advance width is in character space. If this flag is not set, this function returns a value that is independent of any sizes, matrices, or scaling, simply adding up the font's raw glyph widths, supplemented only by nonscaled character and word spacing.
nIndex UINT Index of the character or text run in hText.
lpAdvanceWidth LPAT_PDF_FIXEDPOINT Pointer to AT_PDF_FIXEDPOINT value indicating the advance width.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

Advance width is returned in either character space or user space. The advance width is the amount by which the current point advances when the character is drawn.

Advance width may be horizontal or vertical, depending on the writing style. Thus lpAdvanceWidth has both a horizontal and vertical component.

Is this page helpful?
Yes No
Thanks for your feedback.