How to work with template files and Typekit

Events happening in the community are now at Drupal community events on www.drupal.org.
arnemaine's picture

I need to add the code required for Typekit into the <head> region of the appropriate template file. When I used Fusion in Drupal 6 this meant I made a copy of the page.tpl.php file from the core theme folder and placed it into my sub-theme folder.

This is my first exposure to working with the Omega template structure, and it is more daunting, with both Alpha and Omega templates.

Can someone please explain how I should proceed? Also any suggestions for where to find information or documentation on working with template files in an Omega sub-theme would be most appreciated.

Comments

I'm a fan of the

banghouse's picture

I'm a fan of the font-your-face module. It has typekit support (and numerous others). It's easy to use is lightweight and just works. My $.02.

Omega documentation is an ongoing effort by a small team of volunteers that are mostly communicating in the #drupal-omega channel in IRC. So far we have put together a comprehensive "getting started" set of docs and are in the process of organizing another sprint to begin tackling more advanced topics. If you'd like to assist us in this effort please join us in irc and ping me. I'll add you to our shared draft.

fontyourface

adamdicarlo's picture

I would not call the font-your-face module lightweight. I haven't used Typekit, but with Google Web Fonts, all you need is one call to drupal_add_css() in your theme. The font-your-face module does a ton of unnecessary processing on every page load (in hook_init()) including what looks to be as many database select queries as there are available fonts. (My coworker who tried the module said there were some 230 fonts.)

I haven't used the

arnemaine's picture

I haven't used the font-your-face module. With Typekit I simply just add some code provided by Typekit to the <head> section of the appropriate template file. What I was really wondering (I should have made this clear in my original posting) was what template file to use in Omega.

I also have questions about how the template files are organized and interact in an Omega sub-theme, given that there are template files in both the Alpha and Omega core folders. There doesn't seem to be any documentation on the workings of the template file structure.

For my site, I ended up figuring out, through trial and error, that I could copy the html.tpl.php file in the core Omega directory into my sub-theme's template directory, and add the code from Typekit into the <head> section.

I've also experimented with adding web font files directly into a folder on my site and calling them in directly, which worked quite well. This is great for any web fonts you own.

If I have time, I'll try to help with any documentation around these subjects.

No appreciable slowdown from @font-your-face

alltooeasy's picture

No appreciable slowdown from @font-your-face use. Just make sure to disable all un-used fonts.
For high performance, it might be quicker to avoid another Module call and check.
But thats a nice problem to have.

Google Fonts and External API calls + @Font-your-face calls might be slower. But for quick changes and prototyping, its hard to beat.
We started using it in a dev version and never took it out as it doesn't seem to impact our sites performance.

With the way Fonts are going online, the increasing use of third party providers makes @font-your-face a strong contender for Drupal's go to font tool.
Great UI as well.

@font-your-face ++

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: