Custom Font in Android renders differently in different APIs

前端 未结 1 1191
耶瑟儿~
耶瑟儿~ 2021-01-30 17:42

I am using a custom .ttf font in my android app. I load it the usual way:

myTypeface = Typeface.createFromAsset( getAssets(), \"myTypeface.ttf\");
相关标签:
1条回答
  • 2021-01-30 18:07

    Okay, so it seems to have just the following flags applied in both instances:

    Paint.DEV_KERN_TEXT_FLAG
    Paint.ANTI_ALIAS_FLAG
    

    Try doing this, and see if the results are any different (not necessarily improved, but even noticeable at all):

    textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    
    0 讨论(0)
提交回复
热议问题