开发阅读器时遇到的坑
1.在导入字体后,改变阅读器字体时出现以下错误
错误提示:
CoreText performance note: Client called CTFontCreateWithName() using name "Devanagari Sangam MN" and got font with PostScript name "DevanagariSangamMN". For best performance, only use PostScript names when calling this API.
2.原因:
在()中设置字体,使用字体名称不对
CTFontRef fontRef = CTFontCreateWithName((CFStringRef)config.fontName, fontSize, NULL);
3.解决,将 "Devanagari Sangam MN" 替换为提示的 "DevanagariSangamMN"
Client called CTFontCreateWithName() using name "Devanagari Sangam MN" and got font with PostScript name "DevanagariSangamMN".