takahirom / roborazzi

Make JVM Android integration test visible 🤖📸
https://takahirom.github.io/roborazzi/
Apache License 2.0
709 stars 34 forks source link

Set a fixed font for the accessibility labels #487

Open aileene-willow opened 1 month ago

aileene-willow commented 1 month ago

Currently, the accessibility labels are generated using system fonts.

Since our local environment is on a mac and the CI pipeline runs on a linux container, the accessibility labels have different fonts.

Suggestions: Maybe make the font custimizable

IMG_3804

takahirom commented 1 month ago

Thank you for your feedback. We are specifying the font, but it might not be installed on some operating systems. Is the new image a Linux image? We might need to look for a font that is installed on both operating systems.

https://github.com/takahirom/roborazzi/blob/0b0143ea4d4f1c3c2ab307db27e57d0a505f040a/roborazzi-painter/src/commonJvmMain/kotlin/com/github/takahirom/roborazzi/AwtRoboCanvas.kt#L592-L593

https://github.com/takahirom/roborazzi/blob/0b0143ea4d4f1c3c2ab307db27e57d0a505f040a/roborazzi-painter/src/commonJvmMain/kotlin/com/github/takahirom/roborazzi/AwtRoboCanvas.kt#L182

aileene-willow commented 1 month ago

Yes, it is a linux image :)

Using a font installed in both systems would definitely work!