PeachDrawing.Core
PeachDrawing.Core.RenderContext
RenderContext.AddLocalFontFamily(string, string, FontFaceDescriptors, IReadOnlyList<RuneInterval>) Method
Registers a locally-installed font face under fontFamilyName, matching a CSS @font-face rule’s local() source.
public System.Threading.Tasks.Task<bool> AddLocalFontFamily(string fontFamilyName, string localFontFaceName, PeachDrawing.Core.FontFaceDescriptors descriptors=default(PeachDrawing.Core.FontFaceDescriptors), System.Collections.Generic.IReadOnlyList<PeachDrawing.Text.RuneInterval>? unicodeRanges=null);
Parameters
fontFamilyName System.String
the font family name declared by the @font-face rule
localFontFaceName System.String
the installed face’s own name, as local() names it
descriptors FontFaceDescriptors
the @font-face rule’s own font-weight/font-style/font-stretch descriptors, resolved to the ranges the face covers
unicodeRanges System.Collections.Generic.IReadOnlyList<RuneInterval>
the @font-face rule’s own unicode-range descriptor; null means no restriction
Returns
System.Threading.Tasks.Task<System.Boolean>
true if the face was found and registered, false if no locally-installed face by that name exists