Interface IFontFallbackResolver
Finds a face for a grapheme cluster no listed font maps, such as SystemFontFallback.
public interface IFontFallbackResolver
Examples
// Characters the font lacks: the caller's families first, then installed fonts only when asked for.
FontFallback mine = new(FontCollection.System.Families.Where(f => f.Name is "Segoe UI Emoji" or "Noto Color Emoji"));
FontFallback system = FontFallback.System; // depends on the machine's fonts
FontFallback none = FontFallback.None; // the default: missing characters draw as .notdef
Methods
TryResolve(ReadOnlySpan<char>, Script, string?, FontStyle, out Typeface?)
Finds a face that maps every character of a cluster.
bool TryResolve(ReadOnlySpan<char> cluster, Script script, string? language, FontStyle style, out Typeface? typeface)
Parameters
clusterReadOnlySpan<char>The grapheme cluster's text.
scriptScriptThe script of the run the cluster is in.
languagestringThe BCP 47 language tag of the cluster, or null.
styleFontStyleThe style of the font being shaped.
typefaceTypefaceThe face found.
Returns
- bool
Whether a face was found.