Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I noticed that Adobe Edge fonts add an HTML class for each activated font. I think that would be a nice feature for Google fonts as well. If you have the Webfont Loader module activated, I noticed this happens by default but with just @font-your-face / google_fonts_api, this is not the case. I wrote a patch which I will attach in the comments to make this happen.
A good use case for this is if you'd like to theme groupings of fonts. So for example, one could create a Sass mixin that takes arguments for font size and render these as:
.wf-pathway-gothic-one-regular {
@include headings(uppercase, .02em, 60px, 9px);
}
.wf-montserrat-regular {
@include headings(capitalize, .01em, 52px, 8px);
}
etc...
Comment | File | Size | Author |
---|---|---|---|
#1 | fontyourface-google_font_class-2337907-1.patch | 1.22 KB | Danny Englander |
Comments
Comment #1
Danny EnglanderAttaching patch.
Comment #2
Danny EnglanderComment #3
Neslee Canil Pinto