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

Support additional fonts for accessibility #3288

Closed
wants to merge 24 commits into from
Closed

Support additional fonts for accessibility #3288

wants to merge 24 commits into from

Conversation

nikclayton
Copy link
Contributor

@nikclayton nikclayton commented Feb 9, 2023

Provide alternative fonts for use throughout the entire app, based on feedback from users.

  • Atkinson Hyperlegible, from the Braille Institute, claims to improve readability for low-vision users.
  • Comic Neue "aspires to be the casual script choice for everyone including the typographically savvy."
  • Estedad claimes to more readable in Persian script
  • Lexend, devloped by an educational therapist, shows demonstrated improvements in reading efficiency
  • Luciole, "is a new typeface developed explicitly for visually impaired people"
  • OpenDyslexic claims to improve readability for people with dyslexia.

All fonts are available under a permissive license that allows bundling with the app. Include the license information so it shows up in LicenseActivity.

Add a preference to allow the user to switch between the fonts. The preference previews the font in the list so the user can see the difference.

Nik Clayton added 2 commits February 9, 2023 12:43
- Ensures that no licenses/libraries are missed
Provide two alternative fonts for use throughout the entire app.

- Atkinson Hyperlegible, from the Braille Institute, claims to improve
  readability for low-vision users.

- OpenDyslexic claims to improve readability for people with dyslexia.

Both fonts are available under a permissive license that allows bundling
with the app. Include the license information so it shows up in
LicenseActivity.

Add a preference to allow the user to switch between the fonts. The
preference previews the font in the list so the user can see the
difference.
@nikclayton
Copy link
Contributor Author

Note: Stacked on top of #3287

@nikclayton

This comment was marked as outdated.

@nikclayton

This comment was marked as outdated.

@nikclayton
Copy link
Contributor Author

Timeline with the two different fonts:

@nikclayton nikclayton changed the title Support Atkinson Hyperlegible and Opendyslexic fonts Support Atkinson Hyperlegible and OpenDyslexic fonts Feb 9, 2023
@nikclayton
Copy link
Contributor Author

The creator of OpenDyslexic is also on Mastodon, @abbie@better.boston.

@nikclayton
Copy link
Contributor Author

nikclayton commented Jul 19, 2023

Notes from feedback from users

From responses to https://mastodon.social/@Tusky/110741534444074976

OpenDyslexia

Atkinson Hyperlegible

Other specific font suggestions

Suggestions to download arbitrary fonts

  • Multiple people suggested supporting downloading arbitrary fonts.
  • There are support libraries that do this, which is worth investigating in a second phase.

Plan

From the discussion it looks like starting with:

Font In Google Fonts? License
Atkinson Hyperlegible y Open
Open Dyslexic n OFL 1.1
Estedad n OFL 1.1
Lexend y OFL 1.1
Comic Neue y OFL 1.1
Luciole n CC BY Attribution

makes sense. Full support for downloading arbitrary fonts can wait, as we would still need to distribute some fonts that are not on Google Fonts.

Nik Clayton added 13 commits August 2, 2023 09:50
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/BaseActivity.java
#	app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/components/preference/PreferencesActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/components/preference/PreferencesFragment.kt
#	app/src/main/res/values/string-arrays.xml
#	gradle/libs.versions.toml
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/LicenseActivity.kt
#	gradle/libs.versions.toml
@nikclayton nikclayton changed the title Support Atkinson Hyperlegible and OpenDyslexic fonts Support additional fonts for accessibility Aug 2, 2023
@nikclayton
Copy link
Contributor Author

New font preferences with the additional fonts:

@Lakoja
Copy link
Collaborator

Lakoja commented Aug 3, 2023

Haven't researched this, yet, but maybe you know: Why is this no system setting / feature?

(Packaging fonts with your app sounds a bit like 20 years ago.)

@nikclayton
Copy link
Contributor Author

Haven't researched this, yet, but maybe you know: Why is this no system setting / feature?

Some manufacturers do -- for example, you can change the font system-wide on some Samsung devices (https://www.howtogeek.com/726320/how-to-change-font-on-a-samsung-galaxy-phone/).

But that's manufacturer specific, and not something in the base OS.

(Packaging fonts with your app sounds a bit like 20 years ago.)

Yes. A future change could use the font download support in Android, but even with that, some of the fonts are not available through that route, so would need to be packaged as well.

@Lakoja
Copy link
Collaborator

Lakoja commented Aug 3, 2023

Provide alternative fonts for use throughout the entire app, based on feedback from users.

* Atkinson Hyperlegible, from the Braille Institute, claims to improve readability for low-vision users.

* Comic Neue "aspires to be the casual script choice for everyone including the typographically savvy."

* Estedad claimes to more readable in Persian script

* Lexend, devloped by an educational therapist, shows demonstrated improvements in reading efficiency

* Luciole, "is a new typeface developed explicitly for visually impaired people"

* OpenDyslexic claims to improve readability for people with dyslexia.

How about starting with the two most popular / requested and see how that is received and if more are requested?

(The list seems a bit long and then only contains "1 normal and 6 specials"; specials with mostly unknown advantages.)

@Lakoja
Copy link
Collaborator

Lakoja commented Aug 3, 2023

(Small side-note: For all these fonts the character rendering seems to be more sub-optimal than with the standard font?

For me - in the emulator - they all are rendered too low. In my screenshot the "Home" is not top-aligned with the avatar and the address is cut at the bottom.

Maybe a fixable bug?)

grafik

@nikclayton
Copy link
Contributor Author

How about starting with the two most popular / requested and see how that is received and if more are requested?

I started with two. Then I posted https://mastodon.social/@Tusky/110741534444074976 to get feedback, and reviewed the responses to determine which other ones to add.

This is all explained in #3288 (comment)

@nikclayton
Copy link
Contributor Author

(Small side-note: For all these fonts the character rendering seems to be more sub-optimal than with the standard font?

For me - in the emulator - they all are rendered too low. In my screenshot the "Home" is not top-aligned with the avatar and the address is cut at the bottom.

Baseline variation is to expected. I can reproduce the problem in your screenshot with Luciole, but not the others.

I suspect that

android:minHeight="?attr/actionBarSize"

in toolbar definition in activity_main.xml is the fix, I'll try that in a bit.

Nik Clayton added 2 commits August 3, 2023 22:44
@nikclayton
Copy link
Contributor Author

It was a tiny bit more involved than that. I also noticed that with Luciole different textviews can have different baselines depending on the text, so I've ensured that they layout and constrain to the baseline rather than the top or bottom of another view.

@mcclure
Copy link
Collaborator

mcclure commented Aug 4, 2023

Does this patch add twemoji or only the license for twemoji? We should keep in mind that twemoji appears to be an abandoned project, so it may not continue to receive new emoji in when unicode updates in future.

@nikclayton
Copy link
Contributor Author

Does this patch add twemoji or only the license for twemoji? We should keep in mind that twemoji appears to be an abandoned project, so it may not continue to receive new emoji in when unicode updates in future.

It's only the license.

That change is from #3287, which this PR is stacked on top of.

@nikclayton nikclayton closed this by deleting the head repository Aug 27, 2023
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

Successfully merging this pull request may close these issues.

3 participants