Cannot change the font size of texts in a vtkCubeAxesActor

Hello all,

How can I change the font size of texts in a vtkCubeAxesActor? Modifying TextProperty doesn’t work for me

vtkSmartPointer axesActor = vtkSmartPointer::New();
axesActor->SetXTitle(“X”);
axesActor->GetTitleTextProperty(0)->SetFontSize(30);
axesActor->GetLabelTextProperty(0)->SetFontSize(30);

my vtk version is 9.1.0

Any help is appreciated!