【Android 11】 Googleフォントの定義・格納場所
前OSである Android 10 から欧文フォントのデフォルトが Googleフォントへ変わった。
今回もGoogleフォントはどこで定義されているのか確認してみた。
調査OS:
- Android 11 Beta 3 [Build No : RPB3.200720.005]
- Android 11 正式版 [Build No : RQ1A.201205.003] [Tag No : android-11.0.0_r18]
結論:
前OSの Android 10 と基本的に変化なし。
[Android Q, Android 10] Googleフォントの定義・格納場所
念のため、今回の確認手順も以下に記しておく。
フォント定義ファイル fonts.xml を見てみる。
$ adb pull system/etc/fonts.xml
fonts.xml ファイル内には、Googleフォントの定義が見あたらない。
fonts.xml ファイルの内容確認
端末内を探していると、それらしきファイルが見つかった。
$ adb shell ls -l /system/product/etc drwxr-xr-x 2 root root 4096 2009-01-01 09:00 CarrierSettings -rw-r--r-- 1 root root 95766 2009-01-01 09:00 NOTICE.xml.gz drwxr-xr-x 2 root root 4096 2009-01-01 09:00 ambient drwxr-xr-x 3 root root 4096 2009-01-01 09:00 cne drwxr-xr-x 2 root root 4096 2009-01-01 09:00 felica drwxr-xr-x 2 root root 4096 2009-01-01 09:00 firmware -rw-r--r-- 1 root root 2170 2009-01-01 09:00 fonts_customization.xml -r--r--r-- 1 root root 0 2009-01-01 09:00 fs_config_dirs -r--r--r-- 1 root root 0 2009-01-01 09:00 fs_config_files -rw-r--r-- 1 root root 0 2009-01-01 09:00 group -rw-r--r-- 1 root root 4431 2009-01-01 09:00 libnfc-nci.conf -rw-r--r-- 1 root root 0 2009-01-01 09:00 passwd drwxr-xr-x 2 root root 4096 2009-01-01 09:00 permissions drwxr-xr-x 2 root root 4096 2009-01-01 09:00 preferred-apps drwxr-xr-x 4 root root 4096 2009-01-01 09:00 res drwxr-xr-x 3 root root 4096 2009-01-01 09:00 security drwxr-xr-x 3 root root 4096 2009-01-01 09:00 selinux drwxr-xr-x 2 root root 4096 2009-01-01 09:00 sysconfig
fonts_customization.xml ファイルを取り出してみる。
$ adb pull /system/product/etc/fonts_customization.xml
GoogleSans の記載があった。
- Android 11 Beta 3
<fonts-modification version="1"> <family customizationType="new-named-family" name="google-sans"> <font weight="400" style="normal">GoogleSans-Regular.ttf</font> <font weight="400" style="italic">GoogleSans-Italic.ttf</font> <font weight="500" style="normal">GoogleSans-Medium.ttf</font> <font weight="500" style="italic">GoogleSans-MediumItalic.ttf</font> <font weight="700" style="normal">GoogleSans-Bold.ttf</font> <font weight="700" style="italic">GoogleSans-BoldItalic.ttf</font> </family> <alias name="google-sans-medium" to="google-sans" weight="500" /> <family customizationType="new-named-family" name="arbutus-slab"> <font weight="400" style="normal">ArbutusSlab-Regular.ttf</font> </family> <family customizationType="new-named-family" name="lato"> <font weight="400" style="normal">Lato-Regular.ttf</font> <font weight="400" style="italic">Lato-Italic.ttf</font> <font weight="700" style="normal">Lato-Bold.ttf</font> <font weight="700" style="italic">Lato-BoldItalic.ttf</font> </family> <alias name="lato-bold" to="lato" weight="700" /> <family customizationType="new-named-family" name="rubik"> <font weight="400" style="normal">Rubik-Regular.ttf</font> <font weight="400" style="italic">Rubik-Italic.ttf</font> <font weight="500" style="normal">Rubik-Medium.ttf</font> <font weight="500" style="italic">Rubik-MediumItalic.ttf</font> <font weight="700" style="normal">Rubik-Bold.ttf</font> <font weight="700" style="italic">Rubik-BoldItalic.ttf</font> </family> <alias name="rubik-medium" to="rubik" weight="500" /> <family customizationType="new-named-family" name="zilla-slab-medium"> <font weight="500" style="normal">ZillaSlab-Medium.ttf</font> <font weight="500" style="italic">ZillaSlab-MediumItalic.ttf</font> <font weight="600" style="normal">ZillaSlab-SemiBold.ttf</font> <font weight="600" style="italic">ZillaSlab-SemiBoldItalic.ttf</font> </family> <alias name="zilla-slab-semi-bold" to="zilla-slab-medium" weight="600" /> </fonts-modification>
- Android 11 正式版
<fonts-modification version="1"> <family customizationType="new-named-family" name="google-sans"> <font weight="400" style="normal">GoogleSans-Regular.ttf</font> <font weight="400" style="italic">GoogleSans-Italic.ttf</font> <font weight="500" style="normal">GoogleSans-Medium.ttf</font> <font weight="500" style="italic">GoogleSans-MediumItalic.ttf</font> <font weight="700" style="normal">GoogleSans-Bold.ttf</font> <font weight="700" style="italic">GoogleSans-BoldItalic.ttf</font> </family> <alias name="google-sans-medium" to="google-sans" weight="500" /> <family customizationType="new-named-family" name="arbutus-slab"> <font weight="400" style="normal">ArbutusSlab-Regular.ttf</font> </family> <family customizationType="new-named-family" name="lato"> <font weight="400" style="normal">Lato-Regular.ttf</font> <font weight="400" style="italic">Lato-Italic.ttf</font> <font weight="700" style="normal">Lato-Bold.ttf</font> <font weight="700" style="italic">Lato-BoldItalic.ttf</font> </family> <alias name="lato-bold" to="lato" weight="700" /> <family customizationType="new-named-family" name="rubik"> <font weight="400" style="normal">Rubik-Regular.ttf</font> <font weight="400" style="italic">Rubik-Italic.ttf</font> <font weight="500" style="normal">Rubik-Medium.ttf</font> <font weight="500" style="italic">Rubik-MediumItalic.ttf</font> <font weight="700" style="normal">Rubik-Bold.ttf</font> <font weight="700" style="italic">Rubik-BoldItalic.ttf</font> </family> <alias name="rubik-medium" to="rubik" weight="500" /> <family customizationType="new-named-family" name="zilla-slab-medium"> <font weight="500" style="normal">ZillaSlab-Medium.ttf</font> <font weight="500" style="italic">ZillaSlab-MediumItalic.ttf</font> <font weight="600" style="normal">ZillaSlab-SemiBold.ttf</font> <font weight="600" style="italic">ZillaSlab-SemiBoldItalic.ttf</font> </family> <alias name="zilla-slab-semi-bold" to="zilla-slab-medium" weight="600" /> <family customizationType="new-named-family" name="lustria">--> <font weight="400" style="normal">Lustria-Regular.ttf</font> </family> <alias name="lustria" to="lustria" weight="400"/> <family customizationType="new-named-family" name="karla"> <font weight="400" style="normal">Karla-Regular.ttf</font> </family> <alias name="karla" to="karla" weight="400"/> <family customizationType="new-named-family" name="fraunces"> <font weight="400" style="normal">Fraunces-Regular.ttf</font> <font weight="600" style="normal">Fraunces-SemiBold.ttf</font> </family> <alias name="fraunces" to="fraunces" weight="400"/> <alias name="fraunces-semi-bold" to="fraunces" weight="600"/> <family customizationType="new-named-family" name="big-shoulders-text"> <font weight="700" style="normal">BigShouldersText-Bold.ttf</font> <font weight="800" style="normal">BigShouldersText-ExtraBold.ttf</font> </family> <alias name="big-shoulders-text-bold" to="big-shoulders-text" weight="700"/> <alias name="big-shoulders-text-extra-bold" to="big-shoulders-text" weight="800"/> <family customizationType="new-named-family" name="barlow"> <font weight="700" style="normal">Barlow-Bold.ttf</font> <font weight="500" style="normal">Barlow-Medium.ttf</font> </family> <alias name="barlow-bold" to="barlow" weight="700"/> <alias name="barlow-medium" to="barlow" weight="500"/> </fonts-modification>
Googleフォントのファイルは以下の場所に格納されていた。
- Android 11 Beta 3
$ adb shell ls -l /system/product/fonts -rw-r--r-- 1 root root 69268 2009-01-01 09:00 ArbutusSlab-Regular.ttf -rw-r--r-- 1 root root 132412 2009-01-01 09:00 GoogleSans-Bold.ttf -rw-r--r-- 1 root root 135040 2009-01-01 09:00 GoogleSans-BoldItalic.ttf -rw-r--r-- 1 root root 135180 2009-01-01 09:00 GoogleSans-Italic.ttf -rw-r--r-- 1 root root 132856 2009-01-01 09:00 GoogleSans-Medium.ttf -rw-r--r-- 1 root root 135116 2009-01-01 09:00 GoogleSans-MediumItalic.ttf -rw-r--r-- 1 root root 133056 2009-01-01 09:00 GoogleSans-Regular.ttf -rw-r--r-- 1 root root 587864 2009-01-01 09:00 Lato-Bold.ttf -rw-r--r-- 1 root root 618416 2009-01-01 09:00 Lato-BoldItalic.ttf -rw-r--r-- 1 root root 643648 2009-01-01 09:00 Lato-Italic.ttf -rw-r--r-- 1 root root 636396 2009-01-01 09:00 Lato-Medium.ttf -rw-r--r-- 1 root root 694924 2009-01-01 09:00 Lato-MediumItalic.ttf -rw-r--r-- 1 root root 589720 2009-01-01 09:00 Lato-Regular.ttf -rw-r--r-- 1 root root 143356 2009-01-01 09:00 Rubik-Bold.ttf -rw-r--r-- 1 root root 146920 2009-01-01 09:00 Rubik-BoldItalic.ttf -rw-r--r-- 1 root root 143816 2009-01-01 09:00 Rubik-Italic.ttf -rw-r--r-- 1 root root 143696 2009-01-01 09:00 Rubik-Medium.ttf -rw-r--r-- 1 root root 145452 2009-01-01 09:00 Rubik-MediumItalic.ttf -rw-r--r-- 1 root root 140732 2009-01-01 09:00 Rubik-Regular.ttf -rw-r--r-- 1 root root 268184 2009-01-01 09:00 ZillaSlab-Medium.ttf -rw-r--r-- 1 root root 276812 2009-01-01 09:00 ZillaSlab-MediumItalic.ttf -rw-r--r-- 1 root root 270088 2009-01-01 09:00 ZillaSlab-SemiBold.ttf -rw-r--r-- 1 root root 277604 2009-01-01 09:00 ZillaSlab-SemiBoldItalic.ttf
- Android 11 正式版
$ adb shell ls -l /system/product/fonts -rw-r--r-- 1 root root 69268 2009-01-01 09:00 ArbutusSlab-Regular.ttf -rw-r--r-- 1 root root 102468 2009-01-01 09:00 Barlow-Bold.ttf -rw-r--r-- 1 root root 97776 2009-01-01 09:00 Barlow-Medium.ttf -rw-r--r-- 1 root root 118556 2009-01-01 09:00 BigShouldersText-Bold.ttf -rw-r--r-- 1 root root 118904 2009-01-01 09:00 BigShouldersText-ExtraBold.ttf -rw-r--r-- 1 root root 78340 2009-01-01 09:00 Fraunces-Regular.ttf -rw-r--r-- 1 root root 78384 2009-01-01 09:00 Fraunces-SemiBold.ttf -rw-r--r-- 1 root root 132412 2009-01-01 09:00 GoogleSans-Bold.ttf -rw-r--r-- 1 root root 135040 2009-01-01 09:00 GoogleSans-BoldItalic.ttf -rw-r--r-- 1 root root 135180 2009-01-01 09:00 GoogleSans-Italic.ttf -rw-r--r-- 1 root root 132856 2009-01-01 09:00 GoogleSans-Medium.ttf -rw-r--r-- 1 root root 135116 2009-01-01 09:00 GoogleSans-MediumItalic.ttf -rw-r--r-- 1 root root 133056 2009-01-01 09:00 GoogleSans-Regular.ttf -rw-r--r-- 1 root root 14824 2009-01-01 09:00 Karla-Regular.ttf -rw-r--r-- 1 root root 587864 2009-01-01 09:00 Lato-Bold.ttf -rw-r--r-- 1 root root 618416 2009-01-01 09:00 Lato-BoldItalic.ttf -rw-r--r-- 1 root root 643648 2009-01-01 09:00 Lato-Italic.ttf -rw-r--r-- 1 root root 636396 2009-01-01 09:00 Lato-Medium.ttf -rw-r--r-- 1 root root 694924 2009-01-01 09:00 Lato-MediumItalic.ttf -rw-r--r-- 1 root root 589720 2009-01-01 09:00 Lato-Regular.ttf -rw-r--r-- 1 root root 35320 2009-01-01 09:00 Lustria-Regular.ttf -rw-r--r-- 1 root root 143356 2009-01-01 09:00 Rubik-Bold.ttf -rw-r--r-- 1 root root 146920 2009-01-01 09:00 Rubik-BoldItalic.ttf -rw-r--r-- 1 root root 143816 2009-01-01 09:00 Rubik-Italic.ttf -rw-r--r-- 1 root root 143696 2009-01-01 09:00 Rubik-Medium.ttf -rw-r--r-- 1 root root 145452 2009-01-01 09:00 Rubik-MediumItalic.ttf -rw-r--r-- 1 root root 140732 2009-01-01 09:00 Rubik-Regular.ttf -rw-r--r-- 1 root root 268184 2009-01-01 09:00 ZillaSlab-Medium.ttf -rw-r--r-- 1 root root 276812 2009-01-01 09:00 ZillaSlab-MediumItalic.ttf -rw-r--r-- 1 root root 270088 2009-01-01 09:00 ZillaSlab-SemiBold.ttf -rw-r--r-- 1 root root 277604 2009-01-01 09:00 ZillaSlab-SemiBoldItalic.ttf
Android 11 正式版
で新たに追加されたフォントファイル
-rw-r--r-- 1 root root 102468 2009-01-01 09:00 Barlow-Bold.ttf -rw-r--r-- 1 root root 97776 2009-01-01 09:00 Barlow-Medium.ttf -rw-r--r-- 1 root root 118556 2009-01-01 09:00 BigShouldersText-Bold.ttf -rw-r--r-- 1 root root 118904 2009-01-01 09:00 BigShouldersText-ExtraBold.ttf -rw-r--r-- 1 root root 78340 2009-01-01 09:00 Fraunces-Regular.ttf -rw-r--r-- 1 root root 78384 2009-01-01 09:00 Fraunces-SemiBold.ttf -rw-r--r-- 1 root root 14824 2009-01-01 09:00 Karla-Regular.ttf -rw-r--r-- 1 root root 35320 2009-01-01 09:00 Lustria-Regular.ttf
GoogleSans-Regular.ttf を取り出してみる。
$ adb pull /system/product/fonts/GoogleSans-Regular.ttf
ファイルを表示してみると、確かにGoogleフォントだった。