webfont-loader
webfont-loader copied to clipboard
Cyrillic support?
Hello. I have added a parameter of subset for cyrillic support in url, using Open Sans font. https://developers.google.com/fonts/docs/getting_started#specifying_script_subsets
For instance: wptt_get_webfont_url(esc_url( 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&subset=cyrillic&display=swap' ));
Unfortunately, it does not work. Cyrillic text is replaced with question marks.
How could I use cyrillic text?
If you check the contents of the CSS in https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&subset=cyrillic&display=swap, you'll see that it contains CSS & files for all subsets. The same thing happens when you remove the subset parameter from your URL, the files are identical. You don't need to define it, it should work out of the box and get all subsets.