From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/fontfaceset/check/index.html | 112 +++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 files/zh-cn/web/api/fontfaceset/check/index.html (limited to 'files/zh-cn/web/api/fontfaceset/check') diff --git a/files/zh-cn/web/api/fontfaceset/check/index.html b/files/zh-cn/web/api/fontfaceset/check/index.html new file mode 100644 index 0000000000..6f95ff04f4 --- /dev/null +++ b/files/zh-cn/web/api/fontfaceset/check/index.html @@ -0,0 +1,112 @@ +--- +title: FontFaceSet.check() +slug: Web/API/FontFaceSet/check +tags: + - API + - CSS Font Loading API + - Experimental + - FontFaceSet + - Method + - Reference +translation_of: Web/API/FontFaceSet/check +--- +

{{APIRef()}} {{SeeCompatTable}}

+ +
{{domxref("FontFaceSet")}} 的check()方法会返回是否在给定的字体列表中的所有字体已经被加载并可用。
+ +

句法

+ +
bool = aFontFaceSet .check(font);
+bool = aFontFaceSet .check(fonttext);
+
+ +

返回

+ +

如果字体列表可用,则{{jsxref("Boolean")}}为true

+ +

参数

+ + + +

例子

+ +
document.fonts.check("12px courier"); //如果字体快递可用在12px,则返回true
+
+document.fonts.check("12px MyFont","ß"); 如果字体“MyFont”具有ß字符,则返回true。
+
+ +

产品规格

+ + + + + + + + + + + + + + +
规范状态评论
{{SpecName('CSS3 Font Loading','#font-face-set-check','check')}}{{Spec2('CSS3 Font Loading')}}初始定义
+ +

浏览器兼容

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
特征Firefox(Gecko)IE浏览器歌剧Safari(WebKit)
基本支持{{CompatChrome(35.0)}}{{CompatGeckoDesktop(41)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
特征Android的Android WebviewFirefox Mobile(Gecko)Firefox操作系统IE Mobile歌剧手机Safari手机适用于Android的Chrome
基本支持{{CompatNo}}{{CompatChrome(35.0)}}{{CompatGeckoMobile(41)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatChrome(35.0)}}
+
-- cgit v1.2.3-54-g00ecf