How to refresh fontview after changing glyphOrder

I added some glyph names to the custom parameter “glyphOrder” by script and want the font view to refresh …

How do you change the parameter. It should update automatically.

Font.customParameters[0].value = ["a", "b"]

The script consists of two lines.
In font view I choose one or more glyphs and hit CMD+Alt+R

for i in Font.selection:
    Font.customParameters['glyphOrder'].append( )

That works as well as your suggestion, for the parameter.
But the font view doesn’t change.
I need to click or scroll which I tried to avoid …

What is wrong?

This works:

for parameter in Font.customParameters:
	if == 'glyphOrder':
		for i in Font.selection:
			newValue = parameter.value
			parameter.value = newValue


Don’t set the value in each loop. First build a new list and set the value after the loop.