This patch allows admins to add JavaScript callback code for font events.

More about Typekit's font events: More control with Typekit’s font events.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zzolo’s picture

Status: Needs review » Needs work

Hi @dboulet. Thanks for the idea and patch.

I don't really support putting arbitrary JS into a textfield and storing it in the database. If someone is going to write javascript, they should put it in a module or theme. Maybe there is a better way to use Drupal.behaviors to extend this?

dboulet’s picture

Title: Add font event callback script through admin interface » Add font event callbacks

Hi zzolo, thanks for the reply. I mostly agree with you, but I was having trouble implementing the callbacks in my theme's JS, and thought that this could be a quick and easy solution.

I'll try instead to figure it out in the theme layer, and get back to you.

dboulet’s picture

Status: Needs work » Needs review
FileSize
1.09 KB

How about this: move Typekit.load to a JS behavior, which can be overridden by the theme.

zzolo’s picture

Status: Needs review » Closed (won't fix)

Hi @dboulet. Sorry for the delayed response. So, I have decided to deprecate this module and promote font-your-face as its a much more robust solution for fonts. This means that this module will not get any new features.

See #877396: Promote @font-your-face (deprecate this module)