From 3acc2f07a304caddc7d7b1ec67d887622a94880f Mon Sep 17 00:00:00 2001 From: Aristeides Stathopoulos Date: Sat, 20 May 2017 15:02:08 +0300 Subject: [PATCH] bugfix for #1186 --- modules/postmessage/postmessage.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/postmessage/postmessage.js b/modules/postmessage/postmessage.js index a20c9b465..072f71a10 100644 --- a/modules/postmessage/postmessage.js +++ b/modules/postmessage/postmessage.js @@ -106,12 +106,22 @@ } jQuery( 'head' ).append( '' ); cssArray[ i ] += args.element + '{font-weight:' + kirkiGetFontWeight( newval.variant ) + '}'; + if ( -1 !== newval.variant.indexOf( 'italic' ) ) { + cssArray[ i ] += args.element + '{font-style:italic;}'; + } else { + cssArray[ i ] += args.element + '{font-style:normal;}'; + } } // Tweak for variants. if ( 'variant' === subValueKey && ! _.isUndefined( newval['font-family'] ) ) { - jQuery( 'head' ).append( '' ); - cssArray[ i ] += args.element + '{font-weight:' + kirkiGetFontWeight( newval.variant ) + '}'; + jQuery( 'head' ).append( '' ); + cssArray[ i ] += args.element + '{font-weight:' + kirkiGetFontWeight( subValueValue ) + '}'; + if ( -1 !== subValueValue.indexOf( 'italic' ) ) { + cssArray[ i ] += args.element + '{font-style:italic;}'; + } else { + cssArray[ i ] += args.element + '{font-style:normal;}'; + } } if ( ! _.isUndefined( args.choice ) ) {