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

chore: allow and apply unicodeRange #2209

Merged
merged 4 commits into from
Sep 13, 2023
Merged

Conversation

anucreative
Copy link
Contributor

@anucreative anucreative commented Aug 22, 2023

Example usage:

export const fontFaces = {
  'Work Sans': [
    {
      url: `${FONT_URL}/work-sans-variable-latin-ext`,
      isVariable: true,
      stretch: '75% 125%',
      uniCodeRange:
        'U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF',
      weight: '400-600',
    },
    {
      url: `${FONT_URL}/work-sans-variable-latin`,
      isVariable: true,
      stretch: '75% 125%',
      uniCodeRange:
        'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD',
      weight: '400-600',
    },
  ],
}

Fixes #2208

@anucreative anucreative requested a review from a team as a code owner August 22, 2023 14:44
@github-actions
Copy link

👀 Visit Preview

Copy link
Contributor

@theo-mesnil theo-mesnil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can add an example on documentation ? Theme page ?

@anucreative
Copy link
Contributor Author

anucreative commented Sep 11, 2023

Maybe we can add an example on documentation ? Theme page ?

Better @theo-mesnil ? b80ee6d

@theo-mesnil theo-mesnil added this pull request to the merge queue Sep 13, 2023
@theo-mesnil theo-mesnil removed this pull request from the merge queue due to the queue being cleared Sep 13, 2023
@theo-mesnil theo-mesnil merged commit c772c2a into master Sep 13, 2023
11 checks passed
@theo-mesnil theo-mesnil deleted the chore-allow-font-subsets branch September 13, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow unicodeRange for fonts (to reduce size of font files)
2 participants