1. First download the font library you want to set up, for example, set the simplified
2. When adding a project, be sure to check the red box. It is not checked by default.
After adding
3. Add
4. Now it has been added successfully, but you must know the FontName to use it. You can find it using the following code:
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 FontName in founder font starts with FZ, search for FZ in the printed logs.
The simplified FontName is the FZQTJW--GB1-0,
6. You can finally use it.
Self. label. font = [UIFont fontWithName: @ "FZQTJW--GB1-0" size: 20];
The following are the display results: