From: Adeel Kazmi Date: Wed, 15 Feb 2017 17:11:56 +0000 (+0000) Subject: Updated Font Selection guide to show how property maps can be used for the font style X-Git-Tag: dali_1.2.27~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F114936%2F4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Updated Font Selection guide to show how property maps can be used for the font style Change-Id: I2047eba1647cb21f2ff6c0e8bfa5534ad07e3cbd --- diff --git a/docs/content/shared-javascript-and-cpp-documentation/font-selection.md b/docs/content/shared-javascript-and-cpp-documentation/font-selection.md index d2bda2d..f7855fe 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/font-selection.md +++ b/docs/content/shared-javascript-and-cpp-documentation/font-selection.md @@ -54,7 +54,9 @@ Alternatively a font may be requested using either or all of FONT_FAMILY, FONT_S // C++ label.SetProperty( TextLabel::Property::FONT_FAMILY, "FreeSerif" ); -label.SetProperty( TextLabel::Property::FONT_STYLE, "{\"weight\":\"bold\",\"slant\":\"italic\"}" ); +label.SetProperty( TextLabel::Property::FONT_STYLE, + Property::Map().Add( "weight", "bold" ) + .Add( "slant", "italic" ) ); label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); ~~~ @@ -62,7 +64,10 @@ label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); // JavaScript label.fontFamily = "FreeSerif"; -label.fontStyle = "{\"weight\":\"bold\",\"slant\":\"italic\"}"; +label.fontStyle = { + "weight" : "bold", + "slant" : "italic" + }; label.pointSize = 12; ~~~ @@ -92,7 +97,11 @@ To change the font for standard text controls, this JSON syntax can be used: "textlabel": { "fontFamily":"FreeSerif", - "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}", + "fontStyle": + { + "weight":"bold", + "slant":"italic" + }, "pointSize":8 } } @@ -126,7 +135,11 @@ in the style sheet are applied after the base section ("textlabel"), so take pre "textlabel": { "fontFamily":"FreeSerif", - "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}", + "fontStyle": + { + "weight":"bold", + "slant":"italic" + }, }, "textlabelFontSize0": @@ -153,7 +166,11 @@ in the style sheet are applied after the base section ("textlabel"), so take pre "customLabel": { "fontFamily":"TimesNewRoman", - "fontStyle":"{\"weight\":\"regular\",\"slant\":\"regular\"}", + "fontStyle": + { + "weight":"regular", + "slant":"regular" + }, }, "customLabelFontSize0": {