Hi, nice theme thank you.
I trying to use settings of the theme for Google fonts but unfortunately I can do it only with content that has latin characters.
It doesn't work even with fonts that has support for cyrillic too.
Is there any restrictions?
One more thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | _appearance_settings_adaptivetheme_subtheme-fonts.png.png | 212.64 KB | Jeff Burnz |
Comments
Comment #1
Jeff Burnz commentedSome fonts have support for Cyrillic - I am going to keep this as a feature request and look at including settings for calling them, and other subsets as well - here is the relevant help page: http://code.google.com/intl/sv/apis/webfonts/docs/getting_started.html
Comment #2
mefisto75 commentedI tried several fonts that are supposed to have Cyrillic support - Lobster as example - no effect.
Comment #3
Jeff Burnz commented@mefisto75 - that's right, it won't work, there needs to be an additional parameter in the URL that pulls the google font, so it grabs the Cyrillic version - this is what needs to be added to the settings in the theme.
Comment #4
FanisTsiros commentedThis should be a nice feature...
For now, is there a way to "hack" the url in order to get the required font subset ? Is this a variable ?
How Google fonts list is generated ?
For example:
Selecting "Open Sans" font i get this:
<link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans" media="all" />i simply need this: Open Sans&subset=greek
<link type="text/css" rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans&subset=greek" media="all" />Comment #5
FanisTsiros commentedper #4 I found how google fonts styles are embeded.
This is in AT's core theme, not in AT Commerce theme.
I know this is a hack but i managed to get google font subsets for my language with a modification in
sites/all/themes/adaptivetheme/adaptivetheme/inc/google.web.fonts.inc
appending
&subset=greekin drupal_add_css function.though there is a notice in google.web.fonts.inc file:
Is this safe for temporary fix?
thanks !
Comment #6
Jeff Burnz commentedHe he, yeah, its safe to do this hack. I need to look at his more, in fact I will do this today - I have been studying the @font-your-face module today and seeing how they do things and looking if some integration could happen, it think it could but I don't have so much time for that, at least I should be able to get this working.
Comment #7
FanisTsiros commentedThanks Jeff !
Implementing this in AT (without @font-your-face module integration) should be easy enough, maybe just another simple text field asking the subset to get from Google...? though theme_at_commerce_settings variable is getting bigger... and also adding more confuse to the administrator...
I think the real problem here is: what happens when there is a multilingual site. More conditions to check, and what if there is no subset supported for all languages e.tc. I do not know if @font-your-face module can handle this situation.
In my case, this is a one language site so i am ok.
Comment #8
Jeff Burnz commentedNo, its not easy - not all fonts have additional sets, we would have to retrieve them and that's the bit that @font-your-face can already do, and provide previews and a mechanism for loading the fonts.
Comment #9
Jeff Burnz commentedThis is a list you can get using the API, as you can see its not friendly to use auto-magically for me, this is what font-your-face retrieves and builds everything from.
https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyBgeqKlFdYj3Y7V...
Notice many fonts have "subsets", those are what we would need to retrieve from this list and build our list from, I could do this, but its a mare and not something I want to replicate in the theme when font-your-face already does this.
Comment #10
Jeff Burnz commentedFonts are now handled by Adaptivetheme core entirely, AT Commerce will be updated to take advantage of the new fonts sub-system in the core theme. Its much more powerful than before and has several new features dripping with awesomesauce:
- enter your own font stack (hooray, big win, everybody cheer)
- @font-your-face module integration, yes, not shitting you, I have built perfect integration for font your face fonts to be used in Adaptivetheme sub-themes. All you do is enable some fonts inside @font-your-face, then in the @font-your-face settings for the font you set it to "-- add selector in theme CSS --", this will trigger Adaptivetheme to display the font in the Font Theme Settings.
If you are installing Adaptivetheme and using the sub-theme these features are turned off by default, you need to go to the "Site Tweaks" tab and enabled "Fonts".
This is the perfect way to solve the Greek/Cryillic font issue, now you can choose from thousands of fonts from any provider supported by @font-your-face module: http://drupal.org/project/fontyourface
I will update AT Commerce next week to use this system, I have been playing with it for a couple of days now and its very good. I have only tested with Google Fonts and Font Squirrel.
Adaptivetheme still has its own Google fonts and we should continue to maintain this feature, but it will always be basic and only supply the basic fonts, of which there are about 470 odd a the moment, however if you count all the variants such as greek and cryillic there are around 1300 fonts available from Google. Its just very hard to do sophisticated integration with GF in a theme, @font-your-face made this quite strait forward and is superb module to work with.
Currently this code is in GIT, you need to pull it from there or wait 24 hours for the DEV version to update.
Comment #11
Jeff Burnz commentedHere is a screenshot of all the font options in AT 7.x-3.x