Closed (fixed)
Project:
@font-your-face
Version:
7.x-2.x-dev
Component:
Code (general)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2011 at 19:46 UTC
Updated:
11 Jun 2012 at 21:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
sreynen commentedGenerally, it should just work. I would start by checking that you don't have CSS in your theme that's overriding the font. If you have a site up at a public URL, I'd be happy to look at it and see if I can figure out what's happening.
Comment #2
entrigan commentedSo I did a little more troubleshooting and it appears that panels_everywhere is causing the problem. I am pretty sure it is because panels_everywhere skips rendering the page template which means the ever important fontyourface_add_css_in_preprocess() is not being run.
Would it make sense to move some of the logic into a more generic hook like hook_init()?
Else do you have a recommendation for how I could get the proper CSS included in a custom module?
Thanks!
Comment #3
sreynen commentedI'll have to look into how panels_everywhere works. If it doesnt' go through a page template at all, moving the preprocess stuff to hook_init() won't help, because the stylesheets still won't get added to the page template after that.
Comment #4
entrigan commentedwell, Panels everywhere still generates a page, and includes all css files added through drupal_add_css. That said I tried copying the relevant parts from fontyourface_add_css_in_preprocess() into fontyourface_init(), and it did not solve the problem, so perhaps I do not understand quite how fontyourface works.
Is fontyourface pure css or is there a javascript component to it?
Comment #5
Headache commentedsubscribe
Comment #6
chiappa commentedsubscribe
Comment #7
sreynen commentedI haven't had a chance to look into this yet. Just updating the version to indicate any new features should happen in 7.x-2.x now.
Comment #8
Brian MacKinney commentedMerlinofChaos has a few suggestions here: http://drupal.org/node/1266480
Comment #9
sreynen commentedI think merlinofchaos is right that CSS preprocessing should be done in *_preprocess_html() now that D7 is loading CSS in html.tpl.php rather than page.tpl.php. I'm not sure if that change will just work or completely break everything. We'll have to try it and see.
Comment #10
garbo commentedAnd how should we go about this in D6.x? There is no preprocess_html for D6 is there?
Comment #11
sreynen commentedI don't see any solution for this in D6. I think that's okay, as moving to D7 or not using @font-your-face with Panels Everywhere both seem like reasonable options.
Comment #12
garbo commented@Sreynen
Ok, thanks for your reply.
Comment #13
bryancasler commentedI'm glad this discussion is already happening, I was searching the issue que to see if it had already come up. I'm using the PE versatile theme and I would love to see this module support PE solutions.
Comment #14
zdean commentedAny progress on this front? These are 2 fantastic modules that really need to be able to work together.
Thanks!
Comment #15
mautumn commentedJust for info... I tried @merlinofchaos'es suggestion of changing fontyourface_preprocess_page() to fontyourface_preprocess_html() - but alas it didn't work. It's obviously more subtle than this. I agree this is an issue for font-your-face.
@merlinofchaos thanks very much for looking into this and suggesting a pointer for the font-your-face developer.
I totally agree with @zdean: PE and font-your-face are both vital core tools in any good flexible, client-driven, web design. To be forced to choose between mutually exclusive modules - which is, in effect , what we are having to do at the moment - is a terrible dichotomy... font-your-face is such a great module - I would really love to be able to use it!! Please everyone bump this up!
A final word: if, like @sreynen, you say you are going to try something - then it would be decent if you came back with your findings...
Comment #16
sreynen commentedTaking action on this is the only real way to "bump this up," and it's great that GlossyIbis has started that. It would be helpful to know more detail on "it didn't work." What specifically went wrong? Error message? CSS didn't load? Something else?
I didn't say *I* would try something; I said *we* should try something. To be clearer, I think people who regularly use both modules are the best people to work on getting them working together. I am not in that group, as I don't often use Panels. If no one else does it, I'll eventually solve your problem for you in my free time, because I like helping people. But you should know I'm much less inclined to help people who would lecture me on how I should be helping them. I don't imagine I'm alone in that, so GlossyIbis, you may want to avoid such statements in the future. I think you'll find something more like "hey sreynen, did you try this yet?" works better.
Comment #17
mautumn commented@sreynen when you said over five months ago "...We'll have to try it and see..." - and there has been no feedback since - what do you expect people to think?! Who is "we"? If you felt that something should be tested then why didn't you test it? If you are not a user of PE then perhaps you could have said something like "... I personally don't use PE but perhaps someone who does could test out @merlinofchaos'es suggestion"?
As for saying "hey sreynen, did you try this yet?": why would I do this if you haven't posted on this topic in over five months (lost interest?) and I could test it myself in five minutes?!
I agree with you - I should have said more about my attempt. Here goes: it made absolutely no discernable difference whatsoever. My test site was behaving as if fontyourface_preprocess_page() and fontyourface_preprocess_html() were doing exactly the same thing. Panels were not rendering at all. The css to load fontyourface fonts worked fine and the fonts displayed correctly, but panels were completely missing - as if the modules were disabled. The functionality of PE appears to have been intercepted completely. This was the same effect whether fontyourface_preprocess_page() or fontyourface_preprocess_html() was used. I made sure I cleared all caches before testing the change. I am using Panels 7.x-3.2, PE 7.x-1.x-dev, and fontyourface 7.x-2.x-dev.
Now I know you are the maintainer of fontyourface I'd like to congratulate and thank you for all your work on a very well architected general font solution and I offer any testing support required - I would very much like to use it!
Comment #18
sreynen commentedEveryone. That's how Drupal works. If you don't consider yourself part of "we," you should.
I don't do all work on this module myself. It's a collaborative effort. See above.
I've lost some interest recently, yes, but not all yet.
Great, that's a good incentive for you to fix this issue. Feel free to assign it to yourself so others will know you're working on it.
As next steps, it would be useful to submit your edit as a patch so others can see the specifics of what you did, and also to read up on the differences between how CSS is handled in template_preprocess_html() vs. template_preprocess_page(). It's more than just changing the function name.
Comment #19
zdean commentedHi guys...can we just declare peace on this one and refocus on the problem at hand. My coding skills are limited, but I'd be happy to test, research, etc as needed. @sreynen and @GlossyIbis both seem interested and very capable of providing input to solve this problem...let's get everyone excited about bringing these 2 awesome solutions in sync.
Thanks for everyone's efforts!
Comment #20
btmash commentedAssigning to self - I'm finally working on a project where I've wanted to mess around with panels everywhere so I'll post an update with whatever I find out.
Comment #21
btmash commentedSo looking through at what panels_everywhere does, it essentially replaces the page template to be called with 'panels_everywhere_page' (see
panels_everywhere_page_buildin panels_everywhere.module). And looking through fontyourface, each submodule implements its own hook_preprocess_page. Making changes just to fontyourface.module would not yield any effect. So I performed a search/replace on '_preprocess_page' with '_preprocess_html'. I tried this on the latest dev and it *seems* to work. I don't know of all the intricate changes between preprocess_html and preprocess_page (we have a patch so someone can start reviewing and doing a comparison). But I did try it with my webfont loader module and the change seems play just fine with that as well.But as mentioned above, please review as there may be ramifications I do not know of.
Comment #22
btmash commentedAlso, unassigning.
Comment #23
sreynen commentedI've committed this to dev. I haven't tested with Panels Everywhere, but have confirmed it doesn't seem to break anything in @font-your-face. Marking this as fixed, though do re-open if anyone finds it doesn't actually fix the Panels Everywhere problem.