function to set font weight
Status: Alpha
Brought to you by:
francium
font color and font style have functions, but nothing for font weight (normal or bold).
(in wt_vector.js, wtText)
/**
Sets the font weight of the text
@param {String} _weight The font style ( normal, bold )
*/
wtText.prototype.setFontWeight = function(_weight)
{
_weight = _weight.toLowerCase();
if (!(_weight == "normal" || _weight == "bold"))
throw "wtText::setFontWeight(): the font weight should be 'normal' or 'bold'";
var domNode = $_(this);
if (isMSIE())
{
this.get("divNode").get("style").fontWeight = _weight;
}
else
{
domNode.setAttribute("font-weight",_weight);
}
}