Class: Fontist::Import::Google::DataSources::Vf

Inherits:
Base
  • Object
show all
Defined in:
lib/fontist/import/google/data_sources/vf.rb

Overview

Data source for fetching Variable Fonts

This data source fetches fonts from the Google Fonts API with the VF (Variable Fonts) capability. The response includes fonts that support variable font capabilities, with axes data for those that have it.

Note: The VF endpoint returns both variable and static fonts. Fonts without axes are static fonts that support the VF capability but don’t have variable font axes.

Constant Summary collapse

CAPABILITY =
"VF".freeze

Constants inherited from Base

Base::BASE_URL

Instance Attribute Summary

Attributes inherited from Base

#api_key, #capability

Instance Method Summary collapse

Methods inherited from Base

#clear_cache, #fetch, #fetch_raw, #parse_response, #url

Constructor Details

#initialize(api_key:) ⇒ Vf

Initialize a new Variable Fonts data source

Parameters:

  • api_key (String)

    Google Fonts API key



20
21
22
# File 'lib/fontist/import/google/data_sources/vf.rb', line 20

def initialize(api_key:)
  super(api_key: api_key, capability: CAPABILITY)
end