Skip to content
zavr-1 edited this page Nov 27, 2019 · 1 revision

Generate fonts list

// get fonts from
// https://raw.githubusercontent.com/jonathantneal/google-fonts-complete/master/google-fonts.json
import fonts from './google-fonts'

const f = Object.entries(fonts).map(([key, { category, subsets }]) => {
  const j = JSON.stringify(subsets)
  if (category == 'display' &&
    j == '["latin"]' || j == '["latin","latin-ext"]'
  ) return key
}).filter(Boolean)

console.log(JSON.stringify(f, null, 2))

Clone this wiki locally