Skip to content

函数: preloadFont()

preloadFont(res, fn): Promise<void>

预加载字体资源

参数

res

string[]

预加载字体资源数组

fn

Function

预加载字体资源函数

返回

Promise<void>

示例

ts
LM.preloadFont(["test.ttf"],()=>{
    console.log("加载完成")
})