Browse Source

Add Google Fonts.

Jeffrey Pearce 6 years ago
parent
commit
6cc2cc76dc
2 changed files with 22 additions and 12 deletions
  1. 19 9
      stratford/functions.php
  2. 3 3
      stratford/sass/_config-child-theme-deep.scss

+ 19 - 9
stratford/functions.php

@@ -121,26 +121,36 @@ function stratford_fonts_url() {
 	$fonts_url = '';
 	$fonts_url = '';
 
 
 	/* Translators: If there are characters in your language that are not
 	/* Translators: If there are characters in your language that are not
-	* supported by Playfair Display, translate this to 'off'. Do not translate
+	* supported by Poppins, translate this to 'off'. Do not translate
 	* into your own language.
 	* into your own language.
 	*/
 	*/
-	$playfair = esc_html_x( 'on', 'Playfair Display font: on or off', 'stratford' );
+	$poppins = esc_html_x( 'on', 'Poppins font: on or off', 'stratford' );
 
 
 	/* Translators: If there are characters in your language that are not
 	/* Translators: If there are characters in your language that are not
-	* supported by Roboto Sans, translate this to 'off'. Do not translate
+	* supported by Lato, translate this to 'off'. Do not translate
 	* into your own language.
 	* into your own language.
 	*/
 	*/
-	$roboto = esc_html_x( 'on', 'Roboto Sans font: on or off', 'stratford' );
+	$lato = esc_html_x( 'on', 'Lato font: on or off', 'stratford' );
+
+	/* Translators: If there are characters in your language that are not
+	* supported by Inconsolata, translate this to 'off'. Do not translate
+	* into your own language.
+	*/
+	$inconsolata = esc_html_x( 'on', 'Inconsolata font: on or off', 'stratford' );
 
 
 	if ( 'off' !== $playfair || 'off' !== $roboto ) {
 	if ( 'off' !== $playfair || 'off' !== $roboto ) {
 		$font_families = array();
 		$font_families = array();
 
 
-		if ( 'off' !== $playfair ) {
-			$font_families[] = 'Playfair+Display:400,400i';
+		if ( 'off' !== $poppins ) {
+			$font_families[] = 'Poppins:400,700';
 		}
 		}
 
 
-		if ( 'off' !== $roboto ) {
-			$font_families[] = 'Roboto:300,300i,700';
+		if ( 'off' !== $lato ) {
+			$font_families[] = 'Lato:400,700,400italic,700italic';
+		}
+	
+		if ( 'off' !== $inconsolata ) {
+			$font_families[] = 'Inconsolata:400,700';
 		}
 		}
 
 
 		$query_args = array(
 		$query_args = array(
@@ -160,7 +170,7 @@ function stratford_fonts_url() {
 function stratford_scripts() {
 function stratford_scripts() {
 
 
 	// enqueue Google fonts, if necessary
 	// enqueue Google fonts, if necessary
-	// wp_enqueue_style( 'stratford-fonts', stratford_fonts_url(), array(), null );
+	wp_enqueue_style( 'stratford-fonts', stratford_fonts_url(), array(), null );
 
 
 	// dequeue parent styles
 	// dequeue parent styles
 	wp_dequeue_style( 'varia-style' );
 	wp_dequeue_style( 'varia-style' );

+ 3 - 3
stratford/sass/_config-child-theme-deep.scss

@@ -20,9 +20,9 @@ $config-global: (
 	"font": (
 	"font": (
 		/* Font Family */
 		/* Font Family */
 		"family": (
 		"family": (
-			"primary": "sans-serif",
-			"secondary": "serif",
-			"code": "monospace, monospace",
+			"primary": "\"Poppins\"\, sans-serif",
+			"secondary": "\"Lato\"\, sans-serif",
+			"code": "\"Inconsolata\"\, monospace",
 			"ui": "-apple-system\, BlinkMacSystemFont\, \"Segoe UI\"\, \"Roboto\"\, \"Oxygen\"\, \"Ubuntu\"\, \"Cantarell\"\, \"Fira Sans\"\, \"Droid Sans\"\, \"Helvetica Neue\"\, sans-serif",
 			"ui": "-apple-system\, BlinkMacSystemFont\, \"Segoe UI\"\, \"Roboto\"\, \"Oxygen\"\, \"Ubuntu\"\, \"Cantarell\"\, \"Fira Sans\"\, \"Droid Sans\"\, \"Helvetica Neue\"\, sans-serif",
 		),
 		),
 		/* Font Size */
 		/* Font Size */