code: def autoUseMyMetrics(ttGlyph, glyphName, hmtx):
          
          width = hmtx[glyphName][0]
          for component in ttGlyph.components:
              try:
                  baseName, transform = component.getComponentInfo()
              except AttributeError:
                  # component uses '{first,second}Pt' instead of 'x' and 'y'
                  continue
              try:
                  baseMetrics = hmtx[baseName]
              except KeyError:
                  continue  # ignore missing components
              else:
                  if (baseMetrics[0] == width and
                          transform[:-1] == (1, 0, 0, 1, 0)):
                      component.flags |= USE_MY_METRICS
                      break
docs: Set the "USE_MY_METRICS" flag on the first component having the
          same advance width as the composite glyph, no transform and no
          horizontal shift (but allow it to shift vertically).
          This forces the composite glyph to use the possibly hinted horizontal
          metrics of the sub-glyph, instead of those from the "hmtx" table.