Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font variation support #33

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mehimanshupatil
Copy link
Contributor

@mehimanshupatil mehimanshupatil commented Aug 8, 2022

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 #29 (comment) 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant