PeachDrawing.Text
PeachDrawing.Text.FontSet
FontSet.AddData(ReadOnlyMemory<byte>, AddOptions) Method
Adds a font to the set.
public PeachDrawing.Text.TypefaceFamily AddData(System.ReadOnlyMemory<byte> data, PeachDrawing.Text.AddOptions? options=null);
Parameters
data System.ReadOnlyMemory<System.Byte>
The bytes of the font file.
options AddOptions
What to say about the font in place of what it says about itself, or null for nothing.
Returns
TypefaceFamily
The family the font was added to: the one named in options, or otherwise the family the font
declares. It is spelled as the set spells that family, which is the spelling it was first registered under
when the set already had one of that name.
Exceptions
TypefaceFormatException
The data is not a font this library can read.
Remarks
TrueType, OpenType (glyf and CFF), WOFF and WOFF2 data are recognised by their content, whatever
the caller believes the format is. Of a TrueType or OpenType collection only the first face is added.