@diffusionstudio/core-v4
Version:
A fast, browser based video compositing engine powered by WebCodecs
23 lines (22 loc) • 882 B
TypeScript
import { WebFonts } from './fixtures';
import { Font, FontStyle, FontWeight } from '../renderer';
import type * as types from './types';
declare global {
interface Window {
loadedFonts: types.FontSource[];
}
}
/**
* Get all available local fonts, requires the
* **Local Font Access API**
*/
export declare function getLocalFonts(): Promise<types.FontSources[]>;
/**
* Get common web fonts
*/
export declare function getWebFonts(): types.FontSources[];
export declare function loadFont<T extends keyof typeof WebFonts>(options: types.FontSource | types.WebfontProperties<T>): Promise<Font>;
export declare function restoreFonts(fonts: types.FontSource[]): Promise<void>;
export declare function getLoadedFonts(): types.FontSource[];
export declare function matchFontStyle(style: any): FontStyle;
export declare function matchFontWeight(weight: any): FontWeight;