Is there a way to get the font size of text in the native view using appium?

Is there a way to get the font size of text in the native view using appium?

i know we have driver.findElement(By.id(“by-id”)).getCssValue(“font-size”);
for web views. is there a way for native views aswell?