New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

oj-fontloader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oj-fontloader

FontLoader (Google & Custom) methods

latest
Source
npmnpm
Version
6.0.0
Version published
Maintainers
1
Created
Source

FontLoader

Fonts will be loaded in span tags on the body tag. The spans contain the "font-test". You can apply styling to this class. The fonts MUST be visible in order to load successfully (so no visibility:hidden, display:none or opacity:0)

import

import * as FL from "oj-fontloader"

isLoaded

isFontLoaded(name: string): boolean

FL.isFontLoaded("Bellota")

loadFont

loadFont(name: string, weights: number[] = []): Promise<void>

await FL.loadFont("Bellota", [300, 400, 700])

loadFonts

loadFonts(fonts: { name: string, weights?: number[] }[]): Promise<void>

await FL.loadFonts([
  { name: "Bellota", weights: [300, 400, 700] },
  { name: "Playfair Display", weights: [400] },
])

Keywords

font

FAQs

Package last updated on 05 Jan 2022

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