Socket
Socket
Sign inDemoInstall

@fontsource/open-sans

Package Overview
Dependencies
Maintainers
2
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fontsource/open-sans

Self-host the Open Sans font in a neatly bundled NPM package.


Version published
Weekly downloads
145K
decreased by-6.49%
Maintainers
2
Weekly downloads
 
Created

What is @fontsource/open-sans?

@fontsource/open-sans is an npm package that allows you to self-host the Open Sans font in your web projects. It provides a convenient way to include the font in your project without relying on external CDNs, ensuring better performance and control over the font loading process.

What are @fontsource/open-sans's main functionalities?

Basic Usage

This code imports the default weight and style of the Open Sans font into your project.

import '@fontsource/open-sans';

Specific Weight and Style

This code imports specific weights (400 and 700) of the Open Sans font, allowing you to use different font weights in your project.

import '@fontsource/open-sans/400.css';
import '@fontsource/open-sans/700.css';

Variable Fonts

This code imports the variable font version of Open Sans, which allows for more flexible and responsive typography.

import '@fontsource/open-sans/variable.css';

Subsetting

This code imports only the Latin subset of the Open Sans font, which can reduce the font file size and improve loading times if you only need Latin characters.

import '@fontsource/open-sans/latin.css';

Other packages similar to @fontsource/open-sans

Keywords

FAQs

Package last updated on 12 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc