Click or drag to resize
CanvasFontFaceGetTypographicFeatureGlyphSupport Method (CanvasAnalyzedScript, CanvasTypographyFeatureName, CanvasGlyph)
Gets an array of booleans, as to whether a set of glyphs can be used with the specified typographic feature.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public bool[] GetTypographicFeatureGlyphSupport(
	CanvasAnalyzedScript script,
	CanvasTypographyFeatureName typographicFeatureName,
	CanvasGlyph[] glyphsElements
)

Parameters

script
Type: Microsoft.Graphics.Canvas.TextCanvasAnalyzedScript
typographicFeatureName
Type: Microsoft.Graphics.Canvas.TextCanvasTypographyFeatureName
glyphsElements
Type: Microsoft.Graphics.Canvas.TextCanvasGlyph

Return Value

Type: Boolean
Remarks

Calling GetTypographicFeatureGlyphSupport is a good way to determine whether a set of glyphs are eligible for a typographic feature, when that typographic feature has not yet been enabled.

If the feature has already been enabled, it's worth noting that typographic features cause glyph substitution. For example, if an app:

  • has a custom ICanvasTextRenderer, and
  • passes CanvasGlyphs from its DrawGlyphRun handler to GetTypographicFeatureGlyphSupport, and
  • that DrawGlyphRun was caused by drawing a text layout which already has the feature enabled,
then some glyphs will be reported as ineligible for the feature! Reason being, they've already been substituted.

It is an error to pass CanvasTypographyFeatureName.None to this method.

This method uses the default locale.

See Also