Arial font for text in Android

后端 未结 6 1427
悲哀的现实
悲哀的现实 2021-02-20 04:11

I want to show text in Arial font. But Arial font is not available in android system fonts. I don\'t want to use arial ttf file in my application. Is there any other way to appl

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-20 05:00

    You can create your custom font just adding the .ttf file in "fonts" folder inside "res":

    The xml files contain this:

    
    
        
    
    

    And that's all! You can use this font in every TextView just adding android:fontFamily property.

      
    

提交回复
热议问题