google / material-design-lite

Material Design Components in HTML/CSS/JS
https://getmdl.io
Apache License 2.0
32.28k stars 5.03k forks source link

Looking at using Noto Sans for other languages #1435

Open gauntface opened 9 years ago

gauntface commented 9 years ago

I've just started looking at how other languages could be supported in MDL.

This is super early and I'm looking for early feedback and ideas. I've been following guidance on the material design spec: https://www.google.com/design/spec/style/typography.html#typography-styles to add in difference sizes and switch to using noto sans for languages where appropriate.

https://github.com/google/material-design-lite/compare/master...gauntface:internationalisation

All I've done is add in additional styles for each mixin which sets heights and preferred fonts for a particular language. At the moment out of the three categories defined in the spec, 2 of the categories have the same size and line height differences.

Major points of concern for me:

  1. This requires another web font. The request for noto sans could be joined with Roboto and then allow the browser to handle fetching the font only when it's needed (In this case, only when another language is present on the screen - assuming the browser is smart enough to know it's not needed).
  2. The current approach adds an extra class selector to each use of the typography mixins - is this ok? Only alternative I can think of at the moment is figuring out some way to produce a duplicate of the current _typography.scss but within a single language selector, this is fine, but will likely require some re-working of everything in typography at the moment.
  3. In an ideal world I'd have multiple demo files for different languages to test the html elements (Something I'm expecting to need to test RTL, but it looks like the current build process only supports a single demo.html file - is that the case? If so should I invest time in supporting multiple files, just grow the typography test.html or . . . . ?
Brahmasmi commented 7 years ago

Bumping this.

Any chance that MDL v2 might see support for non Latin scripts? Based on the commit that closed #4542, we seem to be supporting only Latin scripts at present.