我如何在我的网页上测试嵌入式字体?

时间:2022-01-15 11:20:57

I am working on a website that needs embedded fonts.

我正在开发一个需要嵌入字体的网站。

Everything looks great, except, if I delete the local Prelo fonts from my machine (backed them up) the fonts stop working in the browser. Of COURSE this is because there is an error in my code and I fix it and it works again.

一切看起来都很好,除了,如果我从我的机器上删除本地Prelo字体(支持它们),字体在浏览器中停止工作。当然,这是因为在我的代码中有一个错误,我修复了它,它再次工作。

(so the problem is... is there a work-around for "disabling" the local fonts or telling the browser not to look locally for fonts other than needed system fonts?)

(问题是…是否有办法“禁用”本地字体或告诉浏览器不要在本地查找所需系统字体之外的字体?

Is there a way other than deleting the fonts locally to test in the browser? It seems that Chrome and FF default to my system fonts if they can't find the embedded fonts.

是否有一种方法,除了在本地删除字体以在浏览器中测试?看来Chrome和FF是默认的系统字体,如果他们找不到嵌入的字体。

Thanks in advance!

提前谢谢!

2 个解决方案

#1


2  

Just rename the font you want to test, make sure its not a name you have locally.

只需重命名要测试的字体,确保它不是本地的名称。

i.e:

即:

change:

变化:

@font-face {
    font-family: System;
     font-style:  normal;
    src: url(system.eot);
}

div {
    font-family: System;
}

to

@font-face {
    font-family: WebTest;
    font-style:  normal;
    src: url(system.eot);
}

div {
    font-family: WebTest;
}

#2


1  

Type Wonder will let you type in a URL and select a web font. Then it will show you what your page would look like with the new font. Pretty slick.

类型Wonder将允许您输入URL并选择web字体。然后它会显示你的页面将会是什么样子的新字体。相当吸引人。

http://typewonder.com

http://typewonder.com

#1


2  

Just rename the font you want to test, make sure its not a name you have locally.

只需重命名要测试的字体,确保它不是本地的名称。

i.e:

即:

change:

变化:

@font-face {
    font-family: System;
     font-style:  normal;
    src: url(system.eot);
}

div {
    font-family: System;
}

to

@font-face {
    font-family: WebTest;
    font-style:  normal;
    src: url(system.eot);
}

div {
    font-family: WebTest;
}

#2


1  

Type Wonder will let you type in a URL and select a web font. Then it will show you what your page would look like with the new font. Pretty slick.

类型Wonder将允许您输入URL并选择web字体。然后它会显示你的页面将会是什么样子的新字体。相当吸引人。

http://typewonder.com

http://typewonder.com