MCPcopy Create free account
hub / github.com/codrops/TypeShuffleAnimation / preloadFonts

Function preloadFonts

src/js/utils.js:2–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// Preload images
2const preloadFonts = id => {
3 return new Promise((resolve) => {
4 WebFont.load({
5 typekit: {
6 id: id
7 },
8 active: resolve
9 });
10 });
11};
12
13const randomNumber = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
14

Callers 1

index.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected