learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
779 stars 647 forks source link

Kolibri should subset and bundle italic and italic-bold variants of Noto #8249

Open indirectlylit opened 3 years ago

indirectlylit commented 3 years ago

Observed behavior

As an optimization, the current font-handling code bundles normal and bold variants of Noto:

https://github.com/learningequality/kolibri/blob/release-v0.15.x/packages/kolibri-tools/lib/i18n/fonts.py

Within our design system, we only use normal and bold variants so this has worked fine for application text.

Expected behavior

The following variants should be bundled:

User-facing consequences

When user-generated resources from channels are displayed using default Kolibri fonts (e.g. in an HTML5 app with no extra styling or Perseus exercise), the browser will need to "fake" the missing variants, which gives sub-par rendering results.

Most users will not notice the difference and this issue applies to a small percentage of our content, so this is a very low-priority update. However it's a level of polish we should consider if rich text or Markdown-driven "article"-type resources ever become a thing because it will improve readability and beauty.

Steps to reproduce

View content that uses italic or bold italic and check which file is being used to render it.

Context

0.14

rtibbles commented 9 months ago

When implementing this, we should double check the implications for the final Kolibri WHL file size.

rtibbles commented 1 month ago

Note that there has been some precedent for this, by bundling semi-bold font variants. However, this will have a significant impact on whl size, probably adding around ~10MB to the final wheel size, which will probably make it too big.

I would suggest that this be made contingent on uploading a non-statically bundled whl file to PyPi.