New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@ilo-org/fonts

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ilo-org/fonts

ILO brand fonts and fontface declarations

Source
npmnpm
Version
0.2.2
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

ILO Design System - Fonts Package

This package includes the ILO's brand fonts and typeface declarations. Fore more information about typography at the ILO, see the ILO Brand Hub.

Usage

Simply add the project as a dependency in your package.json and then import the font-face declarations.

// SCSS
@import "~@ilo-org/fonts";
// JavaScript with Webpack
import "~@ilo-org/fonts";

Then, in any css file

.my-type-class {
  font-family: "Overpass", sans;
  font-weight: normal;
  font-style: normal;
}

As Google Fonts

If you need to import the fonts for Google for some reason, you can also do this:

/* CSS */
@import url("@ilo-org/fonts/font-css/fonts-google.css");

Fonts included

This package includes a subset of Overpass and Noto Sans fonts used in ILO projects.

font-familyfont-weightfont-stylefile
"Overpass"normalnormalOverpass-Regular
"Overpass"normalitalicOverpass-Italic
"Overpass"300normalOverpass-Light
"Overpass"700normalOverpass-SemiBold
"Overpass"700italicOverpass-SemiBoldItalic
"Noto Sans"normalnormalNotoSans
"Noto Sans"normalitalicNotoSans-Italic
"Noto Sans"700normalNotoSans-Bold
"Noto Sans"700italicNotoSans-BoldItalic

Formats

All fonts-face declarations include files in the following formats:

  • .eot
  • .woff
  • .woff2
  • .ttf

Raw CSS Import files

This pacakge includes a directory named fonts-css which contains raw css for importing font stacks. Included as of now:

character setfont-family
LatinNoto Sans
LatinOverpass
ArabicNoto Sans Arabic

(Note there is no Arabic character set for Overpass).

Note that both CSS imports refer to their character set's font-family as "Noto Sans" in the CSS. This allows switching out just the font import files while loading CSS from the styles pacakge without having to load an entirely new version of styles package CSS. In an example font stack in an HTML <head> you might have the following logic (pseduo-code):

if is latin
	<link rel="stylesheet" href="css/fonts.css" type="text/css" media="screen" />
else
	<link rel="stylesheet" href="css/fonts-{{language}}.css" type="text/css" media="screen" />
endif

Non-Latin Fonts

This pacakge also includes, as an example, Noto Sans Arabic.

font-familyfont-weightfont-stylefile
"Noto Sans"normalnormalNotoSansArabic
"Noto Sans"700normalNotoSansArabic-Bold

FAQs

Package last updated on 18 Apr 2024

Related posts