上司はもっと小さなパッケージサイズを望んでいます。私たちが持っている最大のリソースは、最大5MBのフォールバックフォント(CJK文字用)です。現在、私は電話からフォールバックフォントを読み取ることができました。これはOpenGLアプリケーションであり、フォントのレンダリングにFreeTypeを使用しているため、UIFontを使用していません。動作するコードがありますが、以下の/System/Library/Fonts/CGFontCache.plistを読み取ることが、AppStoreから拒否される理由であるかどうかを知りたいです。
void AddSystemFontToCache(const char* fontName, const int& fontStyle)
{
NSString *nsFontName = [NSString stringWithCString:fontName encoding:NSASCIIStringEncoding];
NSDictionary *nsFontsDict = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/Fonts/CGFontCache.plist"];
NSDictionary *nsTraitsDict = [nsFontsDict valueForKey:@"TraitMappings"];
NSDictionary *nsMappingDict = [nsTraitsDict valueForKey:nsFontName];
NSDictionary *nsFaceNamesDict = [nsFontsDict valueForKey:@"Names"];
NSString* nsFacePath = [nsFaceNamesDict valueForKey:[nsMappingDict valueForKey:nsFontStyle]];
// This function uses FT_New_Face to read the font
AddFontToCache(fontName, [nsFacePath cStringUsingEncoding:NSASCIIStringEncoding]);
}