Title: Bug in get_api_query()
Last modified: August 30, 2016

---

# Bug in get_api_query()

 *  [ixiter](https://wordpress.org/support/users/ixiter/)
 * (@ixiter)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/bug-in-get_api_query/)
 * You use ucwords() to create the query. That doesnt work with all fonts.
    I tried
   to use the “Fredericka the Great” font. Differently to your comment in get_api_query(),
   its name isnt ucfirst in all words. Google recognize it as “Fredericka **t**he
   Great”, not as “Fredericka **T**he Great”.
 * I did a workaround especially for this font. But maybe this happens with other
   fonts, too.
 * Line 660
 *     ```
       if($fontvars['family'] == 'Fredericka-the-Great'){
           $families[$i] = 'Fredericka+the+Great';
       } else {
           $words = explode("-",$fontvars['family']);
           foreach($words as $key => $word){
               $words[$key] = ucwords($word);
           }
           $families[$i] = implode('+', $words);
       }
       ```
   
 * [https://wordpress.org/plugins/wp-google-fonts/](https://wordpress.org/plugins/wp-google-fonts/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [ixiter](https://wordpress.org/support/users/ixiter/)
 * (@ixiter)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/bug-in-get_api_query/#post-6354453)
 * Other fonts I found with lcfirst in some words ….
 * Waiting for the Sunrise
    Over the Rainbow Loved by the King Dawning of a New 
   Day

Viewing 1 replies (of 1 total)

The topic ‘Bug in get_api_query()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-google-fonts_ffffff.svg)
 * [WP Google Fonts](https://wordpress.org/plugins/wp-google-fonts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-google-fonts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-google-fonts/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-google-fonts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-google-fonts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-google-fonts/reviews/)

## Tags

 * [link tag](https://wordpress.org/support/topic-tag/link-tag/)
 * [lowercase](https://wordpress.org/support/topic-tag/lowercase/)
 * [uppercase](https://wordpress.org/support/topic-tag/uppercase/)

 * 1 reply
 * 1 participant
 * Last reply from: [ixiter](https://wordpress.org/support/users/ixiter/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/bug-in-get_api_query/#post-6354453)
 * Status: not resolved