PeachDrawing.Text
PeachDrawing.Text.FontSet
FontSet.ResolveGeneric(GenericFamily, Func<string,bool>) Method
Names a family for a generic family on this platform, as Chromium does.
public string? ResolveGeneric(PeachDrawing.Text.GenericFamily generic, System.Func<string,bool>? isAvailable=null);
Parameters
generic GenericFamily
The generic family.
isAvailable System.Func<System.String,System.Boolean>
Whether a family name is one the caller can use, or null to mean that the set has a family of that name. A caller that keeps its own list of usable names, aliases included, passes it here.
Returns
System.String
The family name, or null when the platform’s answer is not available.
Remarks
Windows, macOS and Android each have a fixed answer, and Linux asks fontconfig. The exception is Math, which is the first family of a platform’s list of math fonts that is available. An answer is only returned when it is available, so a caller can move on to its own default.