import Vnmf from '../../index' declare module '../../index' { namespace loadFontFace { interface Option { /** Globally effective or not * @default false */ global?: boolean, /** Defined Font Name */ family: string /** Address of font resources。Suggested Format TTF and WOFF,WOFF2 In low version iOS It'll be incompatible.。 */ source: string /** Optional Font Descriptor */ desc?: DescOption /** Interface calls a successful echo function */ success?: (res: CallbackResult) => void /** Interface call failed echo function */ fail?: (res: CallbackResult) => void /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: CallbackResult) => void } interface CallbackResult extends VnmfGeneral.CallbackResult { /** Load Font Result */ status: string } /** Optional Font Descriptor */ interface DescOption { /** @supported h5 */ ascentOverride?: string /** @supported h5 */ descentOverride?: string /** @supported h5 */ featureSettings?: string /** @supported h5 */ lineGapOverride?: string /** @supported h5 */ stretch?: string /** Font Styles,Optional Value As normal / italic / oblique */ style?: string /** @supported h5 */ unicodeRange?: string /** Set font for small capital letters to display text,Optional Value As normal / small-caps / inherit */ variant?: string /** @supported h5 */ variationSettings?: string /** Fonts Blank,Optional Value As normal / bold / 100 / 200../ 900 */ weight?: string } } interface VnmfStatic { /** Dynamic Load Network Fonts。File address to download type。iOS Support only https Format File Address。 * * Attention.: * 1. Font file returned contet-type References [font](https://www.iana.org/assignments/media-types/media-types.xhtml#font),Could not close temporary folder: %s。 * 2. The font link must behttps(iosNot supportedhttp) * 3. Font links must be under the same source,Or it's on.corsSupport,The domain name of the applet is`servicewechat.com` * 4. canvasThe original component does not support the use of font added by interface * 5. Tooltips Faild to load fontYou can ignore it. * @supported weapp, h5 * @h5 Not supported global (Default global loading) * @example * ```tsx * Vnmf.loadFontFace({ * family: 'Bitstream Vera Serif Bold', * source: 'url("https://sungd.github.io/Pacifico.ttf")', * success: console.log * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/font/wx.loadFontFace.html */ loadFontFace(option: loadFontFace.Option): Promise } }