Update metrics

Hi there,

I wrote a script that sets the left and right metrics key to “A”.
But the metrics of the affected glyphs do not update. How can I update the actual metrics?

Doc = Glyphs.currentDocument Font = Doc.font

for glyph in Font.glyphs:
glyph.leftMetricsKey = "A"
glyph.rightMetricsKey = “A”

print “Done”


you have to select the glyphs in the font view and click Menu > Layer > Update Metrics

How can one update the Metrics via Code. I cannot find it in the documentation. I tried layer.updateMetrics() since I expected it to be close to updateGlyphInfo(), but I get no error and nothing happens.


Thanks Georg. I was afraid this one does sth else. Seems to work.