I'm having a go at designing a premium WP theme, and I've found numerous plugins that allow you to load fonts from Google Web Fonts and other services. However, how do I let administrators actually configure the site-wide heading and body text fonts?
To clarify: When writing a stylesheet, I need to type in the name of the fonts that will be used (e.g. h1 { font-family: Cuprum }. However, I want to be able to choose different fonts for my CSS from my admin panel by picking from available Google Web Fonts.
One option I can think of is using font-family: HeaderFont, font-family: BodyFont, etc. in my CSS, and then loading whichever fonts have been chosen under those names using @font-face, e.g.
@font-face {
font-family: 'HeaderText';
font-style: normal;
font-weight: 400;
src: local('Cuprum'), local('Cuprum-Regular'), url(http://themes.googleusercontent.com/static/fonts/cuprum/v3/sp1_LTSOMWWV0K5VTuZzvQ.woff) format('woff');
}
But that seems like quite a complex solution, and I haven't seen it done that way. What's the accepted way to do this?
