[ 
https://issues.apache.org/jira/browse/WEEX-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16316218#comment-16316218
 ] 

ASF GitHub Bot commented on WEEX-187:
-------------------------------------

Github user misakuo commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/972#discussion_r160133185
  
    --- Diff: 
android/sdk/src/main/java/com/taobao/weex/ui/component/WXText.java ---
    @@ -198,23 +199,21 @@ public void onReceive(Context context, Intent intent) 
{
             if (!mFontFamily.equals(fontFamily)) {
               return;
             }
    -
    -        FontDO fontDO = TypefaceUtil.getFontDO(fontFamily);
    -        if (fontDO != null && fontDO.getTypeface() != null && 
getHostView() != null) {
    -          WXTextView hostView = getHostView();
    -          Layout layout = hostView.getTextLayout();
    -          if (layout != null) {
    -            layout.getPaint().setTypeface(fontDO.getTypeface());
    -            WXLogUtils.d("WXText", "Apply font family " + fontFamily + " 
to paint");
    -          } else {
    -            WXLogUtils.w("WXText", "Layout not created");
    -          }
    -          hostView.invalidate();
    +        DOMActionContext domActionContext = 
WXSDKManager.getInstance().getWXDomManager().getDomContext(getInstanceId());
    --- End diff --
    
    why relayout is needed?


> weex custom font not rendered right when font  is first downloaded
> ------------------------------------------------------------------
>
>                 Key: WEEX-187
>                 URL: https://issues.apache.org/jira/browse/WEEX-187
>             Project: Weex
>          Issue Type: Bug
>            Reporter: codefurture
>            Assignee: Adam Feng
>
> weex custom font not rendered right when font  is first downloaded. 
> http://rax.alibaba-inc.com/playground/25424547-45d0-4fce-9ec2-8958fde6024e



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to