Class: Fontist::Import::Google::DataSources::Woff2

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

Overview

Data source for fetching WOFF2 (Web Open Font Format 2) fonts

This data source fetches fonts from the Google Fonts API with the WOFF2 capability. The response includes fonts in WOFF2 format, which is optimized for web delivery.

Constant Summary collapse

CAPABILITY =
"WOFF2".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:) ⇒ Woff2

Initialize a new WOFF2 data source

Parameters:

  • api_key (String)

    Google Fonts API key



16
17
18
# File 'lib/fontist/import/google/data_sources/woff2.rb', line 16

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