::

interface XFont

Methods' Summary
queryTextShapes Extract the polygonal shapes of the given text. Each glyph is represented by a separate polyPolygon in the returned sequence.
queryTightMeasures Query the tight bounding boxes for every character in the given text string. Tight bounding boxes means that for e.g. an 'a', the bounding box for the polyPolygon describing the glyph 'a' is returned, not the logical dimensions of the character in the font.
queryTextMeasures Query the logical bounding boxes of every character in the given text string. Logical bounding boxes means the space that the font allocates for the given character, which, e.g. for a '.', might be significantly broader than the bounds returned via queryTightMeasures.
queryTextOffsets Query the offsets of the output corresponding to every character in the given text string. The result of this method can be directly fed into the XCanvas::drawOffsettedText method.
queryTextBounds Similar to queryTextMeasures, only that the overall bounds are returned by this method.
getFontDescriptor Query the FontDescriptor that was used to generate this object.
getFontMetrics
getAssociatedCanvas Query the Canvas this font was generated from.
Methods' Details
queryTextShapes
sequence< XPolyPolygon2D >
queryTextShapes(
 
[in] StringContext
[in] ViewState
[in] RenderState
[in] TextDirection
 
text,
viewState,
renderState,
direction );

Description
Extract the polygonal shapes of the given text. Each glyph is represented by a separate polyPolygon in the returned sequence.
queryTightMeasures
sequence< Rectangle2D >
queryTightMeasures(
 
[in] StringContext
[in] ViewState
[in] RenderState
[in] TextDirection
 
text,
viewState,
renderState,
direction );

Description
Query the tight bounding boxes for every character in the given text string. Tight bounding boxes means that for e.g. an 'a', the bounding box for the polyPolygon describing the glyph 'a' is returned, not the logical dimensions of the character in the font.
queryTextMeasures
sequence< Rectangle2D >
queryTextMeasures(
 
[in] StringContext
[in] ViewState
[in] RenderState
[in] TextDirection
 
text,
viewState,
renderState,
direction );

Description
Query the logical bounding boxes of every character in the given text string. Logical bounding boxes means the space that the font allocates for the given character, which, e.g. for a '.', might be significantly broader than the bounds returned via queryTightMeasures.
queryTextOffsets
sequence< double >
queryTextOffsets(
 
[in] StringContext
[in] ViewState
[in] RenderState
[in] TextDirection
 
text,
viewState,
renderState,
direction );

Description
Query the offsets of the output corresponding to every character in the given text string. The result of this method can be directly fed into the XCanvas::drawOffsettedText method.
queryTextBounds
Rectangle2D
queryTextBounds(
 
[in] StringContext
[in] ViewState
[in] RenderState
[in] TextDirection
 
text,
viewState,
renderState,
direction );

Description
Similar to queryTextMeasures, only that the overall bounds are returned by this method.
getFontDescriptor
FontDescriptor
getFontDescriptor();
 
 

Description
Query the FontDescriptor that was used to generate this object.
getFontMetrics
FontMetrics
getFontMetrics();
 
 

getAssociatedCanvas
XCanvas
getAssociatedCanvas();
 
 

Description
Query the Canvas this font was generated from.
Top of Page