Title: Font Squirrel api
Last modified: August 21, 2016

---

# Font Squirrel api

 *  [kyle_riem](https://wordpress.org/support/users/kyle_riem/)
 * (@kyle_riem)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/font-squirrel-api/)
 * Has anyone used the font squirrel api? I have a json callback downloading a font
   file from font squirrel and i have WordPress creating a folder in a sub directory
   for the file. But the folder that is created has some arbitrary name and the 
   folder is empty. Has anyone done this before?
 *     ```
       function kdr_awesome_fonts_font_family_choice(){
       		$font_family_input = get_option( 'font_family_choice', $default = false );
       	?>
       	<select name="font_family_choice">
       			<?php
       			$fonts = kdr_awesome_fonts_fontfamily_jsoncall();
       			$i=0;
       			//if the json request works render a select box for the list of the family names
       				foreach($fonts as $key => $value){
       				echo "<option value='".$i."' ". selected($i, $font_family_input).">".$fonts[$key]->family_name."</option>";
       				$i++;
       				}
       			?>
       	</select>
       	<?php
       	$font_position = kdr_postion($font_family_input);
       	$font_position_placement = wp_remote_request('http://www.fontsquirrel.com/fontfacekit/'.$font_position -> family_urlname.'');
       <p>}
       	<?php
       $upload_dir = wp_upload_dir('web-fonts/'.$font_position_placement);
       }
       ```
   

The topic ‘Font Squirrel api’ is closed to new replies.

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)
 * [wp_upload_dir](https://wordpress.org/support/topic-tag/wp_upload_dir/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [kyle_riem](https://wordpress.org/support/users/kyle_riem/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/font-squirrel-api/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
