Open indirectlylit opened 3 years ago
When implementing this, we should double check the implications for the final Kolibri WHL file size.
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.
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