typekit / webfontloader

Web Font Loader gives you added control when using linked fonts via @font-face.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I call {load} method many time in react component??

kimkyeseung opened this issue · comments

import { load } from 'webfontloader';

...

  shouldComponentUpdate(nextProps) {
    console.log(nextProps);
    nextProps.getFontDetail(nextProps.font);
    let families = nextProps.fontDetail.styles.length > 1 ? nextProps.styles : [nextProps.family];
    load({
      custom: {
        families,
        urls: nextProps.fontDetail.url
      }
    });
    return true;
  }

It is piece of my project.. I think It is not work

I have to a lot of fonts to show each one in browser altogether

I use aws s3 storage like this
https://s3.ap-northeast-2.amazonaws.com/project-hangeul/BMDOHYEON_otf/BMDOHYEON_otf.css
https://s3.ap-northeast-2.amazonaws.com/project-hangeul/BMDOHYEON_otf/BMDOHYEON_otf.otf

is there good way to show a log of fonts at once??