PeachDrawing.Skia.SkiaRenderContext
SkiaRenderContext.AddFont Method
| Overloads | |
|---|---|
| AddFont(Stream, string) | Adds a font from stream under fontFamilyName (or the family the file names). |
| AddFont(Stream, string, FontFaceDescriptors, IReadOnlyList<RuneInterval>) | Adds a font from stream with the weight, width and style it is declared for. |
SkiaRenderContext.AddFont(Stream, string) Method
Adds a font from stream under fontFamilyName (or the family the file names).
public System.Threading.Tasks.ValueTask AddFont(System.IO.Stream stream, string? fontFamilyName);
Parameters
stream System.IO.Stream
the font file
fontFamilyName System.String
the family to register it under, or null for the one the file names
Returns
System.Threading.Tasks.ValueTask
SkiaRenderContext.AddFont(Stream, string, FontFaceDescriptors, IReadOnlyList<RuneInterval>) Method
Adds a font from stream with the weight, width and style it is declared for.
public System.Threading.Tasks.ValueTask AddFont(System.IO.Stream stream, string? fontFamilyName, PeachDrawing.Core.FontFaceDescriptors descriptors, System.Collections.Generic.IReadOnlyList<PeachDrawing.Text.RuneInterval>? unicodeRanges=null);
Parameters
stream System.IO.Stream
the font file
fontFamilyName System.String
the family to register it under, or null for the one the file names
descriptors FontFaceDescriptors
the weight, width and style the font is declared for
unicodeRanges System.Collections.Generic.IReadOnlyList<RuneInterval>
the characters the font is restricted to, or null for no restriction