npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arma-events/web-fonts

v1.1.2

Published

Packaged, ready-to-use web fonts for arma.events and all related projects.

Downloads

98

Readme

Web Fonts for arma.events

This package includes all web fonts used in arma.events and related projects.

Each font is...

  • ...segmented in multiple unicode ranges so that a browser only needs to download the font resource needed for the displayed text content
  • ...accompanied by a fallback font that should be displayed while the resources are loading. It is a font that is locally available on most systems and is adjusted to match the size of the target font as closely as possible to reduce layout shift.

Installation

npm i @arma-events/web-fonts

Usage

Simply include the css file, which includes font-faces for all font as well as their fallback fonts:

@import '@arma-events/web-fonts/dist/index.css';

/* Use the font */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Raleway', 'Raleway Fallback', sans-serif; /* Make sure to include the fallback font to reduce layout shift */
}

Advanced usage

When you are using SASS (or SCSS) you can also import the index.scss, which allows configuration which font families, Unicode ranges and styles should be included as well as from where the font files are loaded.

// NOTE: omit the variable entirely to keep the default value

@use '@arma-events/web-fonts/dist/index.scss' with (
  // no trailing slash;
  // would attempt to load '~my/font/files/Raleway/italic.latin.woff2'
  //                        ^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^ ^^^^^
  //                        Your Path      Family  Style  Range
  $base-path: '~my/font/files',

  // only include Source Sans 3 and Raleway in the italic-style
  // and latin as well as latin-ext ranges
  $families: ('Source Sans 3', 'Raleway'),
  $styles: ('italic'),
  $ranges: ('latin', 'latin-ext'),
);

Variables

[!IMPORTANT] All "Allowed Values" below might be outdated. Check the dist/_build_info.scss file in your package directory for the correct values.

$base-path

| Name | Value | | :------------- | :------------------------------------------------------------ | | Description | Base path of woff files to load (without a trailing slash) | | Default Value | @arma-events/web-fonts/dist/woff2 | | Type | String | | Allowed Values | - |

$families

| Name | Value | | :------------- | :--------------------------------------------------------------- | | Description | Font families to include | | Default Value | All families | | Type | List | | Allowed Values | one or multiple of Source Sans 3, Source Code Pro, Raleway |

$styles

| Name | Value | | :------------- | :-------------------------------------------------------- | | Description | Font styles to include | | Default Value | All styles | | Type | List | | Allowed Values | one or multiple of normal, italic |

$ranges

| Name | Value | | :------------- | :------------------------------------------------------------------------------------------------------ | | Description | Unicode ranges to include | | Default Value | All built ranges | | Type | List | | Allowed Values | one or multiple of cyrillic-ext, cyrillic, greek-ext, greek, vietnamese, latin-ext, latin |