-
AuthorPosts
-
April 13, 2016 at 6:28 pm #613067
I’ve checked some solutions offered here and there over this forum but haven’t found any that doesn’t offer modifying theme files. If they are exist please guide me to them. I may be even missed a checkbox (or whatever) that resolves my problem.
The problem is none of currently offered by Enfold theme Google fonts support Cyrillic, at the same time here is the list of Google fonts that definitely Cyrillic able (order offered by Google, not alphabetical, sorry for that):
- Seymour One
- Ubuntu Mono
- Fira Sans
- Noto Sans
- Playfair Display
- Lora
- PT Sans
- Poiret One
- Andika
- Fira Mono
- PT Sans Narrow
- Tinos
- Philosopher
- Neucha
- Bad Script
- Istok Web
- Yeseva One
- Arimo
- Rubik
- Kelly Slab
- Noto Serif
- Ubuntu
- Ruslan Display
- PT Serif Caption
- PT Mono
- Marck Script
- Tenor Sans
- Oranienbaum
- PT Serif
- Lobster
- Kurale
- Russo One
- Underdog
- Cousine
- Ubuntu Condensed
- EB Garamond
- Stalinist One
- Ledger
- Rubik Mono One
- Prosto One
- Anonymous Pro
- Press Start 2P
- Forum
- Rubik One
- Marmelad
- Scada
- Playfair Display SC
- Didact Gothic
- Jura
- Roboto Mono
- Comfortaa
- PT Sans Caption
- Cuprum
- Play
- Exo 2
- Merriweather
- Roboto Slab
- Open Sans Condensed
- Roboto Condensed
- Roboto
- Open Sans
32 of them supports Extended Cyrillic.
Why not to divide Google fonts offered by Enfold theme by supported charsets and enable those charsets directly in Enfold theme settings?
Also there is no Roboto Condensed font listed at all, but it exists among Google fonts and I like this font. How can I add it (with Cyrillic support) to the list of Google fonts at General Styling > Fonts?
- This topic was modified 8 years, 7 months ago by Yigit.
April 14, 2016 at 6:40 am #613511Hi kacharava,
You can add additional Google fonts by following this: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
Best regards,
RikardApril 14, 2016 at 12:15 pm #613739For all computer-coding-programming related people for some unknown reason is absolutely clear that everyone on the whole Earth just dreams about adding pieces of code to customer ready products.
You know, guys, you are totally wrong! :)
April 14, 2016 at 12:20 pm #613743Hey!
We are trying to keep the theme as lightweight as possible. That is why we have tutorials prepared in documentation for additional features. If you need help implementing the code, please let us know. You can also request these fonts here – https://kriesi.at/support/enfold-feature-requests/
Regards,
YigitApril 14, 2016 at 12:24 pm #613751Is it correct method to add Cyrillic support to the newly added font?
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed&subset=cyrillic,cyrillic-ext,latin,latin-ext'; $fonts['Roboto Condensed'] = 'Roboto Condensed&subset=cyrillic,cyrillic-ext,latin,latin-ext'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed&subset=cyrillic,cyrillic-ext,latin,latin-ext'; $fonts['Roboto Condensed'] = 'Roboto Condensed&subset=cyrillic,cyrillic-ext,latin,latin-ext'; return $fonts; }
April 14, 2016 at 12:27 pm #613754Hey!
Yes, please try adding the code right below
if(isset($avia_config['use_child_theme_functions_only'])) return;
in Functions.php file in Appearance > Editor
Cheers!
YigitApril 14, 2016 at 12:38 pm #613778Doesn’t work. (
The following string now appears in all my pages:
<link rel='stylesheet' id='avia-google-webfont' href='//fonts.googleapis.com/css?family=Roboto+Condensed&subset=cyrillic,cyrillic-ext,latin,latin-ext' type='text/css' media='all'/>
while Google offers this css link for Roboto Condensed font according to my charsets selected:
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed&subset=latin,cyrillic-ext,latin-ext,cyrillic' rel='stylesheet' type='text/css'>
Basically both strings are the same, I can select Roboto Condensed from both dropdowns in General Styling > Fonts, but the site still appears typed with standard sans seriff font. What is wrong?April 14, 2016 at 12:44 pm #613790Hi!
Do you mind creating a temporary admin login and posting it here privately?
Cheers!
YigitApril 14, 2016 at 12:46 pm #613791I understand the reason, but no, I don’t mind and will never do.
Lets find another method of making things working.April 14, 2016 at 12:52 pm #613796Hey!
Please change your code to following one
function add_subset_func($fontlist) { $fontlist .= "&subset=latin,latin-ext,cyrillic,cyrillic-ext"; return $fontlist; } add_filter('avf_google_fontlist', 'add_subset_func'); add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed'; return $fonts; }
Cheers!
YigitApril 14, 2016 at 1:02 pm #613805No change. Still doesn’t work.
There is reference to Google’s css for Roboto Condensed in the pages code at line #20, but Sans Seriff still used for both headers and body.April 14, 2016 at 4:37 pm #614092Hey!
Please try using following code in Functions.php file (right below the line i mentioned above)
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed:400,700:latin,cyrillic'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed:400,700:latin,cyrillic'; return $fonts; }
Best regards,
YigitApril 14, 2016 at 4:51 pm #614108Same result.
Actually it is clear that I can attach the font to the Enfold theme with all methods offered.
The problem is it can not be used by css for some reason.April 14, 2016 at 4:53 pm #614112Hey!
Is it available now in Enfold theme options > General Styling > Fonts and Enfold theme options > Advanced Styling > Main menu links?
Does not it work when you enter custom CSS as following.your-custom-class h1 { font-family: 'Roboto Condensed'!important; }
(You can enable custom CSS field for ALB elements by referring to this post – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/)
Cheers!
YigitApril 14, 2016 at 4:54 pm #614113Hm… Everything is OK if
function add_subset_func($fontlist) { $fontlist .= "&subset=latin,latin-ext,cyrillic,cyrillic-ext"; return $fontlist; } add_filter('avf_google_fontlist', 'add_subset_func'); add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Roboto Condensed'] = 'Roboto Condensed'; return $fonts; }
is added to the child theme. But no result when applying changes to the main functions.php.
April 14, 2016 at 4:57 pm #614116I didn’t alter any CSS file at the moment.
Yes, the font is available at the very bottom of both font lists with every method offered here.
But it works only with the child theme.April 14, 2016 at 4:58 pm #614118Hey!
It is better to apply the changes in child theme as they would be overwritten when you update the theme if you kept the code in functions.php file of your parent theme.
You can go to Enfold theme options and import “parent theme options” after activating child themeRegards,
Yigit- This reply was modified 8 years, 7 months ago by Yigit.
April 20, 2016 at 5:53 pm #618543Thanks a lot.
No more questions regarding this matter. -
AuthorPosts
- The topic ‘No Cyrillic support for Google fonts by default in Enfold theme. Why?’ is closed to new replies.