Skip to content

Commit

Permalink
- added figtree and outfit fonts
Browse files Browse the repository at this point in the history
- tested for wp 6.7.1
  • Loading branch information
fatihbalsoy committed Dec 1, 2024
1 parent 1c6a28e commit f81642e
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/assets/fonts/figtree.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* figtree.css
* material-board
*
* Created by Fatih Balsoy on 11/30/24
* Copyright © 2024 Fatih Balsoy. All rights reserved.
*/

:root {
--font-type: 'Figtree' !important;
}
11 changes: 11 additions & 0 deletions src/assets/fonts/outfit.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* outfit.css
* material-board
*
* Created by Fatih Balsoy on 11/30/24
* Copyright © 2024 Fatih Balsoy. All rights reserved.
*/

:root {
--font-type: 'Outfit' !important;
}
10 changes: 8 additions & 2 deletions src/material-board.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function __construct()
$this->settings_slug = $fbwpmdp_bundle;
if (is_admin()) {
if (!function_exists('get_plugin_data')) {
require_once (ABSPATH . 'wp-admin/includes/plugin.php');
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
$plugin_data = get_plugin_data(__FILE__);
$fbwpmdp_version = $plugin_data["Version"];
Expand Down Expand Up @@ -216,6 +216,12 @@ function fbwpmdp_enqueue_dark_theme()
case 'dm-sans':
wp_enqueue_style('dm-sans-font', plugins_url('assets/fonts/dm-sans.css', __FILE__));
break;
case 'figtree':
wp_enqueue_style('figtree-font', plugins_url('assets/fonts/figtree.css', __FILE__));
break;
case 'outfit':
wp_enqueue_style('outfit-font', plugins_url('assets/fonts/outfit.css', __FILE__));
break;
case 'mona-sans':
wp_enqueue_style('mona-sans-font', plugins_url('assets/fonts/mona-sans.css', __FILE__));
break;
Expand Down Expand Up @@ -327,4 +333,4 @@ function fbwpmdp_is_gutenberg_editor()
}
}

$materialBoardPlugin = new MaterialBoardPlugin();
$materialBoardPlugin = new MaterialBoardPlugin();
2 changes: 2 additions & 0 deletions src/settings/options/font.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<td>
<select name="fbwpmdp_font" id="font-face" onchange="changeFontType()">
<option value="dm-sans" <?php selected($option, 'dm-sans') ?>>DM Sans</option>
<option value="figtree" <?php selected($option, 'figtree') ?>>Figtree</option>
<option value="outfit" <?php selected($option, 'outfit') ?>>Outfit</option>
<option value="roboto" <?php selected($option, 'roboto') ?>>Roboto</option>
<option value="mona-sans" <?php selected($option, 'mona-sans') ?>>Mona Sans</option>
<option value="hubot-sans" <?php selected($option, 'hubot-sans') ?>>Hubot Sans</option>
Expand Down
2 changes: 2 additions & 0 deletions src/styles/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Reference: [Sass Guidelines](https://sass-guidelin.es/) > [Architecture](https:/
|-|-|-|-|-|
| ![DM Sans](../../../docs/images/fonts/dm_sans.png "DM Sans") | ![DM Serif Display](../../../docs/images/fonts/dm_serif_display.png "DM Serif Display") | ![Roboto](../../../docs/images/fonts/roboto.png "Roboto") | ![Mona Sans](../../../docs/images/fonts/mona_sans.png "Mona Sans") | ![Hubot Sans](../../../docs/images/fonts/hubot_sans.png "Hubot Sans") |

> Not pictured: Figtree, Outfit
## Icons

| Material Icons | Community Material Icons |
Expand Down
6 changes: 6 additions & 0 deletions src/styles/base/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
// Image: docs/images/fonts/dm_sans.png
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');

// Eric Kennedy - SIL Open Font License 1.1
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

// Smartsheet Inc, Rodrigo Fuenzalida - SIL Open Font License 1.1
@import url('https://fonts.googleapis.com/css2?family=Outfit:[email protected]&display=swap');

// Post-compilation urls if called from src/styles/
@import url($mona-sans-path);
@import url($hubot-sans-path);
Expand Down

0 comments on commit f81642e

Please sign in to comment.