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

Lots of woff files & @font-face not minified in output to inline styles #2380

Closed
Nyota opened this issue Mar 26, 2021 · 1 comment
Closed

Comments

@Nyota
Copy link

Nyota commented Mar 26, 2021

Issue description:

The CSS @font-face used to add fonts to inline-css is not minified, is there a way to do this? In my case it's loading a lot of font variants and taking up 2500 lines in the source code. I understand that all font variants are loaded, but I feel like this is too many files. Thanks in advance for any help.

Here is a screenshot of the /font directory for the Gothic A1 font in particular, take a look at the scrollbar, that is a lot of woff files.

Screenshot 2021-03-26 at 08 59 41

Version used:

(Did you try using the develop branch from GitHub? There's a chance your issue has already been addressed there)
3.1.6 (from WordPress plugin repository)

Using theme_mods or options?

options

Code to reproduce the issue (config + field(s))

This is what is being output to the <head> but many many lines (~2500).

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(.../wp-content/fonts/sora/xMQOuFFYT72X5wkB_18qmnndmSe1mU-DKQRDA8i1D49dNw.woff) format('woff');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(.../wp-content/fonts/sora/xMQOuFFYT72X5wkB_18qmnndmSe1mU-NKQRDA8i1D48.woff) format('woff');
  unicode-range: 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;
}/* [0] */
@font-face {
  font-family: 'Gothic A1';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(.../wp-content/fonts/gothic-a1/CSR94z5ZnPydRjlCCwl6b80oQNM8ru4reAXaTlFCBXrC-se62sS-fg.0.woff) format('woff');
  unicode-range: U+f9ca-fa0b, U+ff03-ff05, U+ff07, U+ff0a-ff0b, U+ff0d-ff19, U+ff1b, U+ff1d, U+ff20-ff5b, U+ff5d, U+ffe0-ffe3, U+ffe5-ffe6;
}
/* [2] */
@font-face {
  font-family: 'Gothic A1';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(.../wp-content/fonts/gothic-a1/CSR94z5ZnPydRjlCCwl6b80oQNM8ru4reAXaTlFCBXrC-se62sS-fg.2.woff) format('woff');
  unicode-range: U+d723-d728, U+d72a-d733, U+d735-d748, U+d74a-d74f, U+d752-d753, U+d755-d757, U+d75a-d75f, U+d762-d764, U+d766-d768, U+d76a-d76b, U+d76d-d76f, U+d771-d787, U+d789-d78b, U+d78d-d78f, U+d791-d797, U+d79a, U+d79c, U+d79e-d7a3, U+f900-f909, U+f90b-f92e;
}
/* [3] */
@font-face {
  font-family: 'Gothic A1';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(.../wp-content/fonts/gothic-a1/CSR94z5ZnPydRjlCCwl6b80oQNM8ru4reAXaTlFCBXrC-se62sS-fg.3.woff) format('woff');
  unicode-range: U+d679-d68b, U+d68e-d69e, U+d6a0, U+d6a2-d6a7, U+d6a9-d6c3, U+d6c6-d6c7, U+d6c9-d6cb, U+d6cd-d6d3, U+d6d5-d6d6, U+d6d8-d6e3, U+d6e5-d6e7, U+d6e9-d6fb, U+d6fd-d717, U+d719-d71f, U+d721-d722;
}
/* [4] */
@font-face {
  font-family: 'Gothic A1';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(.../wp-content/fonts/gothic-a1/CSR94z5ZnPydRjlCCwl6b80oQNM8ru4reAXaTlFCBXrC-se62sS-fg.4.woff) format('woff');
  unicode-range: U+d5bc-d5c7, U+d5ca-d5cb, U+d5cd-d5cf, U+d5d1-d5d7, U+d5d9-d5da, U+d5dc, U+d5de-d5e3, U+d5e6-d5e7, U+d5e9-d5eb, U+d5ed-d5f6, U+d5f8, U+d5fa-d5ff, U+d602-d603, U+d605-d607, U+d609-d60f, U+d612-d613, U+d616-d61b, U+d61d-d637, U+d63a-d63b, U+d63d-d63f, U+d641-d647, U+d64a-d64c, U+d64e-d653, U+d656-d657, U+d659-d65b, U+d65d-d666, U+d668, U+d66a-d678;
}

...
@mapsteps
Copy link
Contributor

Hello and thank you for reporting this issue.

We are closing most open GitHub issues with the release of Kirki 4 to start fresh with this major release.

If you are still running into issues after you have tested your theme with Kirki 4, please let us know so we can reopen the issue.

Please note that Kirki 3 is no longer actively supported. Moving forward, we will only provide support the very latest version of Kirki.

Thank you for your understanding.

Best,
David

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

No branches or pull requests

2 participants