Click or drag to resize
CanvasDrawingSession.DrawGlyphRun Method (Vector2, CanvasFontFace, Single,CanvasGlyph[], Boolean, UInt32, ICanvasBrush)
Draws a sequence of text characters which share the same formatting.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void DrawGlyphRun(
	Vector2 point,
	CanvasFontFace fontFace,
	float fontSize,
	CanvasGlyph[] glyphs,
	bool isSideways,
	uint bidiLevel,
	ICanvasBrush brush
)

Parameters

point
Type: System.Numerics.Vector2
fontFace
Type: Microsoft.Graphics.Canvas.Text.CanvasFontFace
fontSize
Type: System.Single
glyphs
Type:Microsoft.Graphics.Canvas.Text.CanvasGlyph[]
isSideways
Type: System.Boolean
bidiLevel
Type: System.UInt32
brush
Type: Microsoft.Graphics.Canvas.Brushes.ICanvasBrush
Remarks

The typical way to use this method is from the DrawGlyphRun(Vector2, CanvasFontFace, Single,CanvasGlyph[] , Boolean, UInt32, Object, CanvasTextMeasuringMode, String, String,Int32[] , UInt32, CanvasGlyphOrientation) method, in an application's implementation of ICanvasTextRenderer, rather than to call it standalone. In particular, an application may want to adjust the properties of a glyph run, such as its positioning or font, before passing it on to be drawn by a CanvasDrawingSession.

This method's position parameter is different from the position used with DrawToTextRenderer Overload. For DrawToTextRenderer, the position represents the top left corner of the layout box. For this method, the position is the baseline origin. For typical rendering with Latin scripts, the baseline is going to fall below the top left corner of the layout box.

This will use a default measuring mode of Natural.

See Also