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

Cyrillic support? #18

Open
dvaansiseelr opened this issue Nov 14, 2022 · 1 comment
Open

Cyrillic support? #18

dvaansiseelr opened this issue Nov 14, 2022 · 1 comment

Comments

@dvaansiseelr
Copy link

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?

@aristath
Copy link

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.

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