Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a fixed font for the accessibility labels #487

Open
aileene-willow opened this issue Sep 18, 2024 · 6 comments
Open

Set a fixed font for the accessibility labels #487

aileene-willow opened this issue Sep 18, 2024 · 6 comments

Comments

@aileene-willow
Copy link

aileene-willow commented Sep 18, 2024

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

@aileene-willow aileene-willow changed the title Set a fixed font face for the accessibility labels Set a fixed font for the accessibility labels Sep 18, 2024
@takahirom
Copy link
Owner

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.

val graphics = createGraphics()
graphics.font = Font("Courier New", Font.BOLD, 12)

@aileene-willow
Copy link
Author

Yes, it is a linux image :)

Using a font installed in both systems would definitely work!

@sergio-sastre
Copy link
Contributor

@takahirom
Any plans on how we want to tackle this?
I can gladly help as well 😊

@takahirom
Copy link
Owner

@sergio-sastre
Thank you for raising your hand!
We may need to determine which font works best for the label.

While Java provides some fonts, they are actually mapped to specific fonts by the JDK implementation. However, we prefer not to bundle a font. Could we perhaps use Android fonts or something similar in Robolectric? 💭
https://docs.oracle.com/javase/8/docs/api/java/awt/Font.html?utm_source=chatgpt.com

Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries. Instead, the logical font names are mapped to physical fonts by the Java runtime environment. The mapping is implementation and usually locale dependent, so the look and the metrics provided by them vary. Typically, each logical font name maps to several physical fonts in order to cover a large range of characters

@takahirom
Copy link
Owner

But if it works and we don't have to bundle font files, I don't have any particular opinion.

@sergio-sastre
Copy link
Contributor

I'll take a look at it in a couple of weeks, I'm afraid it is not gonna be possible before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants