Title: Google Fonts
Last modified: August 30, 2016

---

# Google Fonts

 *  Resolved [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * (@silvestroilgatto)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/google-fonts-18/)
 * Hi there,
 * Thank you for this awesome plugin.
 * I’m using the latest development version of Kirki from GitHub as a library in
   a theme on localhost using Wamp server on Windows 8.1 and PHP 5.4.12. I’ve been
   trying a few controls and so far everything works. The only problem I’m having
   is with Google fonts not displaying in the Customizer preview and not even being
   saved for display in the regular page view.
 * The regular fonts (Serif, Sans-serif, and Monospace) work like a charm, but the
   Google fonts aren’t loaded at all. Therefore, although by viewing the page source
   code I can see that the font-family style is being injected in the Customizer
   preview, this has no effect on the display.
 * Could you please offer any suggestions as to where to look for to get this to
   work? Is there a particular server configuration I need to implement? Could it
   have something to do with decoding json?
 * Thank you so much for your help 🙂
 * [https://wordpress.org/plugins/kirki/](https://wordpress.org/plugins/kirki/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Dimitris Kalliris](https://wordpress.org/support/users/fovoc/)
 * (@fovoc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226397)
 * Hey there,
 * can you please use the snippet from github’s wiki and test if this remains?
    
   [https://github.com/reduxframework/kirki/wiki/Google-Fonts-Integration](https://github.com/reduxframework/kirki/wiki/Google-Fonts-Integration)
   Please keep in mind in that code example that we’re using the ‘output’ argument
   in order to assign these values in the body element but these values may become
   overridden by other theme values.
 * Please advise,
    Dimitris
 *  Thread Starter [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * (@silvestroilgatto)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226402)
 * Hey Fovoc,
 * Thank you for your reply. The Kirki and the CSS code should be fine because the
   local fonts (Sans-serif, Serif, and Monospace) are applied correctly in the preview
   and displayed out of the Customizer. The problem is with the Google fonts only.
 * Thanks!
 *  [Dimitris Kalliris](https://wordpress.org/support/users/fovoc/)
 * (@fovoc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226404)
 * Hey there,
 * can you please pull the latest commit from master branch? I think I just resolved
   that.
 * Please advise,
    Dimitris
 *  Thread Starter [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * (@silvestroilgatto)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226413)
 * Hi Dimitris,
 * I pulled the development version but I can’t see any changes on this front. This
   is the code:
 *     ```
       $fields[] = array(
               'type'        => 'select',
               'setting'     => 'prefix_typeface',
               'label'       => __( 'Typeface', 'textdomain' ),
               'description' => __( 'Please choose a typeface for headings and body copy.', 'textdomain' ),
               'section'     => 'prefix_typography',
               'default'     => 'Lato',
               'priority'    => 10,
               'choices'     => Kirki_Fonts::get_font_choices(),
               'output'      => array(
                   array(
                       'element'  => 'body, h1, h2, h3, h4, h5, h6',
                       'property' => 'font-family',
                   ),
               ),
               'transport'   => 'postMessage',
               'js_vars'     => array(
                   array(
                       'element'  => 'body, h1, h2, h3, h4, h5, h6',
                       'function' => 'css',
                       'property' => 'font-family',
                   ),
               ),
           );
       ```
   
 * As I said, everything works fine with the local font types.
 * One more thing: when I use the development version, the background image in the
   Background control doesn’t work: it doesn’t get applied and is not visible in
   the preview either. The Background control in the stable version of the plugin
   here on the .org repo instead works perfectly. Perhaps I should open another 
   thread for this?
 * Cheers!
 *  [Ari Stathopoulos](https://wordpress.org/support/users/aristath/)
 * (@aristath)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226427)
 * [@silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/) hey
   there!
 * I’m currently working on some stuff in the github repository and I just became
   over-jealous with sanitization which is what caused this issue.
 * I’ll take a look at it and I’ll have it fixed ASAP.
 *  Thread Starter [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * (@silvestroilgatto)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226431)
 * I appreciate it, Aristeides!
 *  [Dimitris Kalliris](https://wordpress.org/support/users/fovoc/)
 * (@fovoc)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226450)
 * Hey there,
 * can you follow up Aristeides’ response here
    [https://github.com/reduxframework/kirki/issues/238#issuecomment-113805258](https://github.com/reduxframework/kirki/issues/238#issuecomment-113805258)
   and test if latest commits resolve this?
 * Please advise,
    Dimitris
 *  Thread Starter [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * (@silvestroilgatto)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226451)
 * Hello Dimitris,
 * The issue is solved! Thank you, you’re awesome 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Google Fonts’ is closed to new replies.

 * ![](https://ps.w.org/kirki/assets/icon-256x256.jpg?rev=3518366)
 * [Kirki – Freeform Page Builder, Website Builder & Customizer](https://wordpress.org/plugins/kirki/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kirki/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kirki/)
 * [Active Topics](https://wordpress.org/support/plugin/kirki/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kirki/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kirki/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [silvestroilgatto](https://wordpress.org/support/users/silvestroilgatto/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/google-fonts-18/#post-6226451)
 * Status: resolved