Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | typekit-DRUPAL-6--1_behaviors.patch | 1.09 KB | dboulet |
typekit-DRUPAL-6--1_callbacks.patch | 3.18 KB | dboulet |
Comments
Comment #1
zzolo CreditAttribution: zzolo commentedHi @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?
Comment #2
dboulet CreditAttribution: dboulet commentedHi 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.
Comment #3
dboulet CreditAttribution: dboulet commentedHow about this: move Typekit.load to a JS behavior, which can be overridden by the theme.
Comment #4
zzolo CreditAttribution: zzolo commentedHi @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)