code: function getUnitsPerEm(xMin, xMax, yMin, yMax) {
              var seed = Math.ceil(Math.min(yMax - yMin, xMax - xMin));
  
              if (!seed) {
                  return 1024;
              }
  
              if (seed <= 128) {
                  return seed;
              }
  
              // 获取合适的unitsPerEm
              var unitsPerEm = 128;
              while (unitsPerEm < 16384) {
  
                  if (seed <= 1.2 * unitsPerEm) {
                      return unitsPerEm;
                  }
  
                  unitsPerEm = unitsPerEm << 1;
              }
  
              return 1024;
          }
docs: 根据边界获取unitsPerEm
  
  @param {number} xMin x最小值
  @param {number} xMax x最大值
  @param {number} yMin y最小值
  @param {number} yMax y最大值
  @return {number}