JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "load-google-fonts.ts"

Full Path: /home/markqprx/iniasli.pro/client/ui/font-picker/load-google-fonts.ts
File size: 461 bytes
MIME-type: text/plain
Charset: utf-8

import {FontConfig} from '@common/http/value-lists';
import lazyLoader from '@common/utils/http/lazy-loader';

export function loadGoogleFonts(fonts: FontConfig[], id: string) {
  const googleFonts = fonts.filter(f => f.google);
  if (googleFonts?.length) {
    const families = fonts.map(f => `${f.family}:400`).join('|');
    lazyLoader.loadAsset(
      `https://fonts.googleapis.com/css?family=${families}&display=swap`,
      {type: 'css', id}
    );
  }
}