docs: function ttfobject2svg(ttf, options) {
  
      var OS2 = ttf['OS/2'];
  
      // 用来填充xml的数据
      var xmlObject = {
          id: ttf.name.uniqueSubFamily || SVG_FONT_ID,
          metadata: string.encodeHTML(options.metadata || ''),
          advanceWidth: ttf.hhea.advanceWidthMax,
          fontFamily: ttf.name.fontFamily,
          fontWeight: OS2.usWeightClass,
          unitsPerEm: ttf.head.unitsPerEm,
          panose: [
              OS2.bFamilyType, OS2.bSerifStyle, OS2.bWeight, OS2.bProportion, OS2.bContrast,
              OS2.bStrokeVariation, OS2.bArmStyle, OS2.bLetterform, OS2.bMidline, OS2.bXHeight
          ].join(' '),
          ascent: ttf.hhea.ascent,
          descent: ttf.hhea.descent,
          xHeight: OS2.bXHeight,
          bbox: [ttf.head.xMin, ttf.head.yMin, ttf.head.xMax, ttf.head.yMax].join(' '),
          underlineThickness: ttf.post.underlineThickness,
          underlinePosition: ttf.post.underlinePosition,
          unicodeRange: 'U+' + string.pad(OS2.usFirstCharIndex.toString(16), 4)
              + '-' + string.pad(OS2.usLastCharIndex.toString(16), 4)
      };
  
      // glyf 第一个为missing glyph
      xmlObject.missing = {};
      xmlObject.missing.advanceWidth = ttf.glyf[0].advanceWidth || 0;
      xmlObject.missing.d = ttf.glyf[0].contours && ttf.glyf[0].contours.length
          ? 'd="' + contours2svg(ttf.glyf[0].contours) + '"'
          : '';
  
      // glyf 信息
      var glyphList = '';
      for (var i = 1, l = ttf.glyf.length; i < l; i++) {
          var glyf = ttf.glyf[i];
  
          // 筛选简单字形，并且有轮廓，有编码
          if (!glyf.compound && glyf.contours && glyf.unicode && glyf.unicode.length) {
              var glyfObject = {
                  name: glyf.name,
                  unicode: unicode2xml(glyf.unicode),
                  d: contours2svg(glyf.contours)
              };
              glyphList += string.format(GLYPH_TPL, glyfObject);
          }
      }
      xmlObject.glyphList = glyphList;
  
      return string.format(XML_TPL, xmlObject);
  }