You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/27 09:38:17 UTC

[GitHub] brucetoo commented on a change in pull request #1964: [weex][android] fix the custom file ttf not work well, need replace u…

brucetoo commented on a change in pull request #1964: [weex][android] fix the custom file ttf not work well, need replace u…
URL: https://github.com/apache/incubator-weex/pull/1964#discussion_r244116800
 
 

 ##########
 File path: android/sdk/src/main/java/com/taobao/weex/utils/FontDO.java
 ##########
 @@ -97,7 +97,12 @@ private void parseSrc(String src, WXSDKInstance instance) {
           mType = TYPE_NETWORK;
         } else if (Constants.Scheme.FILE.equals(scheme)) {
           mType = TYPE_FILE;
-          mUrl = uri.getPath();
+            /**
+             * eg: file://name/A/B.ttf
 
 Review comment:
   like what [official doc](http://weex-project.io/cn/references/modules/custom_font.html) said :  with `url('file://storage/emulated/0/A/B/**.ttf` to custom font by file path, but the result of path format that will like `emulated/0/A/B/**.ttf` ,rather than `storage/emulated/0/A/B/**.ttf` which will cause `File Not Found Exception`. Because `getPath` format schema `storage` as **authority** , as you can see `[scheme:][//authority][path][?query][#fragment]`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services