Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/446.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何指定加载字体的url?_Javascript_Haxe_Webfonts - Fatal编程技术网

Javascript 如何指定加载字体的url?

Javascript 如何指定加载字体的url?,javascript,haxe,webfonts,Javascript,Haxe,Webfonts,我注意到一些示例显示了如何从当前网站加载字体,作为加载字体的基本路径,如下所示: Browser.document.fonts.load ("1em '" + font + "'").then (function (_) { promise.complete (this); }); 但是如何从特定的URL而不是网站域本身加载? 还有,1em是什么意思 编辑 < style > ("1em url('https://lab-mywebsite.com.com/files/as

我注意到一些示例显示了如何从当前网站加载字体,作为加载字体的基本路径,如下所示:

Browser.document.fonts.load ("1em '" + font + "'").then (function (_) {
    promise.complete (this);
});
但是如何从特定的URL而不是网站域本身加载? 还有,
1em
是什么意思

编辑

< style >
("1em url('https://lab-mywebsite.com.com/files/assets/fonts') ")
</style >