code: function getSegments(glyfUnicodes, bound) {
  
              var prevGlyph = null;
              var result = [];
              var segment = {};
  
              glyfUnicodes.forEach(function (glyph) {
  
                  if (bound === undefined || glyph.unicode <= bound) {
                      // 初始化编码头部，这里unicode和graph id 都必须连续
                      if (prevGlyph === null
                          || glyph.unicode !== prevGlyph.unicode + 1
                          || glyph.id !== prevGlyph.id + 1
                      ) {
                          if (prevGlyph !== null) {
                              segment.end = prevGlyph.unicode;
                              result.push(segment);
                              segment = {
                                  start: glyph.unicode,
                                  startId: glyph.id,
                                  delta: encodeDelta(glyph.id - glyph.unicode)
                              };
                          }
                          else {
                              segment.start = glyph.unicode;
                              segment.startId = glyph.id;
                              segment.delta = encodeDelta(glyph.id - glyph.unicode);
                          }
                      }
  
                      prevGlyph = glyph;
                  }
              });
  
              // need to finish the last segment
              if (prevGlyph !== null) {
                  segment.end = prevGlyph.unicode;
                  result.push(segment);
              }
  
              // 返回编码范围
              return result;
          }
docs: 根据bound获取glyf segment
  
  @param {Array} glyfUnicodes glyf编码集合
  @param {number} bound 编码范围
  @return {Array} 码表