Skip to content

Commit

Permalink
bugfix for #1186
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed May 20, 2017
1 parent 33598be commit 3acc2f0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions modules/postmessage/postmessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,22 @@
}
jQuery( 'head' ).append( '<script>if(!_.isUndefined(WebFont)){WebFont.load({google:{families:[\'' + subValueValue + ':' + kirkiGetFontWeight( newval.variant ) + '\']}});}</script>' );
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( '<script>if(!_.isUndefined(WebFont)){WebFont.load({google:{families:[\'' + subValueValue + ':' + kirkiGetFontWeight( newval.variant ) + '\']}});}</script>' );
cssArray[ i ] += args.element + '{font-weight:' + kirkiGetFontWeight( newval.variant ) + '}';
jQuery( 'head' ).append( '<script>if(!_.isUndefined(WebFont)){WebFont.load({google:{families:[\'' + newval['font-family'] + ':' + kirkiGetFontWeight( subValueValue ) + '\']}});}</script>' );
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 ) ) {
Expand Down

0 comments on commit 3acc2f0

Please sign in to comment.