PeachDrawing.Text
PeachDrawing.Text.FontSet
FontSet.CreateFallback(TypefaceQuery) Method
Makes the fallback a paragraph asks for when the typeface of a run has no glyph for a character: the face, in the family of this set that covers the character, that best matches query.
public System.Func<System.Text.Rune,PeachDrawing.Text.Typeface?> CreateFallback(in PeachDrawing.Text.TypefaceQuery query);
Parameters
query TypefaceQuery
What the fallback face should be like: its weight, width and slant (a variable face is set to them), usually the run’s own.
Returns
System.Func<System.Text.Rune,Typeface>
A function from a character to a typeface, null where no family covers it.
Remarks
The family is chosen the way TryFindCoveringFamily(Rune, EmojiPresentation, TypefaceFamily) does (among the added and the installed families, the one whose coverage best fits the character’s script), and the answer for a character does not change once it has been given. A caller that wants a particular face for a script writes its own function instead.