FontExtensions.ToSKTypeface(IFont) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a .NET MAUI Graphics font to a SkiaSharp typeface.
public:
[System::Runtime::CompilerServices::Extension]
static SkiaSharp::SKTypeface ^ ToSKTypeface(Microsoft::Maui::Graphics::IFont ^ font);
public static SkiaSharp.SKTypeface ToSKTypeface(this Microsoft.Maui.Graphics.IFont font);
static member ToSKTypeface : Microsoft.Maui.Graphics.IFont -> SkiaSharp.SKTypeface
<Extension()>
Public Function ToSKTypeface (font As IFont) As SKTypeface
Parameters
- font
- IFont
The font to convert.
Returns
A SkiaSharp typeface that corresponds to the specified font.
Remarks
If the font name is not found as a family name, this method will attempt to load it as a file. If the font is null or has an empty name, the default typeface will be returned.