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

sreynen’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Category: support » bug

The 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.

bondd’s picture

You 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.

Не смотря на то, что обычных синглплеерных и мультиплеерных игр в разы больше чем ММО, конкуренция среди последних намного больше. Ведь поделить время между двумя/тремя проектами продолжительностью по 25-50 часов намного проще, чем совмещать несколько виртуальных жизней. Именно поэтому, MMO игры вышедшие на рынок недостаточно готовыми, чаще всего "тонут" даже не смотря на то, что их в короткие сроки доводят до нормального состояния.
sreynen’s picture

Status: Active » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

lolmaus’s picture

Component: Code » Code (general)
Status: Closed (fixed) » Active

I'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.

btmash’s picture

@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.

btmash’s picture

Looking 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.

Drave Robber’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new3.1 KB

This 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() into else { ... };
- modifies variant data collection to reduce repetition (so that we don't end up with something like FontName:regular,regular,regular:latin,latin-ext,cyrillic when several subsets of the same font are in use);
- collects subset data both per family (for Google Webfont Loader API) and as $all_subsets (for fontyourface_add_css_in_preprocess()); it seems a moot point which is better - double accounting or flattening arrays later.

sreynen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

petrosilov’s picture

I 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

sreynen’s picture

petrosilov, 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.

petrosilov’s picture

OK, Thank you.