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

Elegant fallback for GDS transport #272

Closed
Loque- opened this issue May 18, 2018 · 13 comments
Closed

Elegant fallback for GDS transport #272

Loque- opened this issue May 18, 2018 · 13 comments

Comments

@Loque-
Copy link
Collaborator

Loque- commented May 18, 2018

Unfortunately the GDS transport is only licensed for use on a few set domains as detailed here: https://designnotes.blog.gov.uk/2015/03/11/can-i-use-the-gov-uk-fonts/

An open source, elegant, fallback font has been identified;
https://fonts.google.com/specimen/Libre+Franklin, other candidates are welcomed.
https://rsms.me/inter/ identified by established designers working on GDS.

This ticket is to discuss/propose any possible implementations that do not have a negative impact on performance or how the page renders on load.

Article for further reading on loading fonts: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization

@SimonMooreCIC
Copy link
Contributor

@Loque- Do we have confirmation of what domain this is actually going to be sitting on?

@Loque-
Copy link
Collaborator Author

Loque- commented Sep 3, 2018

I am not sure what the final TLD will be for the app we are working on, but it would be good to add a sensible fallback for everyone using govuk-react and it helps everyone especially during development.

@Loque-
Copy link
Collaborator Author

Loque- commented Sep 3, 2018

Oh, I should update this with the font that Chris Taylor pointed out. I'll update this message in a sec.

https://rsms.me/inter/

@SimonMooreCIC
Copy link
Contributor

Yeah that was going to be next point. It will be worth discussing this with Chris Taylor about a sensible font fallback, if this hasn't happened already.

@Loque-
Copy link
Collaborator Author

Loque- commented Sep 3, 2018

Yea he has a good one, I edited my post above with a link to it - this would be the one to fallback to.

@NickColley
Copy link

You could also consider using a system font stack which will be the fastest possible experience for users, and render the best font on their system.

Most machines have Helvetica or Arial also: http://fontfamily.io/Helvetica,Arial,sans-serif which could be considered.

@Loque-
Copy link
Collaborator Author

Loque- commented Sep 4, 2018

Thanks Nick! Yes we render Arial as the fallback currently - and I personally am a big fan of the system font stack, however for this use case I think it would be great to have a fallback that looked like Transport.

@owenm6
Copy link

owenm6 commented Nov 12, 2018

It is looking more and more likely that InterUI will be the font choice for any Home Office service that doesn't sit on GOV.UK.

@NickColley
Copy link

Another thing I forgot to mention:

We have an unreleased version of the font that has the baseline to match Helvetica, Arial (the fallbacks), so hopefully when we ship that, the difference will be hard to notice for most users.

With the amount of time fonts take to download, I would personally leap at the chance to use system fonts like the Australian government has done: https://designsystem.gov.au

This prioritises users needs over aesthetics in my opinion...

@penx
Copy link
Member

penx commented Nov 12, 2018

There are a few approaches I can think of:

  1. set the font stack to something like: Transport, InterUI, Helvetica, Arial, sans-serif and then leave it up to the parent application to import the fonts if they want to load them

  2. allow the parent application to specify/override font stack with theming

  3. both of the above

@penx
Copy link
Member

penx commented Nov 12, 2018

I also think that in internal tools where load speed is of very high importance we should be using system fonts unless custom fonts can be loaded progressively and non-blocking to critical rendering path. Of course this may mean a layout change when the fonts load so maybe best avoided altogether on such tools for both aesthetics and user needs.

@owenm6
Copy link

owenm6 commented Nov 13, 2018

We chose Inter UI for its legibility primarily. Most of the internal services are multi-use so wouldn't caching negate most load speed issues?

@penx
Copy link
Member

penx commented May 23, 2021

This will be handled in #851

@penx penx closed this as completed May 23, 2021
@penx penx removed this from the Backlog milestone Oct 8, 2021
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

5 participants