Skip to content

Instantly share code, notes, and snippets.

@sagarchauhan005
Created January 19, 2022 07:09
Show Gist options
  • Save sagarchauhan005/811f2fd9a3fc255a24b161b53f9c80de to your computer and use it in GitHub Desktop.
Save sagarchauhan005/811f2fd9a3fc255a24b161b53f9c80de to your computer and use it in GitHub Desktop.
Google Font List JSON [Script]
<?php
$json ='https://raw.githubusercontent.com/jonathantneal/google-fonts-complete/master/google-fonts.json';
$array = json_decode(file_get_contents($json), true);
$fonts = [];
foreach($array as $key => $item) {
$font['value'] = $key;
$font['name'] = $key;
array_push($fonts, $font);
}
echo "Total Count: ".sizeof($fonts)."\n";
file_put_contents("google-extracted-fonts.json", json_encode($fonts, true));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment