Hi,
I'm trying to use fonts from fonts.com whose font names have white space, for example: "HelveticaNeue W01 35 Thin"
font.css is being rendered as (an example): h2 { font-family: HelveticaNeue W01 35 Thin; }
The white space in the font name is preventing family from displaying. According to numerous references, font names with white space need to be quoted (1). So in the above example, the css would need to be rendered as: font-family: "HelveticaNeue W01 35 Thin";
I looked at the the function fontyourface_font_css and somewhere in there, the code needs to add quotes if font name has quotes. Or does this need to happen from the provider? In any case, an FYI. I can take a stab at rolling a patch if need be. I'm thinking that it would have to happen at this level (in the main fontyourface.module) to catch any font name from any service. So the logic would be: test for white space in $font->css_family, if so, slap quotes around that puppy.
| Comment | File | Size | Author |
|---|---|---|---|
| font-family-white-space.png | 67.45 KB | patrickfgoddard |
Comments
Comment #1
sreynen commentedMakes sense. I was thinking fonts.com included quotes where necessary, but apparently not.
Comment #3
sreynen commentedFix committed to both D7 and D6 dev.
Comment #5
BarisW commentedChanged this to make it work on a higher level. We now add quotes around the family name everywhere.