CanvasGlyphRun Class
- Experimental (WEBPLATEXP0025)
A glyph run or a cluster of a CanvasShapedText: a range of the text and its glyphs, positioned relative to the alignment point and to the baseline of the shaped text.
[Experimental("WEBPLATEXP0025", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public sealed class CanvasGlyphRunProperties
| Name | Description |
|---|---|
| End | Gets the index (in UTF-16 code units) after the last character of the run. |
| Start | Gets the index (in UTF-16 code units) of the first character of the run. |
| Width | Gets the advance width of the run. |
| X | Gets the horizontal distance of the left of the run from the alignment point of the shaped text. |
| Y | Gets the vertical distance of the baseline of the run below the baseline of the shaped text (always 0). |
Gets the index (in UTF-16 code units) after the last character of the run.
public uint End { get; }Gets the index (in UTF-16 code units) of the first character of the run.
public uint Start { get; }Gets the advance width of the run.
public double Width { get; }Gets the horizontal distance of the left of the run from the alignment point of the shaped text.
public double X { get; }Gets the vertical distance of the baseline of the run below the baseline of the shaped text (always 0).
public double Y { get; }Methods
| Name | Description |
|---|---|
| GetTextMetrics() | Returns the metrics of the run, as measureText() gives them for its glyphs alone, with the alignment and the baseline of the shaped text. |
GetTextMetrics()
CanvasRenderingContext2DBase.TextClusters.csReturns the metrics of the run, as measureText() gives them for its glyphs alone, with the alignment and the baseline of the shaped text.
public TextMetrics GetTextMetrics()