Force Adobe Fonts to load all font variations

Adobe’s Fonts service provides a Project ID, which can be used in various apps to download fonts from the project. Unfortunately, their API currently has a limitation where variable fonts aren’t fully provided. In such cases, a simple PHP filter can be used to force the download of these variations through a different method.

add_filter('blocksy_ext_adobe_typekit:settings', function ($settings) {
	if (empty($settings['fonts'])) {
		return $settings;
	}

	foreach ($settings['fonts'] as $key => $font) {
		if ($font['slug'] === 'atyp-bl-variable') {
			$settings['fonts'][$key]['variations'] = [
				'n4',
				'n7',
				'n8'
			];
		}
	}

	return $settings;
});
Not the solution you are looking for?

Please check other articles or open a support ticket.