I got 2 problems with custom ttf fonts on iOS.
1. specifing absolute path of a “.ttf” file does not take effect.
this can be fixed easily by modifying FontManager.m
- (BOOL)loadFont:(NSString *)filename {
//Timothy{{
NSString *fontPath;
NSRange range = [filename rangeOfString:@"/"] ;
if( range.location != 0 ) {
fontPath = [[NSBundle mainBundle] pathForResource:filename ofType:@"ttf"];
} else {
fontPath = filename;
}
//NSString *fontPath = [[NSBundle mainBundle] pathForResource:filename ofType:@"ttf"];
//Timothy}}
2. chinese characters are displayed as rectangles
I’m not familiar with how TTF is rendering, is there a fix for it?