Class SoftwareTextMeasureContext
A lightweight ITextMeasureContext backed by the software font Catalog. Used to provide text hit-testing for pointer events without needing a full drawing context.
public sealed class SoftwareTextMeasureContext : ITextMeasureContext
- Inheritance
-
SoftwareTextMeasureContext
- Implements
- Inherited Members
Constructors
SoftwareTextMeasureContext(Catalog)
public SoftwareTextMeasureContext(Catalog catalog)
Parameters
catalogCatalog
Methods
MeasureText(string)
Measures the layout and bounding box metrics of the specified text string using the current font.
public TextMetrics MeasureText(string text)
Parameters
textstringThe text string to measure.
Returns
- TextMetrics
A TextMetrics structure containing both string-specific and font-wide metrics.
SetFont(Font)
Sets the font used for all subsequent text drawing and measurement operations.
public void SetFont(Font font)
Parameters
fontFontThe font definition to apply.