如果未加载字体,则在从 CDN 专门加载时使用不同的字体大小

If font not loaded then different font size when loaded form CDN specifically

我有一些字体是从 Google CDN 加载的,如果没有加载上述字体,我想使用不同的 <body> 字体大小或者浏览器不支持。

我想要达到的目标:-
我想要 body { font-size:16px } 到 CDN 加载的字体 (Open Sans)
body { font-size: 14px } 如果字体不受 loaded/not 支持。

Because all the fonts sizes are measured in em further down the line, if the font is not loaded then the layout get disturbed with huge generic fonts.

有什么方法可以借助 CSSJavascript/jQuery 来实现吗?

您可以在您的字体上监听 onload 事件并检测@font-face 支持。
如果 onload 或支持 echec 则将 body font-size 设置为 14px

要检测 onload 字体,您可以试试这个:
https://github.com/patrickmarabeas/jQuery-FontSpy.js

要检测@font-face 支持,您可以试试这个 github 项目:
https://github.com/paulirish/font-face-detect