---
title: "android中添加arial字体（非android默认字体）"
author: "Clareshao"
date: "2012-02-15T17:04:41Z"
tags: []
categories: ["移动开发"]
slug: "android-arial-android"
draft: false
lastmod: "2012-02-15T17:04:41Z"
id: 1407405
url: "https://clareshao.iteye.com/blog/1407405"
---

先在工程中添加字体文件，位置为assets/font/arial.ttf，文件见附件

```java

TextView nameTextView = (TextView) convertView.findViewById(R.id.name);
        Typeface tf = Typeface.createFromAsset(context.getAssets(), "font/arial.ttf"); 
        nameTextView.setTypeface(tf);  

```