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

Extend font embedding to a subset of recommended fonts? #70

Open
JayPanoz opened this issue Nov 28, 2019 · 7 comments
Open

Extend font embedding to a subset of recommended fonts? #70

JayPanoz opened this issue Nov 28, 2019 · 7 comments

Comments

@JayPanoz
Copy link
Collaborator

I think it might be worth extending font embedding to a subset of fonts from various families that we could vouch for.

Originally posted by @HadrienGardeur in #58 (comment)

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Nov 28, 2019

Hmmm as far as I can remember, there’s been 2 major factors “preventing” us from embedding fonts until now:

  1. font updates – some fonts are regularly updated so recommending them and pointing to their repo was the easy way out;
  2. technical constraints on some platforms – I can recall a discussion @ EDRLab during which we discussed that in the i18n context, some fonts supporting Japanese being 10 MB for instance, and some size limit popped up, which is why we turned to downloadable fonts, see Consider using Android downloadable fonts APIs kotlin-toolkit#224.

So I’m definitely not against a subset of fonts we could vouch for but the 2 constraints are tricky to say the least – kerning, hinting, support, etc. can be improved dramatically on updates so we probably want to avoid updating the repo every time a font is updated.

Originally posted in 58 (comment)

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Dec 4, 2019

As a not-ideal but good-enough solution, something like the postcss font grabber plugin should help keeping fonts relatively up to date – at least generating new builds would upload the latest version.

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Dec 4, 2019

Note I'm not sure it can download fonts from GitHub yet.

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented Dec 4, 2019

And that would strip Open Type Features we have in the HTML5 patch, cf. google/fonts#1582

https://github.com/readium/readium-css/blob/master/css/src/modules/ReadiumCSS-html5patch.css#L56-L87

@jccr
Copy link

jccr commented Dec 11, 2019

Hmmm as far as I can remember, there’s been 2 major factors “preventing” us from embedding fonts until now:

  1. font updates – some fonts are regularly updated so recommending them and pointing to their repo was the easy way out;

If nothing else is satisfactory.. would having a build-time script that fetches the latest versions from a CDN or something work?

  1. technical constraints on some platforms – I can recall a discussion @ EDRLab during which we discussed that in the i18n context, some fonts supporting Japanese being 10 MB for instance, and some size limit popped up, which is why we turned to downloadable fonts, see readium/kotlin-toolkit#224.

We could keep this concept for the embedded fonts, as an optional module to ReadiumCSS.

So I’m definitely not against a subset of fonts we could vouch for but the 2 constraints are tricky to say the least – kerning, hinting, support, etc. can be improved dramatically on updates so we probably want to avoid updating the repo every time a font is updated.

Originally posted in 58 (comment)

Re: Open Type Features
This level of detail is what I believe sets us apart, so I would be disappointed if we made a big compromise.

@JayPanoz
Copy link
Collaborator Author

This level of detail is what I believe sets us apart, so I would be disappointed if we made a big compromise.

Indeed, and it would penalise authors who use those features as well.

All I found re. PostCSS are the aforementioned font-grabber and font-magician. But those aren’t really accommodating the use-case – actually, the use case is a middle ground between those 2 plugins.

And I’m not eagerly fantasising writing and maintaining a PostCSS module for that so I guess

would having a build-time script that fetches the latest versions from a CDN or something

may well be the best option.

@JayPanoz
Copy link
Collaborator Author

JayPanoz commented May 6, 2020

Note to self: add Literata and Open Dyslexic.

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

No branches or pull requests

2 participants