【问题标题】:How to make "Andalus" Custom font not work in UITableViewCell?如何使“Andalus”自定义字体在 UITableViewCell 中不起作用?
【发布时间】:2012-10-30 00:22:56
【问题描述】:

“Andalus”自定义字体在UITableViewCell 中不起作用。后续步骤:

  • 将字体文件名“Andalus.ttf”添加到app-info.plist中的“应用程序提供的字体”键

  • 使用NSLog(@"%@", [UIFont familyNames]); 获取字体名称 // 它返回“Andalus”

  • 设置字体名称使用:cell.textLabel.font = [UIFont fontWithName:@"Andalus" size:10];

    cell.detailTextLabel.font = [UIFont fontWithName:@"Andalus" size:10];
    

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

但是像 'حمل' 这样的词在 textedit 中不会以相同的字体出现

我使用UTF8sqlite 获取数据

谢谢你的提前

【问题讨论】:

    标签: iphone ipad


    【解决方案1】:

    安达卢斯是否有不止一种变体,例如安达卢斯强和安达卢斯锐利?如果是这种情况,您必须指定要使用的变体的名称。

    查看[UIFont fontNamesForFamilyName:@"Andalus"]返回的数组

    【讨论】:

    【解决方案2】:

    在这里你可以找到可以使用的字体更新列表:

    http://iosfonts.com/

    此外,还有一个应用程序可以让您查看字体的外观:

    http://itunes.apple.com/app/fonts/id285217489?mt=8

    【讨论】:

      猜你喜欢
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 2012-04-22
      • 2014-07-22
      • 1970-01-01
      相关资源
      最近更新 更多