Http://www.cnblogs.com/iyou/archive/2014/05/25/3751669.html
1. First download the font library you want to set up, for example set founder
2. Add to the project, be sure to check the red box, the default is not checked
Add later
3. Add in the Plist file
4. It has now been added successfully, but to use it must know FontName, the following code can be found
Nsarray *familynames = [[Nsarray alloc] Initwitharray:[uifont Familynames]]; Nsarray *fontnames; Nsinteger indfamily, Indfont; for (indfamily=0; indfamily<[familynames count]; ++indfamily) { NSLog (@ "Family name:%@", [familynames Objectatindex:indfamily]); FontNames = [[Nsarray alloc] Initwitharray: [uifont fontnamesforfamilyname: [familynames Objectatindex: Indfamily]]; for (indfont=0; indfont<[fontnames count]; ++indfont) { NSLog (@ " Font name:%@", [FontNames Objectatindex:indfont]); } }
5. Because the fontname of the Fangzheng font are all FZ-start, search for FZ in the printed log
Founder of the body of the simplified fontname is fzqtjw--gb1-0,
6. Finally, you can use the
Self.label.font = [Uifont fontwithname:@ "fzqtjw--gb1-0" size:20];
Here is the display effect