skia
    Preparing search index...

    Interface TypefaceFactory

    interface TypefaceFactory {
        GetDefault(): Typeface | null;
        MakeFreeTypeFaceFromData(fontData: ArrayBuffer): Typeface | null;
        MakeTypefaceFromData(fontData: ArrayBuffer): Typeface | null;
    }
    Index

    Methods

    • By default, CanvasKit has a default monospace typeface compiled in so that text works out of the box. This returns that typeface if it is available, null otherwise.

      Returns Typeface | null

    • Create a typeface using Freetype from the specified bytes and return it. CanvasKit supports .ttf, .woff and .woff2 fonts. It returns null if the bytes cannot be decoded.

      Parameters

      • fontData: ArrayBuffer

      Returns Typeface | null