If you upload local fonts with multiple files for style, weight, etc., give them all the same family name but specify different styles and/or weight, the module doesn't include the extra CSS files it creates.

For example, if I have SuperFontRegular and SuperFontBold, I would use the same 'font-family: SuperFont' for both and use 'font-weight: normal' and 'font-weight: bold' within their respective @font-face.

Being able to specify the style or weight is quite handy for those browsers that pick up the variants within the @font-face declaration instead of synthesizing them.

The module uploads the files into the same directory, writes separate CSS files for each variant, but doesn't include CSS for anything but the first.

Comments

sreynen’s picture

Thanks for the detailed bug report. I'll try to get this fixed soon.

sreynen’s picture

Status: Active » Needs review

I just committed a fix to the dev branch. Once that gets repackaged with tomorrow's date (2011-Jul-12), please download it and confirm it fixes the problem for you.

train’s picture

It's not that it's overwriting anything, but it's not including the additional CSS files in the document.

So I guess either include the additional CSS or combine them all into one?

sreynen’s picture

What are the different CSS file names? It should only be writing one file named stylesheet.css.

train’s picture

I have stylesheet.css and stylesheet_0.css.

It looks like on line 324 of local_font.module (v2.6) the file_save_data function is auto-incrementing the file name when it goes to write the CSS and finds one there already.

sreynen’s picture

Okay, that second file shouldn't be there at all. The dev release should fix this problem. Please try it out and confirm.

train’s picture

Aha! Works a charm!

Looks fantastic on my end, thank you!

If I haven't said so before, thanks for this module, saves me so much time.

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

Great, thanks for your help testing!

sreynen’s picture

Status: Reviewed & tested by the community » Fixed

I'm putting this in a release now, so marking it fixed.

Status: Fixed » Closed (fixed)

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