Skip to content

Commit

Permalink
CFP-69 - Fix - Custom font variation getting place even after selecti…
Browse files Browse the repository at this point in the history
…ng the other weight and style (#123)

* chore:added font style inside font face

* chore:release points
  • Loading branch information
yssambare12 authored Sep 23, 2024
1 parent eef9794 commit b2c0d62
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 363 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** typography, fonts, custom fonts, Google Fonts, performance, privacy, full site editing, adobe fonts, GDPR
**Requires at least:** 5.0
**Tested up to:** 6.6
**Stable tag:** 2.1.6
**Stable tag:** 2.1.7
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -151,6 +151,9 @@ Yes, Custom Fonts is completely free to use, without any limitation.


## Changelog ##
### 2.1.7 ###
- Fix: Custom font variation getting place even after selecting the other weight and style. (Props - https://github.com/alexist-ong)

### 2.1.6 ###
- Improvement: Few string from admin dashboard app doesn't have text domain support. (Props - https://github.com/pedro-mendonca)

Expand Down
15 changes: 8 additions & 7 deletions admin/dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions custom-fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Brainstorm Force
* Author URI: http://www.brainstormforce.com
* Text Domain: custom-fonts
* Version: 2.1.6
* Version: 2.1.7
*
* @package Bsf_Custom_Fonts
*/
Expand All @@ -25,7 +25,7 @@
define( 'BSF_CUSTOM_FONTS_BASE', plugin_basename( BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_DIR', plugin_dir_path( BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_URI', plugins_url( '/', BSF_CUSTOM_FONTS_FILE ) );
define( 'BSF_CUSTOM_FONTS_VER', '2.1.6' );
define( 'BSF_CUSTOM_FONTS_VER', '2.1.7' );
define( 'BSF_CUSTOM_FONTS_POST_TYPE', 'bsf_custom_fonts' );
define( 'BSF_CUSTOM_FONTS_ADMIN_PAGE', 'bsf-custom-fonts' );

Expand Down
1 change: 1 addition & 0 deletions includes/helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ function bcf_prepare_lfont_face_css( $font_family, $font_data, $variation_data )
$src = array();
$font_face = '@font-face {' . PHP_EOL;
$font_face .= "\tfont-family: '" . $font_family . "';" . PHP_EOL;
$font_face .= ! empty( $variation_data['font_style'] ) ? "\tfont-style: " . $variation_data['font_style'] . ';' . PHP_EOL : '';
$font_face .= ! empty( $variation_data['font_weight'] ) ? "\tfont-weight: " . $variation_data['font_weight'] . ';' . PHP_EOL : '';
$font_face .= ! empty( $font_data['font_display'] ) ? "\tfont-display: " . $font_data['font_display'] . ';' . PHP_EOL : '';
$font_face .= ! empty( $font_data['font_fallback'] ) ? "\tfont-fallback: " . $font_data['font_fallback'] . ';' . PHP_EOL : '';
Expand Down
Loading

0 comments on commit b2c0d62

Please sign in to comment.