【Android 11】システムフォント に バリアブルフォント が追加された
一つのフォントで複数のウェイト(文字の太さ)を表現できる バリアブルフォント。
Android 11 のシステムフォント(fonts.xml)を調べていたら、バリアブルフォント を見つけた。
Android 10 にも存在したが、Android 11 からさらに バリアブルフォント が追加されたことになる。
- Android 10
https://cs.android.com/android/platform/superproject/+/android-10.0.0_r30:frameworks/base/data/fonts/fonts.xml;l=151
<family lang="und-Geor,und-Geok"> <font weight="400" style="normal">NotoSansGeorgian-Regular.otf</font> <font weight="500" style="normal">NotoSansGeorgian-Medium.otf</font> <font weight="700" style="normal">NotoSansGeorgian-Bold.otf</font> <font weight="400" style="normal" fallbackFor="serif">NotoSerifGeorgian-Regular.otf</font> <font weight="700" style="normal" fallbackFor="serif">NotoSerifGeorgian-Bold.otf</font> </family>
- Android 11
https://cs.android.com/android/platform/superproject/+/android-11.0.0_r1:frameworks/base/data/fonts/fonts.xml;l=151
<family lang="und-Geor,und-Geok"> <font weight="400" style="normal">NotoSansGeorgian-VF.ttf <axis tag="wght" stylevalue="400" /> </font> <font weight="500" style="normal">NotoSansGeorgian-VF.ttf <axis tag="wght" stylevalue="500" /> </font> <font weight="600" style="normal">NotoSansGeorgian-VF.ttf <axis tag="wght" stylevalue="600" /> </font> <font weight="700" style="normal">NotoSansGeorgian-VF.ttf <axis tag="wght" stylevalue="700" /> </font> <font weight="400" style="normal" fallbackFor="serif">NotoSerifGeorgian-VF.ttf <axis tag="wght" stylevalue="400" /> </font> <font weight="500" style="normal" fallbackFor="serif">NotoSerifGeorgian-VF.ttf <axis tag="wght" stylevalue="500" /> </font> <font weight="600" style="normal" fallbackFor="serif">NotoSerifGeorgian-VF.ttf <axis tag="wght" stylevalue="600" /> </font> <font weight="700" style="normal" fallbackFor="serif">NotoSerifGeorgian-VF.ttf <axis tag="wght" stylevalue="700" /> </font> </family>
- ファイル名の "-VF" が Variable Font の識別子になっている
Android 10 | Android 11 |
---|---|
NotoSansGeorgian-Regular.otf | |
NotoSansGeorgian-Medium.otf | NotoSansGeorgian-VF.ttf |
NotoSansGeorgian-Bold.otf | |
NotoSerifGeorgian-Regular.otf | NotoSerifGeorgian-VF.ttf |
NotoSerifGeorgian-Bold.otf |
フォントファイルは下記URLにある
https://cs.android.com/android/platform/superproject/+/android-11.0.0_r1:external/noto-fonts/other/"Variation Axes" に可変できるウェイトが記載されている
下記フォントも Variable Font に変わっていた。
- Android 10
<family lang="und-Adlm"> <font weight="400" style="normal">NotoSansAdlam-Regular.ttf</font> </family>
- Android 11
<family lang="und-Adlm"> <font weight="400" style="normal">NotoSansAdlam-VF.ttf <axis tag="wght" stylevalue="400" /> </font> <font weight="500" style="normal">NotoSansAdlam-VF.ttf <axis tag="wght" stylevalue="500" /> </font> <font weight="600" style="normal">NotoSansAdlam-VF.ttf <axis tag="wght" stylevalue="600" /> </font> <font weight="700" style="normal">NotoSansAdlam-VF.ttf <axis tag="wght" stylevalue="700" /> </font> </family>
Android 10 | Android 11 |
---|---|
NotoSansAdlam-Regular.ttf | NotoSansAdlam-VF.ttf |
今後はVariable Font が主流になってくるのかもしれない。
とは言っても、欧文フォントではファイル容量削減効果があまりない気がするが。。。