Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[iOS] weex引用原生本地自定义字体文件频繁打印error信息 #3338

Open
demoker opened this issue Apr 1, 2021 · 0 comments
Open
Labels

Comments

@demoker
Copy link

demoker commented Apr 1, 2021

iOS原生与Weex页面使用同一种字体,会导致一些Weex Error打印, 猜测原因是:原生plist中会先注册一边,然后weex界面加载的时候会根据DomModule中原生提供的字体本地沙盒路径再次进行注册,字体显示是正常的,只是控制台会频繁打印error信息,影响性能

对于原生已经注册的字体,weex SDK里面应该作出相应的判断处理

Log info:
[error]WXUtility.m:568, Unable to register font, but will unregister previous one and retry with new font file, {
src = "file:///private/var/containers/Bundle/Application/E62577F7-C573-414A-89BE-513D9F017BAB/%E7%95%85%E5%90%AC%E6%9E%81%E9%80%9F%E7%89%88.app/Akrobat_kw_Regular.ttf";
localSrc = file:///private/var/containers/Bundle/Application/E62577F7-C573-414A-89BE-513D9F017BAB/%E7%95%85%E5%90%AC%E6%9E%81%E9%80%9F%E7%89%88.app/Akrobat_kw_Regular.ttf;
}.

[error]WXUtility.m:573, We cannot register the font finally. Error Domain=com.apple.CoreText.CTFontManagerErrorDomain Code=105 "Could not register the CGFont '<CGFont (0x280dff680): Akrobat-kw>'" UserInfo={NSDescription=Could not register the CGFont '<CGFont (0x280dff680): Akrobat-kw>', CTFailedCGFont=<CGFont (0x280dff680): Akrobat-kw>}

@demoker demoker added the Bug label Apr 1, 2021
@demoker demoker changed the title [Android][iOS] weex引用原生本地自定义字体文件频繁打印error信息 [iOS] weex引用原生本地自定义字体文件频繁打印error信息 Apr 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant