Closed (fixed)
Project:
Dynamic Font Rendering
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2010 at 04:35 UTC
Updated:
21 Apr 2010 at 16:01 UTC
Hi,
Thanks so much for contributing this amazing module. Is there a way that I could apply this method of font switching for block, page and/or view titles?
Thanks
Comments
Comment #1
vph commentedYou should be able to use the filter in a block body. For titles, it can be done, but you'll have to modify your themes. And it will affect all titles.
I've just improved the module (in dev version) to allow the specification of line height, which can be useful for certain fonts and multi-line paragraphs.
Comment #2
pribeh commentedSorry, could you provide an example? Should this be done in the template file then as an override? I'm not very good at coming up with those :)
Comment #3
pribeh commentedI could imagine applying this to say all h2 or h3 tags..
Line-height specification is really handy!
Comment #4
vph commented>I could imagine applying this to say all h2 or h3 tags..
I'll try to implement this in the next version.
Comment #5
pribeh commentedAmazing. I see the module got updated with said feature request!
Unfortunately, I am getting the following bug - let me know if I should open up another issue for it:
warning: file_get_contents(sites/all/modules/dfont/dfont.js) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/blah/includes/common.inc on line 2412.
warning: file_get_contents(sites/all/modules/dfont/dfont.js) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/blah/includes/common.inc on line 2412.
Comment #6
pribeh commentedOk, that error has gone away but I'm having an issue with the h2/h3 tags. I've inputted df1m in the h1 or h2 tags but the h1 or h2 tags on my pages are not adopting the font. They do acquire the df1m class in the tag, appear to change size, but no font change occurs. Will do some more testing and report back.
Comment #7
pribeh commentedSorry, my CSS was overriding it. But by removing hierarchical CSS statements like #sidebar-right .block h2 allows dfonts javascript to override the default h2 font style.
Comment #8
pribeh commentedThis is amazing. One other potential request that relates to this and may not be worth opening another issue but is it possible to have the ability to choose our own tag (via the dj admin) to associate a df class with?
Comment #9
vph commentedHi, what theme are you using? I'd like to take a look. Thanks.
Comment #10
sonlinemedia commentedLove this module. We used it last night and I want to share a method I used to apply it to our theme. We use a rich text editor for our clients sites so they can do basic updates. However, from what I saw on your instructions we had to place the [dfont] tags around the content to make it work. So instead of doing this on the content page I opened my theme file and added the style class on the body tag in the html.
EXAMPLE: under admin -> dynamic fonts, it shows to input this for the font style you desire: Usage: [dfont=df2m] ... [/dfont]
The text after the "=" is the class title assigned. So I added this on the page.tpl.php page's body tag -->
<body class="df2m">Hope others find this useful :)
Comment #11
vph commentedThanks. I'm glad you found it useful.
I try not to make this module more complex than it needs to be. The filter provides *local* font formatting of individual paragraphs. If you want to make *global* changes, in addition to presetting the h1, h2, h3 tags, you can also do what solinmedia did. Additionally, you can go directly to the style.css files and specify the font-family there. For example, if you want *all* .content class to be of font family GentR102 (you'll have to use the font's full name). Look for something like this in your theme's style.css:
and add 3 lines like this:
When I have time later this week, I'll add some features to HEAD to make this process more efficient.
Comment #12
pribeh commentedOh, that completely simplifies everything for me! Sorry I'm a bit slow :)
I love this module! Thanks vph and sonlinemedia! You should definitely close the issue now.
Comment #13
vph commentedclosed