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.

(1) http://www.w3schools.com/CSS/pr_font_font-family.asp

CommentFileSizeAuthor
font-family-white-space.png67.45 KBpatrickfgoddard

Comments

sreynen’s picture

Version: 7.x-1.2 » 7.x-1.x-dev

Makes sense. I was thinking fonts.com included quotes where necessary, but apparently not.

sreynen’s picture

Status: Active » Fixed

Fix committed to both D7 and D6 dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

BarisW’s picture

Component: Code » Code (general)

Changed this to make it work on a higher level. We now add quotes around the family name everywhere.