
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@fontsource/poppins
Advanced tools
@fontsource/poppins is an npm package that allows developers to self-host the Poppins font in their web projects. It provides a convenient way to include the Poppins font without relying on external services like Google Fonts, offering better control over loading performance and privacy.
Self-hosting Poppins font
This feature allows you to self-host the Poppins font by importing it directly into your project. This can improve performance and privacy by reducing reliance on third-party services.
import "@fontsource/poppins";
Specifying font weights and styles
You can import specific font weights and styles to optimize loading times by only including the necessary font files for your project.
import "@fontsource/poppins/400.css";
import "@fontsource/poppins/700.css";
Variable fonts support
The package supports variable fonts, allowing for more flexible and responsive typography by using a single font file that can adjust its weight and style dynamically.
import "@fontsource/poppins/variable.css";
typeface-poppins is another package for self-hosting the Poppins font. It is similar to @fontsource/poppins but is part of the older typeface project, which is less actively maintained compared to the Fontsource project.
fontsource-roboto is part of the same Fontsource project and offers similar functionality for the Roboto font. Like @fontsource/poppins, it allows for self-hosting, specific weight imports, and variable fonts, but for the Roboto typeface.
webfontloader is a more general package that allows you to load fonts from various sources, including Google Fonts and Typekit. While it provides more flexibility in terms of font sources, it does not offer the same level of self-hosting control as @fontsource/poppins.
The CSS and web font files to easily self-host the “Poppins” font. Please visit the main Fontsource website to view more details on this package.
Fontsource offers multiple methods to import the CSS, including using a bundler like Vite or using SASS. You can find full documentation here.
npm install @fontsource/poppins
Within your app entry file or site component, import it in.
import "@fontsource/poppins"; // Defaults to weight 400
import "@fontsource/poppins/400.css"; // Specify weight
import "@fontsource/poppins/400-italic.css"; // Specify weight and style
Supported variables:
[100,200,300,400,500,600,700,800,900]
[italic,normal]
[devanagari,latin,latin-ext]
Note:
italic
may not be supported by all fonts. To learn more about what weights and styles are supported, please visit the Fontsource website.
Finally, you can reference the font name in a CSS stylesheet, CSS Module, or CSS-in-JS.
body {
font-family: "Poppins";
}
Always make sure to read the license for each font you use. Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fonts use the Apache 2 license. The Ubuntu fonts use the Ubuntu Font License v1.0.
Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins) OFL-1.1
Font version (provided by source): v20
.
If you have any suggestions or ideas to improve the performance of font loading or expand the existing library, feel free to star and contribute to this repository. You can share your suggestions or ideas by creating an issue.
FAQs
Self-host the Poppins font in a neatly bundled NPM package.
The npm package @fontsource/poppins receives a total of 105,252 weekly downloads. As such, @fontsource/poppins popularity was classified as popular.
We found that @fontsource/poppins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.