Skip to content

Try bundling fonts #64

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

Closed
gnprice opened this issue Apr 14, 2023 · 1 comment · Fixed by #94
Closed

Try bundling fonts #64

gnprice opened this issue Apr 14, 2023 · 1 comment · Fixed by #94
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-design Visual and UX design

Comments

@gnprice
Copy link
Member

gnprice commented Apr 14, 2023

Zulip web uses the font Source Sans 3 for most text, and Source Code Pro for code blocks and code spans.

Currently, in zulip-flutter as well as in the zulip-mobile RN app, we use system fonts. This has advantages but also disadvantages:

It would be neat to try using the same fonts as on web. Here's Flutter upstream's cookbook recipe for using a custom font:
https://docs.flutter.dev/cookbook/design/fonts

@chrisbobbe
Copy link
Collaborator

Linking/quoting a relevant discussion on CZO: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20.23F64.20bundling.20fonts/near/1570370

Android has a feature called "Downloadable Fonts":

The Downloadable Fonts feature lets APIs request fonts from a provider application instead of bundling files into the app or letting the app download fonts. Downloadable Fonts is available on devices running Android API versions 14 and higher through the AndroidX Core library.

Downloadable Fonts offers the following benefits:

  • Reduces the app size, therefore increasing the app installation success rate.
  • Improves the overall system health, as multiple apps can share the same font through a provider. This saves users cellular data, phone memory, and disk space. In this model, the font is fetched over the network when needed.

It seems possible in theory to use this feature and get those advantages; see a sketch of how we might try: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20.23F64.20bundling.20fonts/near/1570476

But it doesn't currently seem worth the effort for us: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20.23F64.20bundling.20fonts/near/1570489

chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 17, 2023
We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 17, 2023
We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 18, 2023
We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 23, 2023
Assets and license downloaded from
  https://github.com./adobe-fonts/source-code-pro/tree/d3f1a5962

We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 23, 2023
Assets and license downloaded from
  https://github.com./adobe-fonts/source-code-pro/tree/d3f1a5962
, so it's version 2.042 for upright, and version 1.062 for italic.

We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 25, 2023
Assets and license downloaded from
  https://github.com./adobe-fonts/source-code-pro/tree/d3f1a5962
, so it's version 2.042 for upright, and version 1.062 for italic.

We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 26, 2023
Assets and license downloaded from
  https://github.com./adobe-fonts/source-code-pro/tree/d3f1a5962
, so it's version 2.042 for upright, and version 1.062 for italic.

We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
@gnprice gnprice added the a-content Parsing and rendering Zulip HTML content, notably message contents label May 27, 2023
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this issue May 31, 2023
Assets and license downloaded from
  https://github.com./adobe-fonts/source-code-pro/tree/d3f1a5962
, so it's version 2.042 for upright, and version 1.062 for italic.

We'll probably want to bundle more fonts into the app, like Source
Sans 3, which we use for most text in Zulip web.

But now at least we can see the process works! :)

Fixes: zulip#64
@gnprice gnprice added the a-design Visual and UX design label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-content Parsing and rendering Zulip HTML content, notably message contents a-design Visual and UX design
Projects
Status: Done
2 participants