code: protected void readHorizontalMetrics(FontFileReader in)
              throws IOException {
          seekTab(in, "hmtx", 0);
  
          int mtxSize = Math.max(numberOfGlyphs, nhmtx);
          mtxTab = new TTFMtxEntry[mtxSize];
  
          if (TRACE_ENABLED) {
              log.debug("*** Widths array: \n");
          }
          for (int i = 0; i < mtxSize; i++) {
              mtxTab[i] = new TTFMtxEntry();
          }
          for (int i = 0; i < nhmtx; i++) {
              mtxTab[i].setWx(in.readTTFUShort());
              mtxTab[i].setLsb(in.readTTFUShort());
  
              if (TRACE_ENABLED) {
                  if (log.isDebugEnabled()) {
                      log.debug("   width[" + i + "] = "
                          + (mtxTab[i].getWx()) + ";");
                  }
              }
          }
  
          if (nhmtx < mtxSize) {
              // Fill in the missing widths
              int lastWidth = mtxTab[nhmtx - 1].getWx();
              for (int i = nhmtx; i < mtxSize; i++) {
                  mtxTab[i].setWx(lastWidth);
                  mtxTab[i].setLsb(in.readTTFUShort());
              }
          }
      }
docs: Read "hmtx" table and put the horizontal metrics
  in the mtxTab array. If the number of metrics is less
  than the number of glyphs (eg fixed size fonts), extend
  the mtxTab array and fill in the missing widths
  @param in FontFileReader to read the hmtx table from
  @throws IOException in case of an I/O problem