0

It seems like fontFamily attribute doesn't applied if you use japanese string inside a TextView. I've created sample project which shows several TextViews with different fontFamily. Layout is very simple -

<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="世界ランキング"
        android:fontFamily="sans-serif"
        android:textSize="21.33sp"
        android:textStyle="normal"
        android:textColor="@android:color/black" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:textStyle="normal"
        android:text="sans-serif"
        android:fontFamily="sans-serif"
        android:textColor="@android:color/black" />
</LinearLayout>

And this is how it looks -

enter image description here

I feel that I'm doing something wrong, please help me to figure out what exactly.

Vladimir K.
  • 653
  • 1
  • 5
  • 14
  • The simplest answer is that the Android default-font does not support serifs/other sizings for non-English characters. You're probably going to have to install your own font if you want custom Japanese characters. Google points to here: http://www.freejapanesefont.com/category/gothic/ – Matter Cat Apr 20 '15 at 08:09
  • @MatterCat, [Google typography specs]: (http://www.google.com.ua/design/spec/style/typography.html) says: "Noto has been the standard typeface on Android for all languages not covered by Roboto". Doesn't it mean that android has to support japanese font? – Vladimir K. Apr 20 '15 at 08:43
  • Hmm. Okay, according to http://stackoverflow.com/questions/12128331/how-to-change-fontfamily-of-textview-in-android, I believe that that means only Noto Regular is installed by default in the fonts folder. If you want different stylings as stated on the page you linked, you have to download them https://www.google.com/get/noto/#/ – Matter Cat Apr 20 '15 at 09:13

0 Answers0