code: def _zoom_labels(self, zoom):
          
  
          labelfont = self.grid.GetLabelFont()
          default_fontsize = get_default_font().GetPointSize()
          labelfont.SetPointSize(max(1, int(round(default_fontsize * zoom))))
          self.grid.SetLabelFont(labelfont)
docs: Adjust grid label font to zoom factor