Is there a way to obtain a serif font in Skia?

68 Views Asked by At

Is there a way of requesting a serif typeface instead of providing the name of a specific typeface to SKTypeface.FromFamilyName?

1

There are 1 best solutions below

0
Hammad Ahmed khan On

No, you can't get a general serif typeface you have to specify a name like this:

using SkiaSharp;

SKTypeface typeface = SKTypeface.FromFamilyName("Times New Roman", SKFontStyleWeight.Normal, SKFontStyleWidth.Normal, SKFontStyleSlant.Upright);