Graph/ Figure font size of labels /autosize

Hi,
How can I set autosize of labels/ values when browser window will be zoom in or out?

fig = go.Figure() 
fig.update_layout(
    font=dict(size=2)
)

As in documentation font is int[1,inf] so I cannot use eg. 'size':'1vw' like in style