From 5a604d9f3f8df055b4ce457044266cb1a6330e7a Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Wed, 14 Nov 2012 15:29:46 +0530 Subject: [PATCH] Updated webfonts test page with bold, italic, underline options Works with font variants Change-Id: Ic143498f1fa02f261e5740873a97929a8f6354b0 --- tests/webfonts.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/webfonts.html b/tests/webfonts.html index f444da34..b6bcd176 100644 --- a/tests/webfonts.html +++ b/tests/webfonts.html @@ -17,6 +17,18 @@ repository: $.webfonts.repository } ); + $( 'button#webfonts-preview-bold' ).click( function () { + document.execCommand( 'bold', false, null ); + } ); + + $( 'button#webfonts-preview-italic' ).click( function () { + document.execCommand( 'italic', false, null ); + } ); + + $( 'button#webfonts-preview-underline' ).click( function () { + document.execCommand( 'underline', false, null ); + } ); + // get an instance of WebFonts $webfonts = $( 'div#webfonts-preview-area' ).data( 'webfonts' ); // Get a list of all fonts provided by WebFonts @@ -83,6 +95,21 @@ select { float: left; display: block; } + +#webfonts-preview-bold { + font-weight: bold; +} + +#webfonts-preview-italic { + font-style: italic; + font-weight: bold; +} + +#webfonts-preview-underline { + text-decoration: underline; + font-weight: bold; +} + @@ -100,6 +127,9 @@ select {
Font :
+ + +