You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/03/13 11:43:15 UTC

[1/2] incubator-weex git commit: *[ios]fix CTFont crash on iOS10

Repository: incubator-weex
Updated Branches:
  refs/heads/master db76e84c2 -> 806e1a0b8


*[ios]fix CTFont crash on iOS10


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a790bedd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a790bedd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a790bedd

Branch: refs/heads/master
Commit: a790beddfe60f65935963f693c9f931c86db608d
Parents: 5b901c0
Author: fjzznjsh <fj...@163.com>
Authored: Fri Mar 9 17:27:27 2018 +0800
Committer: fjzznjsh <fj...@163.com>
Committed: Fri Mar 9 17:27:27 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a790bedd/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index 042f0a6..f4211bd 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -464,12 +464,8 @@ do {\
     
     // set font
     UIFont *font = [WXUtility fontWithSize:_fontSize textWeight:_fontWeight textStyle:_fontStyle fontFamily:_fontFamily scaleFactor:self.weexInstance.pixelScaleFactor useCoreText:[self useCoreText]];
-    CTFontRef ctFont = CTFontCreateWithName((__bridge CFStringRef)font.fontName,
-                                           font.pointSize,
-                                           NULL);
-    if (ctFont) {
-        [attributedString addAttribute:(id)kCTFontAttributeName value:(__bridge id)(ctFont) range:NSMakeRange(0, string.length)];
-        CFRelease(ctFont);
+    if (font) {
+        [attributedString addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, string.length)];
     }
     
     if(_textDecoration == WXTextDecorationUnderline){


[2/2] incubator-weex git commit: Merge branch 'master' of https://github.com/fjzznjsh/incubator-weex into merge-pull-request-master

Posted by ac...@apache.org.
Merge branch 'master' of https://github.com/fjzznjsh/incubator-weex into merge-pull-request-master


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/806e1a0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/806e1a0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/806e1a0b

Branch: refs/heads/master
Commit: 806e1a0b8448f7e4464d0dc39157c66432d89c74
Parents: db76e84 a790bed
Author: acton393 <zh...@gmail.com>
Authored: Tue Mar 13 19:41:50 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue Mar 13 19:41:50 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------