def center_glyph(glyph):
    whitespace = glyph.leftMargin + glyph.rightMargin
    glyph.leftMargin = whitespace / 2
    glyph.rightMargin = whitespace / 2
Center the ``glyph`` in its advance width, leaving ``leftMargin`` and ``rightMargin`` with equal values.
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/modules/glyphutils.py/center_glyph