2011-10-24 38 views
0

「安達盧斯」自定義字體在UITableViewCell中不起作用。步驟如下:如何使「Andalus」自定義字體在UITableViewCell中不起作用?

  • 添加字體文件名「Andalus.ttf」使用NSLog(@"%@", [UIFont familyNames]); //它返回「安達盧斯」關鍵在app-Info.plist中

  • 「由應用程序提供的字體」獲取字體名使用

  • 設置字體名稱: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 

但像 'حمل' 不會出現在同一字體的文本編輯一個字

我從sqlite

感謝得到使用UTF8數據你提前

回答

1

是否A ndalus有不止一種變體,例如安達盧斯強和安達盧斯鋒利?如果是這種情況,您必須指定您希望使用的變體的名稱。

檢查數組由[UIFont fontNamesForFamilyName:@"Andalus"]

+0

謝謝你的回覆。但事實並非如此。和[UIFont fontNamesForFamilyName:@「Andalus」]只是返回安達盧斯 – user807146

+0

http://stackoverflow.com/questions/3691567/custom-arabic-font-in-ios 這是我的問題與誤解的答案。每個人都可以更清楚地回答問題,以及如何與ios應用程序集成。 – user807146

相關問題