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

[Feature Request] Add support for the Google font provider #1097

Open
ligol opened this issue Jul 20, 2020 · 8 comments · Fixed by #1478
Open

[Feature Request] Add support for the Google font provider #1097

ligol opened this issue Jul 20, 2020 · 8 comments · Fixed by #1478

Comments

@ligol
Copy link

ligol commented Jul 20, 2020

Google provide a Google font provider in Google play services 11+ in order for application to download font and share them between application. (https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts#the-basics)

The application on which I'm working on use that feature and one of my user who use MicroG instead of GooglePlayService receive a crash during font loading due to the font not available.

Would you be able to support that feature?

@twstagg
Copy link

twstagg commented May 1, 2021

Is there any further consideration/update on this issue? I am interested into putting time/work into this issue if someone would kindly point me to some resources. I have opened downstream issue https://gitlab.com/CalyxOS/calyxos/-/issues/415 and am interested and potentially developing/finding a fix

@twstagg
Copy link

twstagg commented May 8, 2021

@ligol Could you provide logcat/reproduce issue for me just so that we could compare?

@grote
Copy link
Contributor

grote commented May 21, 2021

@ligol I tried the downloadable fonts sample with MicroG: https:/android/user-interface-samples/tree/main/DownloadableFontsKotlin

And it doesn't crash, but fails to download the font. Maybe your app isn't handling the error case properly?

@grote
Copy link
Contributor

grote commented May 21, 2021

I made the sample app work with https:/grote/GmsCore/tree/1097-fonts-provider (still need to clean it up before making an PR).

@twstagg
Copy link

twstagg commented May 22, 2021

Tomorrow, I will compile and install this on my Pixel 5 (Calyx OS) and see how it works with my issue

@twstagg
Copy link

twstagg commented Jun 3, 2021

@grote Sorry for my lateness. I tested your code on CalyxOS AVD & had great results. Fonts sample (https:/android/user-interface-samples/tree/main/DownloadableFontsKotlin) did not work at all without this FontsProvider, and I was able to reproduce Google Fi issue without FontsProvider.

With FontsProvider on top of CalyxOS MicroG, this resolved my issues with DownloadableFontsKotlin as well as with Google Fi crashing due to font resource not found. I can't WAIT until this is merged!

Great work! 👯 👍

@grote
Copy link
Contributor

grote commented Jun 3, 2021

Thanks for testing! Great that you could verify the fix.

@mar-v-in
Copy link
Member

mar-v-in commented Jun 6, 2021

I'm reopening this, cause the feature is not fully implemented - it doesn't actually provide fonts and various font weights, but just fallbacks to Roboto Regular. Probably can be improved, but works for not having apps crash, thanks to @grote :)

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 a pull request may close this issue.

4 participants