Thanks for this great module!

I know it says on the front page that @font-your-face "requires a public files directory for saving and serving CSS", but it would be nice if it worked with Drupal 7 installations where the default file system is set to private file system.

The current stable version (7.x-2.2) *almost* works - you have to manually copy across the font.css file in the private file system into the public file system. Any chance that future versions could force the font.css file to be saved in the public file system instead? I know this can be done because all the local fonts that are imported are currently being saved in the public file system.

Comments

sreynen’s picture

I didn't realize that was possible, but it looks like it is. So yes, we should do that. I think it's just a matter of rewriting the code that saves fonts.css in fontyourface_preprocess_page() to look more like the code that saves the individual files in local_fonts_add_form_submit(), where it tries to use public: schema if available.

ryoken’s picture

That's great news! Looking forward to the next version of @font-your-face :)

On a separate note (as I'm not sure if this is related to the use of the private file system), if fallback fonts are specified in the "By CSS Selector" screen, they don't seem to appear in the font.css file. Is this expected behaviour? Is this where the fallbacks live or are they loaded in some other file?

sreynen’s picture

That's not really related to the private file system. It happens for my on my public file system. I opened a bug report: #1597826: Fallback fonts not being added to fonts.css

ryoken’s picture

Thanks for confirming it's a separate bug and opening a new bug report. Now I have twice the number of reasons to look forward to 7.x-2.3!

sreynen’s picture

Status: Active » Fixed
ryoken’s picture

Thanks for applying all the fixes Scott! Looks like 7.x-2.3 will be an awesome release! :)

Status: Fixed » Closed (fixed)

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

michael.k’s picture

As far as I can tell, manual copying/transferring from the private directory to the public directory is still necessary with 7.x-2.5.

sreynen’s picture

The code is writing to public://fontyourface/font.css, which should be in the public directory. If you're seeing the files writing to the private filesystem, please give a little more detail on what you're seeing and re-open the issue. Comments in a closed issue are very likely to be missed.

sreynen’s picture

Issue summary: View changes

Fixed grammatical errors