function encodeHTML(source) {
    return source == null
        ? ''
        : (source + '').replace(replaceReg, function (str, c) {
            return replaceMap[c];
        });
}
@public
@param {Object} opt
@param {string} opt.text
@param {string} opt.font
@param {string} [opt.textAlign='left']
@param {string} [opt.textVerticalAlign='top']
@param {Array.<number>} [opt.textPadding]
@param {number} [opt.textLineHeight]
@param {Object} [opt.rich]
@param {Object} [opt.truncate]
@return {Object} {x, y, width, height, lineHeight}