-
Notifications
You must be signed in to change notification settings - Fork 649
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Subsets are not being loaded #399
Comments
I have exactly the same problem. Have you solved this problem? |
I worked around the problem by inserting an invisible (opacity = 0) text element somewhere on the page containing a character of each subset and dynamically setting its font face to each of the necessary fonts, one after another, thus making the browser actually load all the font subsets. It was done upon Web Font Loader's I'm not sure if doing it this way it's possible to detect precisely when all those subsets become actually available. So, there should be some kind of a pause between loading the subsets and trying to use them. |
I have exactly the same issue with Google Font subset (latin,greek): |
You can also use WebFontConfig.google.text parameter:
|
@maciejha it doesn't look like the @JanisE I'm interested in hearing more about your solution and how it works within the loader events. Thanks! |
Sorry, that project is done and forgotten long ago. :) My comments above is the most I can give you. :) BTW, I'm not sure how webfontloader works, but if the parameters match Google Font API, then maybe "subset" even is not a supported parameter anymore and has no effect. As a side-note, I recently had an unexpected use for the "text" property. I didn't use webfontloader, just manual So, I ended up including the font a second time by passing the infinity character. And it all seems to merge together in the browser well, and work.
|
@JanisE if one day you remember how you solved it, I'm here 🙂 |
I'm using the approach to load several subsets of a font (so, several font files):
It is not working. Only the
latin
subset file is loaded.latin-ext
is still loaded only once the browser encounters a need to use it for rendering.See a demo fiddle here: https://jsfiddle.net/janise/7c508q09/17/
Also, if I list each subset as a different array element, it does not work sometimes.
Exo
font seems to be all right, but there is a problem with, for example,Oswald
font.It has two files (one contains
latin
subset, the other one contains the rest supported subsets (latin-ext
,vietnamese
,cyrillic
)). Iflatin
,latin-ext
,vietnamese
are requested, both files get loaded all right. However, if one of the requested subsets iscyrillic
, only thelatin
file gets loaded.See the demo fiddles here:
https://jsfiddle.net/janise/7c508q09/44/ – the request includes
cyrillic
(and does not work correctly)https://jsfiddle.net/janise/7c508q09/45/ – the request does not include
cyrillic
(and works all right)The text was updated successfully, but these errors were encountered: