- This topic has 7 replies, 2 voices, and was last updated 4 years, 3 months ago by Tom.
July 26, 2017 at 10:01 am #355318arabsworks
I try to add google arabic subset fonts in the child theme function.php nothing show in the typography google list with with following code:
The google subset fonts it’s from here:
So how I can display and use the arabic subset fonts list in the typography add-on.
With Thanks,GeneratePress 1.3.48July 26, 2017 at 10:11 am #355323TomLead DeveloperLead Developer
Adding that function to set the subset should be all that is required. Now if the font you choose has an Arabic subset, it will use it.July 26, 2017 at 10:32 am #355339arabsworks
How I can use a font from that subset if really nothing apply in the typography google list,what I meant is how to find the subset font from the typography menu if the font not there you can choose.
by the way the google subset fonts it’s from here:
NO fonts show in the typography add-on from google subset from the url above so how I can use a font subset if is still not in the menu. did i miss something!!!July 26, 2017 at 11:07 am #355358arabsworks
Ok to be fair and after we check ALL typography add-on google fonts we find only one font there from the subset which is the following
Now we need four more fonts from that subset :
So how we can pick and choose a google font which not (visible ) in typography add-on short list although the fonts available and exist in the google fonts repository.July 26, 2017 at 11:12 am #355366TomLead DeveloperLead Developer
This should help: https://docs.generatepress.com/article/customizing-the-google-font-list/
Let me know 🙂July 26, 2017 at 11:21 am #355373arabsworks
We did the following :
add_filter( ‘generate_typography_customize_list’,’tu_add_google_fonts’ );
function tu_add_google_fonts( $fonts )
$fonts[ ‘Cairo’ ] = array( ‘name’ => ‘Cairo’ );
$fonts[ ‘Lateef’ ] = array( ‘name’ => ‘Lateef’ );
$fonts[ ‘Changa’ ] = array( ‘name’ => ‘Changa’ );
$fonts[ ‘Scheherazade’ ] = array( ‘name’ => ‘Scheherazade’ );
Nothing (visible ) in typography add-on short list!!!July 26, 2017 at 11:33 am #355376arabsworks
Ok the code it works fine now thanks, but the four fonts go to the bottom of the typography add-on list so how we make the fonts go to the top and can we minimise and delete any google fonts from the list which not required so can speed the site.July 26, 2017 at 11:34 am #355377TomLead DeveloperLead Developer
There’s no way to re-organize them right now. Deleting more fonts from the list won’t speed up your website, but you can show as many in the list as you like: https://docs.generatepress.com/article/customizing-the-google-font-list/#showing-a-different-number-of-google-fonts
- You must be logged in to reply to this topic.