---
title: "android编程中设置文本的中文字体"
author: "dengzh"
date: "2011-12-29T15:18:45Z"
tags: ["Android", "ttf", "中文字体"]
categories: ["移动开发"]
slug: "android"
draft: false
lastmod: "2011-12-29T15:19:33Z"
id: 1329504
url: "https://dengzh.iteye.com/blog/1329504"
---

请将ttf字体文件放入sdcard的文件夹中

```
text1.setTypeface(Typeface.createFromFile("/mnt/sdcard/font/SIMLI.ttf"));
```

 

 

 效果如下图

![](http://dl.iteye.com/upload/attachment/613721/3aac6f8f-2cd3-315c-b222-f22729c655f3.jpg)