webfont-loader icon indicating copy to clipboard operation
webfont-loader copied to clipboard

Cyrillic support?

Open dvaansiseelr opened this issue 2 years ago • 1 comments

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?

dvaansiseelr avatar Nov 14 '22 11:11 dvaansiseelr

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.

aristath avatar Nov 16 '22 11:11 aristath