Registry / gcp / ember-cli-google-fonts

ember-cli-google-fonts

JSON →
library2.16.2jsnpmunverified

An Ember addon (v2.16.2) that lazily adds Google Fonts to an Ember application by injecting font declarations into the `content-for: head` hook, avoiding inclusion in CSS files. Supports Ember projects targeting Node 4.5+, 6.*, or 7.*. Follows Ember 2.x versioning. Differentiators: minimal configuration via environment.js, automatic Content Security Policy updates, and lazy loading without blocking render.

gcp
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Configuration is an array of strings, not a single string. Each font family with optional weights/styles.

// in config/environment.js googleFonts: ['Open+Sans:300,400,700']

Missing 'self' and style-src can break CSP. Must include both font-src and style-src with correct origins.

// in config/environment.js contentSecurityPolicy: { 'font-src': "'self' fonts.gstatic.com", 'style-src': "'self' fonts.googleapis.com" }

Use ember install to ensure blueprint runs. Manual npm install may miss addon registration.

ember install ember-cli-google-fonts

Installs the addon and configures Google Fonts with Content Security Policy in an Ember project.

ember install ember-cli-google-fonts // config/environment.js module.exports = function(environment) { var ENV = { googleFonts: [ 'Open+Sans:300,400,700', 'Roboto:300' ], contentSecurityPolicy: { 'font-src': "'self' fonts.gstatic.com", 'style-src': "'self' fonts.googleapis.com" } }; return ENV; };
Debug
Known footguns
gotchaGoogle requires an API key for usage; this addon does not handle key authentication. Public fonts work without key, but new projects may require key.
breakingIn v2.0.0, the configuration property name changed from 'googleFonts' to 'googleFonts' (same), but the format changed from a string to an array.
gotchaThe addon does not lazy load fonts as of v2.16.2; fonts are loaded synchronously in head. Future versions may support lazy loading.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
14 hits · last 30 days
gptbot
4
ahrefsbot
4
bytedance
3
amazonbot
2
script
1
Resources