Created
January 19, 2022 07:09
-
-
Save sagarchauhan005/811f2fd9a3fc255a24b161b53f9c80de to your computer and use it in GitHub Desktop.
Google Font List JSON [Script]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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