iPhone, Japanese script [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionCan the iPhone default system font display Japanese script?
I have an iPhone which compiles correctly and then开发者_运维问答 localizes and displays correctly in the simulator (English, Japanese and Thai!). It runs fine in English and Thai on my iTouch but hangs when I change the language setting to Japanese. I can display Japanese script correctly when I use say HiraKakuProN-W3 when displaying the labels but this is no good for table section headers unless I can some how change the system font.
The other localizations (German, French) work fine.
My localization files are UTF8-encoded.
There must be a clean way of displaying Japanese script.
The answer might as well be no, given that there are alternatives. (Why it works in the simulator but not live on the iTouch is not clear to me at all...)
Anyway, there is a work around:
Instead customise the section header view, returning a label (which inherits from UIView anyway) whose font is set with @"HiraKakuProN-W3". The right method to use is:
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
It's not very satisfying. Is this a bug in UIKit?
Addendum:
The system font on the iPhone/iTouch handles Japanese script just fine.
It is now working within my app "live", rather than just in the simulator, though why this is I'm still at a total loss to explain. I am using 11mb of RAM which should be sufficiently far from incurring a memory warning.
Still, it is working now.
精彩评论