gatsby-omni-font-loader icon indicating copy to clipboard operation
gatsby-omni-font-loader copied to clipboard

Font variation support

Open mehimanshupatil opened this issue 3 years ago • 0 comments

Hey @codeAdrian, I have added support to listen for font variations like weight and style which solves #25 better handling of font listener function to fix issue mentioned here https://github.com/codeAdrian/gatsby-omni-font-loader/issues/29#issuecomment-1204274698 for which timeout and interval values which were previously deprecated are used

You can specify a specific font variation or set of variations to name and watch by appending the variations separated by commas to the family name separated by a colon. Variations are specified using FVD notation. example: name: 'roboto:n1,n3' and the class added will be class="wf-roboto-n1 wf-roboto-n3 wf-all"

These changes are breaking changes but to make them non-breaking if only font name is passed i.e name: 'roboto' then appended class name will be class="wf-roboto wf-all"

ref. https://github.com/typekit/webfontloader

mehimanshupatil avatar Aug 08 '22 05:08 mehimanshupatil