Good day.
I try to use this module to make good typography for news titles. For latin charset module work just fine, but when it meet cyrillic - all magic gone :(.
This problem not in font: i try use Lobster (http://www.google.com/webfonts/family?family=Lobster&subset=cyrillic#spe...) and Cuprum (http://www.google.com/webfonts/family?family=Cuprum&subset=cyrillic) this fonts have cyrillic subset.
I try to use cyrillic fonts from Kernest with same result - @font-your-face load only latin subset.
If i add to template code from google:
<link href='http://fonts.googleapis.com/css?family=Lobster&subset=cyrillic,latin' rel='stylesheet' type='text/css'>
all cyrilic text selected in @font-your-face as "Lobster" begin work well.
I change subset for font in font BD, but without code from google it still not work :(
Comments
Comment #1
sreynen commentedThe Google API implementation doesn't identify a subset at all, and I'm guessing Google defaults to just latin. That's a bug we can fix.
For Kernest, I think the problem is their copy of Lobster was subset for latin only. That font is not listed on http://kernest.com/styles/cyrillic I think the only solution there is contacting Kernest and asking them to update their copy of Lobster.
Can you provide an example of some Cyrillic text I can use for testing a fix to the Google implementation?
Until this is fixed, you might want to try http://drupal.org/project/google_fonts, as it looks like it handles subsets better.
Comment #2
bondd commentedYou right - on Kernest only a few fonts with cyrillic subset available as "Native Webfont", and Lobster here only in latin. Pity.
Here some Cyrillic text for testing.
Comment #3
sreynen commentedI just committed fixes to dev for both D7 and D6. Note: dev releases are packaged nightly, so you'll need to either wait until tomorrow or use Git to get and test the new code. It may be a week or so before there's a new stable release.
Comment #5
lolmaus commentedI've got the same issue: no cyrillic subset in the <link> tag.
I had the Google Webfont Loader API enabled. Disabiling that side-module resolved the issue.
Sorry for reopening this, maybe i should have created a separate thread, but i don't know whether it's the fault of Font Your Face or Google Webfont Loader API.
Comment #6
btmash commented@lolmaus, which fonts were you using (so I can get a handle on replicating the behavior)
I just looked through the code for the google_fonts_api module in fontyourface and the patch I wrote was only passing over the family name - I'll take a look if google webfont loader needs to get fixed up to support non-latin subsets and then make the changeover in fontyourface as well so it can work with it.
Comment #7
btmash commentedLooking at https://developers.google.com/webfonts/docs/webfont_loader#GoogleModule, webfont loader needs to ensure it accepts google fonts as FontName:fontweights:subsets (so with fontyourface, it'll need to get passed in as FontName::subsets).
Will update as I find out more.
Comment #8
Drave Robber commentedThis patch implements #7 and some more - throw it back if I have put too much into it :)
It also:
- moves part of the code relevant only to
fontyourface_add_css_in_preprocess()intoelse { ... };- modifies variant data collection to reduce repetition (so that we don't end up with something like
FontName:regular,regular,regular:latin,latin-ext,cyrillicwhen several subsets of the same font are in use);- collects subset data both per family (for Google Webfont Loader API) and as
$all_subsets(forfontyourface_add_css_in_preprocess()); it seems a moot point which is better - double accounting or flattening arrays later.Comment #9
sreynen commentedCommitted.
Comment #11
petrosilov commentedI try to use the @font-your-face module with fontsquirrel submodule. The module works great at latin characters, but it misses characters in a national character set as BondD wrote in first comment.
Example: I wrote this word 'árvíztűrő' and i got this result: http://www.komka.hu/tukor.jpg
Comment #12
sreynen commentedpetrosilov, that looks like the font you're using is simply missing some characters. Most of the characters appear to be correct, so that doesn't look like the same issue with no-latin characters being entirely skipped. If you'd like us to look at the specific font, please indicate the font in a separate issue so we can keep this one closed.
Comment #13
petrosilov commentedOK, Thank you.