Custom font rendering on Android 4.0 (Ice cream sandwich)

后端 未结 4 2160
囚心锁ツ
囚心锁ツ 2021-02-13 03:08

While testing an application that uses Helvetica Neue as its primary font on Android 4.0 I have found that there is an inconsistency in typeface rendering compared to multiple d

4条回答
  •  我寻月下人不归
    2021-02-13 03:49

    Add font type ttf file to asset folder, then add below code

    Typeface tf = Typeface.createFromAsset(getBaseContext().getAssets(), "Helvetica.ttf");

    then add tf object to text view as below

    textobjext.setTypeface(tf, Typeface.BOLD);
    

提交回复
热议问题