5

我已经注册了 TypeKit 订阅,并在我的工具包中添加并发布了一种字体,并将 javascript 链接粘贴到我的 HTML 头中。

它要求我的域名。但是有可能让它在我的电脑上本地工作吗?

4

3 回答 3

2

会回答我自己的问题。在他们的网站上找到

“在本地开发时使用 Typekit 如果您在自己的机器上运行 Web 服务器,您可以在 Kit Editor 的 Kit Settings 中指定最多十个域,包括开发域、子域和“localhost”。Typekit 无法在以下页面上工作您从您的文件系统 (file://) 打开;这是因为 Typekit 需要一个本地文件系统无法发送的引荐来源网址。”

http://help.typekit.com/customer/portal/articles/6857-using-typekit-while-developing-locally

于 2013-08-31T04:39:00.923 回答
2

可以在本地使用 Typekit 字体。

我使用MAMP(如果您使用的是 Windows,则为 WAMP)在本地提供我的开发站点,这意味着我可以将我的 localhost 域添加到 Typekit“工具包设置”中的 URL 列表中。

在本地托管一个开发站点比听起来要容易得多,而且非常有用(对于需要数据库的 Wordpress 安装来说是必不可少的)。MAMP Pro 允许您分配任意数量的自定义本地域,但如果您一次只需要开发一个站点,免费版本会做得很好。

或者,如果您使用 Adob​​e 的 Creative Cloud 服务,您可以将所有 Typekit 字体直接下载到您的系统中,并像使用任何其他系统字体一样在本地开发中使用它们。(我自己没有尝试过这种方法,但使用 MAMP绝对有效。我每天都在本地使用 Typekit)。

于 2014-01-07T17:40:26.307 回答
1

One way to work locally is using virtual hosts. You can have any number of them and bind them all to the same IP address if you wish, by editing your system's "hosts" file. For example:

coolthing.site 127.0.0.1

greatstuff.app 127.0.0.1

anotherone.site 127.0.0.1

If using MAMP (or similar) you might need to operate them on multiple ports (i.e. 80, 8000, 8080, etc).

Then on Typekit you can specify just the one IP address: 127.0.0.1 If necessary include the ports, e.g. 127.0.0.1:8000


Alternatively, if you develop with a Vagrant box (or similar virtual machine) -- you can set up your hosts in the vagrant yaml config and it will add them to the hosts file for you. Usually these will be bound to a LAN IP, for example:

coolthing.site 192.168.100.1

greatstuff.app 192.168.100.1

anotherone.site 192.168.100.1

In that situation you would add 192.168.100.1 to Typekit by adding that to the accepted list of domains/IP addresses.

于 2016-11-10T08:32:12.513 回答