Typography improvements italic bold etc.
Hy everybody i think it would be great to extend the typography with those options. Because over the parameter style returns chubby values like 900-italic. But those you cant use for style etc. Would be better to split the size like 900 into font-weight and the styles like italic, italic, italic+bold... :+1:
It actually does that Toni. You have to do a little php code on your end, but the result is the same.
Could you be a little clear as to what you are looking for?
I call it inside my custom-styles.php with that line: font-style: ;
and it returns that: font-style: 400; but if i choose a font and select 700 italic it only return the italic but not the font-weight. Keep in mind that the framework should do this part. I think it's the most promising framework outside. But some little hints from long time wp devs, keep simplicity also for devs :) Would be great to only choose the font-weight: 400, 700, 800, etc and add an extra field with style: italic, bold, italic+bold and so on.
@tonibecker A bug! A bug! You found me a bug!
K, so the issue before was google returned 700italic and I used 700-italic for non-google fonts.
So let's go through how to make this work.
I'm taking the sample data and making two examples. One a Google font, the other not.
http://preview.simplerain.com/qsJK Here's the returned array values for a non google font:
[body-font2] => Array
(
[family] => Impact, Charcoal, sans-serif
[google] => false
[style] => 700italic
[script] => latin
[size] => 22
[height] => 25
[color] => #dd9933
)
Now let's try with a google font. http://preview.simplerain.com/qsJG
[body-font2] => Array
(
[family] => Exo
[google] => true
[style] => 900italic
[script] => latin
[size] => 22
[height] => 25
[color] => #dd9933
)
So to make it work, you need only do a simple string test for italic and move it to font-style, the rest is the font weight.
This should resolve the concerns.
@tonibecker P.S. You'll want to update your code to get the fix.
Ok, scratch that! I just completely rewrite how typography is saved to make it easier on your developers.
Here's now the saved output for a Non-Google font:
[body-font2] => Array
(
[font-family] => Tahoma, Geneva, sans-serif
[google] => false
[font-weight] => 700
[font-style] => italic
[subsets] => latin-ext
[font-size] => 30px
[line-height] => 55px
[color] => #dd9933
)
A Google Font:
[body-font2] => Array
(
[font-family] => Exo
[google] => true
[font-weight] => 900
[font-style] => italic
[subsets] => latin-ext
[font-size] => 30px
[line-height] => 55px
[color] => #dd9933
)
Does that help?
@teamcrisis You'll want to see this.
@dovy thank you, much simpler
That's the way to go :), Is there some need of google maps field with geocoding for contact pages? Than i could do start working on it.