iOS导入自定义字体难度

时间:2013-06-21 21:27:03

标签: ios fonts

我已经做了一切,以便使用.ttf:

来使用以下字体

http://www.fontsquirrel.com/fonts/Miso ...

予。他们在我的项目专栏中:

enter image description here

II。他们在我的plist文件中。

enter image description here

III ......现在在我的Copy Bundle Resources

enter image description here

根据苹果字体程序,这是它的名字:

enter image description here

根据其CTRL + CLICK,“获取信息”

enter image description here

所有尝试记录如下:

  NSLog(@"the font: %@",[UIFont fontNamesForFamilyName:@"Miso Light"]);
NSLog(@"the font: %@",[UIFont fontNamesForFamilyName:@"Miso-Light"]);
NSLog(@"the font: %@",[UIFont fontNamesForFamilyName:@"Miso"]);
NSLog(@"the font: %@",[UIFont fontNamesForFamilyName:@"Miso Light"]);


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]);
    }

......证明没有结果。这是一个人将自定义字体导入iOS的结束。

0 个答案:

没有答案