Closed (won't fix)
Project:
@font-your-face
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2012 at 16:42 UTC
Updated:
18 Apr 2013 at 16:09 UTC
I have written a small module that lets one play around with enabled fonts, switching them on the fly.
Sandbox: Live webfont preview (proof of concept)
git: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/DraveRobber/1817852.git live_webfont_preview
It's going to need more work to make it neater and compatible with more browsers, but the approach itself could use some review now.
Comments
Comment #1
Drave Robber commented(issue status)
Comment #2
sreynen commentedI'm always interested in slimming down the main project by moving submodules out, but I'd be happy to include this if you'd rather not maintain it as a separate project. It seems like it could be really useful, but it still needs work. Some notes:
drupal_html_class($font->name)for a class seems to cause problems, I suspect due to fonts that have ™ or ® in the name. I'm not sure why, but I think this is worth changing for other reasons, namely$font->nameisn't necessarily unique, which could cause some confusing behavior. I replaced this with $font->fid, which is always unique, and that seemed to also fix the pages where it wasn't working.Comment #3
Drave Robber commentedAFAIK text inside
ulis perfectly legal HTML, at least http://validator.w3.org/ has no objections to it. Of course, we can refrain from doing this on grounds of it being "cruel and unusual". :)Other notes are all reasonable. On 4. I was thinking about a button on the side/corner, but it's possible to have both.
About 'slimming down' and 'moving out' I'm generally somewhat skeptical, but I'll voice my doubts on IRC.
Comment #4
Drave Robber commented1. and 2. have been implemented;
4. has been partially implemented (mouse-clickable button to toggle anchor display, no key binding yet).
As for 3, exploring options.
Comment #5
Drave Robber commentedProgress report:
Comment #6
Drave Robber commented#1859342: Respect selectors set by other modules is fixed;
how about another review?
Comment #7
Drave Robber commentedNot pushing this anymore, due to lack of interest.