Hey awesome work on this theme. I love it! I also love how all the settings can be changes via the theme settings dashboard. Anyway, how do I go about changing the header weights? I seem to be able to only change the size: http://screencast.com/t/sSJdEgwf

And whenever I try overriding it via the stylesheets (unless I put !important), nothing happens because the automatically-generated font-stylesheet takes precedence.

Thanks

CommentFileSizeAuthor
#4 font-your-face_use-the-right-font.png83.61 KBJeff Burnz

Comments

Jeff Burnz’s picture

Do 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.

meishme’s picture

Hey 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.

Jeff Burnz’s picture

Version: 7.x-3.0-rc2 » 7.x-3.x-dev
Category: support » bug

Aha, 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.

Jeff Burnz’s picture

StatusFileSize
new83.61 KB

The 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.

meishme’s picture

1. Is the @font-your-face font a Google font or other?

- Indeed it is a Google font.

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.

- It uses PT Sans Regular (Latin). Weight should be normal.

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.

- 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!

Jeff Burnz’s picture

Status: Active » Fixed

OK 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.

Jeff Burnz’s picture

Status: Fixed » Closed (fixed)

Cleaning up issue queue.