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

Android: custom fonts #844

Closed
samuelclay opened this issue Dec 7, 2015 · 18 comments
Closed

Android: custom fonts #844

samuelclay opened this issue Dec 7, 2015 · 18 comments

Comments

@samuelclay
Copy link
Owner

Same as on the iOS app. Fonts are in the repo under clients/ios/Resources/fonts.

@manderson23
Copy link
Contributor

Where would custom fonts be used in the app? Only for the text when reading stories?

@dosiecki
Copy link
Contributor

Once we have the font in a spot we can access, it coud optionally be used all over the place - story bodies, list text, even menu text. Each is just another sub-task. First we have to build a system that will let users get the fonts if they like (since most good international fonts are huge and would increase the size of the app by almost an order of magnitude).

@manderson23
Copy link
Contributor

On the web (and I assume iOS) the user can pick from a defined set of fonts. On Android we want the user to be able to load and choose any font they wish?

@dosiecki
Copy link
Contributor

we want the user to be able to load and choose any font they wish?

No, that sounds like a security and support nightmare. We just need to figure out a system by which our selected fonts are fetched by the app if the user wishes to use them.

@manderson23
Copy link
Contributor

So the set of font files will be hosted somewhere and when a user selects that font for the first time it is downloaded into the apps cache area?

And from that point on we can then go ahead and use it (handling that we might need to download again if the cache was wiped but the font is still selected).

@dosiecki
Copy link
Contributor

Sounds about like how I had envisioned. Once you have the ttf/otf file, using it in TextViews is rather straightforward. Using it in the WebView requires some trickery with CSS we'll have to explore, though.

@samuelclay
Copy link
Owner Author

I have a license for all of the fonts used on iOS. Do you have access to them? Try embedding those: whitney, chronicle, gotham narrow, etc.

@dosiecki
Copy link
Contributor

All I have seen are the ones in\clients\ios\Resources\fonts, which look too small to be global fonts, unless I am missing something somewhere?

The number one requested font we've had in Android feedback is NoTo, which I certainly support, but it is about 4x the size of our whole app.

@samuelclay
Copy link
Owner Author

Yeah, those are it. Why won't they work on Android?

@dosiecki
Copy link
Contributor

Almost any font certainly should work, they just seemed too small in size to be global like most default mobile platform fonts. I figured that we would want fonts that maintain the good i18n compatibility we have worked to provide.

@manderson23 manderson23 self-assigned this Feb 19, 2017
@manderson23
Copy link
Contributor

Any conclusion on which fonts we will support?

@samuelclay
Copy link
Owner Author

I wouldn't worry about i18n compatibility with those fonts. If a user is using non-latin characters, they can use other fonts. Let's use the ones we have available: whitney, chronicle, gotham, and sentinel, as well as the 2 or 3 android specific fonts (noto).

@manderson23
Copy link
Contributor

A couple of questions:

  1. Would you want all font changes in a single update? Or would you be happy with an initial PR to change the font on story views only then build from there?
  2. Is there a use case for a user selecting a different font for the story view vs the rest of the app?

@samuelclay
Copy link
Owner Author

We don't have font options for feed and story titles, only font sizes which are already supported across the 3 platforms. So there should only be one font change: to the story detail.

@manderson23
Copy link
Contributor

Noto Sans UI from here is about 900k.

Is that the correct font as it doesn't seem as large as mentioned above.

@dosiecki
Copy link
Contributor

Ah, looks like they finally released a version with the 2+MB of emoji stripped out! That takes the unzipped size of the core font down to 299kB. Seeing as our current APK size is roughly 700kB, I think that swings me in the direction of including it in the install rather than as a fetch-on-demand option.

@manderson23
Copy link
Contributor

OK. For an initial PR I'll include Noto and the iOS fonts.

@dosiecki
Copy link
Contributor

dosiecki commented Jul 4, 2017

deployed to Prod.

@dosiecki dosiecki closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants