{"library":"connect-fonts","type":"library","category":null,"description":"Connect/Express middleware for serving web fonts with browser-specific @font-face CSS. Version 2.1.5 is the latest stable release. It allows serving fonts from your own domain instead of relying on external CDNs like Google Fonts, reducing latency. Font packs are installed separately (e.g., connect-fonts-opensans), and the middleware generates CSS tailored to the user's user-agent. Supports locale-optimized subsets, CORS headers, caching, and programmatic CSS generation for build steps. Compared to alternatives, it provides full control over font delivery and is ideal for performance-conscious Express apps.","language":"javascript","status":"maintenance","version":"2.1.5","tags":["javascript","font","font-face","CSS","webfont","typography"],"last_verified":"Wed May 27","install":[{"cmd":"npm install connect-fonts","imports":["const fontMiddleware = require('connect-fonts');","fontMiddleware.setup({ fonts: [require('connect-fonts-opensans')] })","const middleware = fontMiddleware.setup({...}); middleware.generate_css(ua, lang, fonts, callback);"]},{"cmd":"yarn add connect-fonts","imports":[]},{"cmd":"pnpm add connect-fonts","imports":[]}],"homepage":null,"github":"https://github.com/shane-tomlinson/connect-fonts","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/connect-fonts","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/connect-fonts/compatibility"}}