Closed (fixed)
Project:
AdaptiveTheme
Version:
7.x-3.x-dev
Component:
Theme Settings
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 18:28 UTC
Updated:
6 Jun 2012 at 20:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
Jeff Burnz commentedDo you have Title Styles enabled in Extensions? This has settings for Case, Weight. Alignment and Shadow
This setting loads a hard coded file (should probably be generated, I will consider that as a change request and test it out), if you have Title Styles OFF then the theme/browser will handle those font styles.
Comment #2
meishme commentedHey Jeff,
Yes I do have it on. However, it doesn't have the weight settings for normal header tags within the content area. See here: http://screencast.com/t/bFDQK2F6x4Tm
The settings that control the header tags seem to be under the "Fonts" extension: http://screencast.com/t/1kBse8EO
But there's no way to change the weights through here: http://screencast.com/t/70B4QpBss7
And because the "Fonts" extension is enabled, the header weights can not be overridden by the stylesheets unless I put "!important", which isn't ideal.
Hope this helps, and thanks for the response.
Comment #3
Jeff Burnz commentedAha, I see why the confusion - its because you are using @font-your-face.
Can you give me a bit more info so I can test this out:
1. Is the @font-your-face font a Google font or other?
2. What is the weight of this font? Is it normal, 400, 700 etc, the weight by default as @font-your-face shows - could be nothing but that is very rare in a font, usually they are clearly either regular, normal, bold, bold-italic etc etc.
I'm pretty sure this is a bug, but not so sure how to deal with it.
Certainly being forced to use !important sucks big time, but you should also try to use the actual font weight to begin with, I mean when selecting the @font-your-face font. The situation I am really looking for here is if there is NO font weight set, then the theme (AT Core) will set 400, which is not the smartest move in this case and forces !important down your throat due to the load order of the CSS files.
Comment #4
Jeff Burnz commentedThe reason I have set this is a bug is that the font generation logic in AT Core will inject defaults, but only if for some reason the font object does not have weight and styles.
This is probably wrong and was done, I recall, because of undefined variable issues during development. I think its worth removing these and setting the variables to NULL and adding extra isset checks.
Regarding the issue with !important, when using @font-your-face you need to use the actual font, that is the way to do this, so you are always using the right font file for the style that is wanted. Please see the screenshot.
There is a way to not use !important for override also - if you use the Custom CSS selector feild and add it there, and choose the correct font for just that one heading size or selector it will get added last in the generated file.
There is a second way also - don't use @font-your-face, instead use the "Basic Google Font" option and just type in "PT Sans", don't choose a "Style" but do choose from the "Character Sets", in your case "Latin". Then no weight will get set at all, and you can set in CSS without requiring !important.
meishme - do you think this works for you? I am not really seeing another way around this unless I change the file generation just for @font-your-face and don't set the weight and style. But that seems bad, I am not sure what the effect might be on the 1000's of fonts out there available when using @font-your-face.
Comment #5
meishme commented- Indeed it is a Google font.
- It uses PT Sans Regular (Latin). Weight should be normal.
- This worked for me. Simply enabling a bold version (PT Sans Bold [Latin]) and then selecting that font from the "Headers" section of the AT settings worked for me: http://screencast.com/t/fmdqHr49IlT
Initially, I only had the Regular version of the font enabled in @font-your-face, because giving it a bold weight seemed to have worked anyway.
Thanks for your help!
Comment #6
Jeff Burnz commentedOK great, glad you have it working now.
Also I have committed an update for the theme, you won't notice any differences, so I think all round this issue is fixed.
Comment #7
Jeff Burnz commentedCleaning up issue queue.